gi-component 0.0.29 → 0.0.31

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gi-component",
3
3
  "type": "module",
4
- "version": "0.0.29",
4
+ "version": "0.0.31",
5
5
  "description": "Vue3中基于Element Plus二次封装基础组件库",
6
6
  "author": "lin",
7
7
  "license": "MIT",
@@ -17,6 +17,9 @@
17
17
  "二次封装组件",
18
18
  "封装组件"
19
19
  ],
20
+ "sideEffects": [
21
+ "packages/components/dialog/src/dialog.ts"
22
+ ],
20
23
  "main": "dist/index.umd.js",
21
24
  "module": "dist/index.es.js",
22
25
  "types": "dist/index.d.ts",
@@ -33,7 +33,7 @@
33
33
  import type { VNode } from 'vue'
34
34
  import type { DialogProps } from './type'
35
35
  import { ElButton, ElDialog, ElSpace } from 'element-plus'
36
- import { computed, defineProps, defineSlots, ref } from 'vue'
36
+ import { computed, ref } from 'vue'
37
37
  import { useBemClass } from '../../../hooks'
38
38
 
39
39
  const visible = defineModel('modelValue', {
package/packages/index.ts CHANGED
@@ -2,7 +2,7 @@ import type { App, Component } from 'vue'
2
2
 
3
3
  import Button from './components/button'
4
4
  import Card from './components/card'
5
- import DialogComponent from './components/dialog'
5
+ import DialogComponent, { Dialog as DialogFunction } from './components/dialog'
6
6
  import Dot from './components/dot'
7
7
  import Drawer from './components/drawer'
8
8
  import EditTable from './components/edit-table'
@@ -17,6 +17,9 @@ import Tabs from './components/tabs'
17
17
  import TreeTransfer from './components/tree-transfer'
18
18
  import './styles/index.scss'
19
19
 
20
+ // 防止打包时 tree-shake 掉 Dialog.info/success/warning/error(内部只用到 Dialog.open)
21
+ void [DialogFunction.info, DialogFunction.success, DialogFunction.warning, DialogFunction.error]
22
+
20
23
  export * from './components/dialog'
21
24
  export * from './components/drawer'
22
25
  export * from './components/edit-table'