gi-component 0.0.28 → 0.0.30

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.28",
4
+ "version": "0.0.30",
5
5
  "description": "Vue3中基于Element Plus二次封装基础组件库",
6
6
  "author": "lin",
7
7
  "license": "MIT",
@@ -1,6 +1,6 @@
1
- import Dialog from './src/dialog.vue'
1
+ import DialogComponent from './src/dialog.vue'
2
2
 
3
- export type DialogInstance = InstanceType<typeof Dialog>
3
+ export type DialogInstance = InstanceType<typeof DialogComponent>
4
4
  export * from './src/dialog'
5
5
  export * from './src/type'
6
- export default Dialog
6
+ export default DialogComponent
@@ -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'