Skip to content

Commit 5d031bb

Browse files
author
Simon he
committed
chore: update README
1 parent d023d40 commit 5d031bb

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@ import {
1818
} from 'simon-js-tool' # 按需引入
1919

2020
```
21+
22+
## createElement
23+
- 创建dom函数
24+
- 参数:
25+
- tagName: string, 元素标签名称
26+
- attrs: object, 元素属性对象
27+
```javascript
28+
const div = createElement('div', {
29+
class: 'className',
30+
style: 'color: red;',
31+
style: 'color: red;font-size: 20px;'',
32+
})
33+
```
2134
## sleep
2235
- 睡眠函数
2336
- 参数:
@@ -716,6 +729,15 @@ preload(['https://img.yzcdn.cn/vant/cat.jpeg', 'https://img.yzcdn.cn/vant/dog.jp
716729
```javascript
717730
addScript('https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js')
718731
```
732+
733+
## addLink
734+
- 动态添加link标签放 => head
735+
- 参数:
736+
- src: link路径
737+
```javascript
738+
addLink('https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css')
739+
```
740+
719741
## addStyle
720742
- 动态添加style标签 => head
721743
- 参数:

0 commit comments

Comments
 (0)