0.0.1-beta.2

This commit is contained in:
2024-09-30 00:13:36 +08:00
parent db37b9b06c
commit 3c3311f80f
4 changed files with 107 additions and 14 deletions

View File

@@ -1,5 +1,3 @@
Heres a suggestion for your npm package description in English:
```markdown
# ddmt-tool
@@ -12,12 +10,63 @@ npm install ddmt-tool
```
## Usage Example
General usage.
```javascript
import { Name } from 'ddmt-tool';
Name();
```
Refers specifically to the usage of animateStart.
```javascript
import { animateStart } from 'ddmt-tool';
/**
* animateStart
* @param {HTMLElement} HTMLElement Animation needs to be played in HTMLElement
* @param {string} classname The corresponding CSS for the animation
* @param {boolean} forceExecute Whether to force execute the animation or not
* @returns {void}
*/
animateStart(event, className, forceExecute=false);
```
Here's an example of how to use CSS
```css
.box-item {
position: absolute;
background-color: rgb(255, 223, 181);
border-radius: 10px;
width: 60px;
height: 60px;
line-height: 60px;
margin: 2px;
text-align: center;
cursor: default;
}
.box-item.animate {
animation-name: boxbing;
animation-duration: 0.7s;
animation-iteration-count: 1;
/* 设置动画只播放一次 */
animation-fill-mode: forwards;
/* 保持动画结束时的状态 */
}
@keyframes boxbing {
0% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
100% {
transform: scale(1);
}
}
```
## Features
@@ -26,6 +75,4 @@ Name();
- Custom utilities
For more features and usage instructions, please refer to the documentation.
```
This should give users a clear understanding of your package's purpose and how to use it.
```