sctj-components 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -2
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -47,8 +47,9 @@ import { createApp } from 'vue'
|
|
|
47
47
|
import ElementPlus from 'element-plus'
|
|
48
48
|
import 'element-plus/dist/index.css'
|
|
49
49
|
import SctjComponents from 'sctj-components'
|
|
50
|
-
//
|
|
51
|
-
import 'sctj-components/
|
|
50
|
+
// 引入组件库样式
|
|
51
|
+
import 'sctj-components/style.css' // 推荐写法
|
|
52
|
+
// import 'sctj-components/lib/style.css' // 兼容旧写法(已在 exports 中兼容)
|
|
52
53
|
|
|
53
54
|
const app = createApp(App)
|
|
54
55
|
app.use(ElementPlus)
|
|
@@ -58,6 +59,12 @@ app.mount('#app')
|
|
|
58
59
|
|
|
59
60
|
#### 按需引入
|
|
60
61
|
|
|
62
|
+
即便按需引入组件,也需要全局引入一次样式:
|
|
63
|
+
```javascript
|
|
64
|
+
import 'sctj-components/style.css' // 推荐写法
|
|
65
|
+
// import 'sctj-components/lib/style.css' // 兼容旧写法
|
|
66
|
+
```
|
|
67
|
+
|
|
61
68
|
组件名称均带前缀 `SCTJ`:
|
|
62
69
|
```javascript
|
|
63
70
|
import { SCTJDictTag, SCTJTable, SCTJSearch } from 'sctj-components'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sctj-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "岁辞苔径组件库",
|
|
5
5
|
"author": "岁辞苔径",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"import": "./lib/sctj-components.es.js",
|
|
23
23
|
"require": "./lib/sctj-components.umd.js"
|
|
24
24
|
},
|
|
25
|
-
"./style.css": "./lib/style.css"
|
|
25
|
+
"./style.css": "./lib/style.css",
|
|
26
|
+
"./lib/style.css": "./lib/style.css"
|
|
26
27
|
},
|
|
27
28
|
"peerDependencies": {
|
|
28
29
|
"vue": "^3.2.0",
|