@nhdropshipping/y-components 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/README.md +11 -2
  2. package/package.json +3 -2
package/README.md CHANGED
@@ -14,12 +14,20 @@ pnpm add @nhdropshipping/y-components
14
14
 
15
15
  ## 使用
16
16
 
17
+ ### ⚠️ 重要提示
18
+
19
+ **使用组件库前,必须先引入样式文件!**
20
+
21
+ ```typescript
22
+ import '@nhdropshipping/y-components/dist/style.css'
23
+ ```
24
+
17
25
  ### 全量引入
18
26
 
19
27
  ```typescript
20
28
  import { createApp } from 'vue'
21
29
  import YComponents from '@nhdropshipping/y-components'
22
- import '@nhdropshipping/y-components/dist/style.css' // 如果有样式文件
30
+ import '@nhdropshipping/y-components/dist/style.css' // ⚠️ 必须引入样式文件
23
31
 
24
32
  const app = createApp(App)
25
33
  app.use(YComponents)
@@ -35,6 +43,7 @@ app.use(YComponents)
35
43
 
36
44
  <script setup lang="ts">
37
45
  import { YButton, YInput } from '@nhdropshipping/y-components'
46
+ import '@nhdropshipping/y-components/dist/style.css' // ⚠️ 必须引入样式文件
38
47
  import { ref } from 'vue'
39
48
 
40
49
  const inputValue = ref('')
@@ -67,7 +76,7 @@ YMessage.error('操作失败')
67
76
  // main.ts
68
77
  import { createApp } from 'vue'
69
78
  import YComponents from '@nhdropshipping/y-components'
70
- import '@nhdropshipping/y-components/dist/style.css'
79
+ import '@nhdropshipping/y-components/dist/style.css' // ⚠️ 必须引入样式文件
71
80
 
72
81
  const app = createApp(App)
73
82
  app.use(YComponents) // 挂载后,YMessage 自动可用
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@nhdropshipping/y-components",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Vue 3 组件库 - 包含常用的 UI 组件",
5
- "main": "dist/index.js",
5
+ "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
7
7
  "types": "dist/index.d.ts",
8
+ "style": "dist/style.css",
8
9
  "files": [
9
10
  "dist",
10
11
  "README.md"