rayyy-vue-table-components 1.0.6 → 1.0.8

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 CHANGED
@@ -54,8 +54,17 @@ app.use(VueTableComponents)
54
54
  </template>
55
55
 
56
56
  <script setup lang="ts">
57
+ // 方式一:從主模塊導入
57
58
  import { BaseTable, BaseBtn, BaseDialog } from 'rayyy-vue-table-components'
58
59
  import type { TableColumn, SortChangValue } from 'rayyy-vue-table-components'
60
+
61
+ // 方式二:單獨導入組件
62
+ import { BaseTable } from 'rayyy-vue-table-components/components'
63
+ import type { TableColumn } from 'rayyy-vue-table-components/types'
64
+
65
+ // 方式三:單獨導入類型
66
+ import type { SortChangValue } from 'rayyy-vue-table-components/types'
67
+
59
68
  import 'rayyy-vue-table-components/dist/rayyy-vue-table-components.css'
60
69
 
61
70
  interface User {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rayyy-vue-table-components",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Vue 3 + Element Plus 表格組件庫",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.js",
@@ -12,11 +12,20 @@
12
12
  "import": "./dist/index.es.js",
13
13
  "require": "./dist/index.umd.js"
14
14
  },
15
- "./dist/rayyy-vue-table-components.css": "./dist/rayyy-vue-table-components.css"
15
+ "./dist/rayyy-vue-table-components.css": "./dist/rayyy-vue-table-components.css",
16
+ "./types": {
17
+ "types": "./src/types/index.ts",
18
+ "import": "./src/types/index.ts"
19
+ },
20
+ "./components": {
21
+ "types": "./src/components/index.ts",
22
+ "import": "./src/components/index.ts"
23
+ }
16
24
  },
17
25
  "files": [
18
26
  "dist/*",
19
27
  "src/components/*",
28
+ "src/components/index.ts",
20
29
  "src/types/*",
21
30
  "README.md"
22
31
  ],
@@ -0,0 +1,9 @@
1
+ // 單獨導出組件
2
+ export { default as BaseTable } from './BaseTable.vue'
3
+ export { default as BaseBtn } from './BaseBtn.vue'
4
+ export { default as BaseDialog } from './BaseDialog.vue'
5
+
6
+ // 導出組件類型
7
+ export type { default as BaseTableType } from './BaseTable.vue'
8
+ export type { default as BaseBtnType } from './BaseBtn.vue'
9
+ export type { default as BaseDialogType } from './BaseDialog.vue'