@vxe-ui/core 4.0.22 → 4.0.24

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 (86) hide show
  1. package/LICENSE +21 -21
  2. package/README.en.md +31 -31
  3. package/README.md +31 -31
  4. package/README.zh-TW.md +31 -31
  5. package/es/src/core.js +1 -1
  6. package/es/src/event.js +10 -8
  7. package/es/src/log.js +1 -1
  8. package/lib/index.umd.js +942 -145
  9. package/lib/index.umd.min.js +1 -1
  10. package/lib/src/clipboard.min.js +1 -1
  11. package/lib/src/commands.min.js +1 -1
  12. package/lib/src/config.min.js +1 -1
  13. package/lib/src/configStore.min.js +1 -1
  14. package/lib/src/core.js +1 -1
  15. package/lib/src/core.min.js +1 -1
  16. package/lib/src/dataStore.min.js +1 -1
  17. package/lib/src/event.js +10 -8
  18. package/lib/src/event.min.js +1 -1
  19. package/lib/src/formats.min.js +1 -1
  20. package/lib/src/hooks.min.js +1 -1
  21. package/lib/src/i18n.min.js +1 -1
  22. package/lib/src/i18nStore.min.js +1 -1
  23. package/lib/src/icon.min.js +1 -1
  24. package/lib/src/iconStore.min.js +1 -1
  25. package/lib/src/interceptor.min.js +1 -1
  26. package/lib/src/log.js +1 -1
  27. package/lib/src/log.min.js +1 -1
  28. package/lib/src/menus.min.js +1 -1
  29. package/lib/src/permission.min.js +1 -1
  30. package/lib/src/renderer.min.js +1 -1
  31. package/lib/src/resize.min.js +1 -1
  32. package/lib/src/store.min.js +1 -1
  33. package/lib/src/theme.min.js +1 -1
  34. package/lib/src/themeStore.min.js +1 -1
  35. package/lib/src/useFns.min.js +1 -1
  36. package/lib/src/validators.min.js +1 -1
  37. package/package.json +79 -79
  38. package/packages/index.ts +117 -117
  39. package/packages/src/clipboard.ts +53 -53
  40. package/packages/src/commands.ts +62 -62
  41. package/packages/src/config.ts +30 -30
  42. package/packages/src/configStore.ts +8 -8
  43. package/packages/src/core.ts +9 -9
  44. package/packages/src/dataStore.ts +4 -4
  45. package/packages/src/event.ts +127 -125
  46. package/packages/src/formats.ts +62 -62
  47. package/packages/src/hooks.ts +5 -5
  48. package/packages/src/i18n.ts +43 -43
  49. package/packages/src/i18nStore.ts +11 -11
  50. package/packages/src/icon.ts +16 -16
  51. package/packages/src/iconStore.ts +3 -3
  52. package/packages/src/interceptor.ts +65 -65
  53. package/packages/src/log.ts +19 -19
  54. package/packages/src/menus.ts +62 -62
  55. package/packages/src/permission.ts +61 -61
  56. package/packages/src/renderer.ts +50 -50
  57. package/packages/src/resize.ts +89 -89
  58. package/packages/src/store.ts +49 -49
  59. package/packages/src/theme.ts +20 -20
  60. package/packages/src/themeStore.ts +7 -7
  61. package/packages/src/useFns.ts +34 -34
  62. package/packages/src/validators.ts +9 -9
  63. package/types/core/clipboard.d.ts +13 -13
  64. package/types/core/commands.d.ts +19 -19
  65. package/types/core/components.d.ts +4 -4
  66. package/types/core/formats.d.ts +19 -19
  67. package/types/core/global-config.d.ts +62 -62
  68. package/types/core/global-data.d.ts +7 -7
  69. package/types/core/global-event.d.ts +39 -39
  70. package/types/core/global-icon.d.ts +6 -6
  71. package/types/core/global-lang.d.ts +22 -22
  72. package/types/core/global-resize.d.ts +3 -3
  73. package/types/core/global-theme.d.ts +1 -1
  74. package/types/core/hooks.d.ts +14 -14
  75. package/types/core/index.d.ts +255 -255
  76. package/types/core/interceptor.d.ts +22 -22
  77. package/types/core/log.d.ts +8 -8
  78. package/types/core/menus.d.ts +19 -19
  79. package/types/core/permission.d.ts +10 -10
  80. package/types/core/renderer.d.ts +14 -14
  81. package/types/core/useFn.d.ts +27 -27
  82. package/types/core/validators.d.ts +19 -19
  83. package/types/index.d.ts +13 -13
  84. package/types/tool/common.d.ts +111 -111
  85. package/types/tool/index.d.ts +2 -2
  86. package/types/tool/util.d.ts +4 -4
@@ -1,27 +1,27 @@
1
- import { ComputedRef } from 'vue'
2
- import { VxeComponentSizeType, VxeComponentPermissionCodeType, VxeComponentPermissionMethod, VxeComponentPermissionInfo } from '../tool'
3
-
4
- export type VxeUseFnUseSize = (props: {
5
- size?: VxeComponentSizeType;
6
- }) => {
7
- computeSize: ComputedRef<VxeComponentSizeType>;
8
- }
9
-
10
- export const useSize: VxeUseFnUseSize
11
-
12
- export type VxeUsePermission = (props: {
13
- permissionCode?: VxeComponentPermissionCodeType
14
- permissionMethod?: VxeComponentPermissionMethod
15
- }) => {
16
- computePermissionInfo: ComputedRef<VxeComponentPermissionInfo>;
17
- }
18
-
19
- export const usePermission: VxeUsePermission
20
-
21
- /**
22
- * 通用方法
23
- */
24
- export interface VxeGlobalUseFns {
25
- useSize: VxeUseFnUseSize
26
- usePermission: VxeUsePermission
27
- }
1
+ import { ComputedRef } from 'vue'
2
+ import { VxeComponentSizeType, VxeComponentPermissionCodeType, VxeComponentPermissionMethod, VxeComponentPermissionInfo } from '../tool'
3
+
4
+ export type VxeUseFnUseSize = (props: {
5
+ size?: VxeComponentSizeType;
6
+ }) => {
7
+ computeSize: ComputedRef<VxeComponentSizeType>;
8
+ }
9
+
10
+ export const useSize: VxeUseFnUseSize
11
+
12
+ export type VxeUsePermission = (props: {
13
+ permissionCode?: VxeComponentPermissionCodeType
14
+ permissionMethod?: VxeComponentPermissionMethod
15
+ }) => {
16
+ computePermissionInfo: ComputedRef<VxeComponentPermissionInfo>;
17
+ }
18
+
19
+ export const usePermission: VxeUsePermission
20
+
21
+ /**
22
+ * 通用方法
23
+ */
24
+ export interface VxeGlobalUseFns {
25
+ useSize: VxeUseFnUseSize
26
+ usePermission: VxeUsePermission
27
+ }
@@ -1,19 +1,19 @@
1
- /* eslint-disable no-use-before-define */
2
-
3
- export namespace VxeGlobalValidatorsHandles {
4
- export interface ValidatorsOptions {}
5
- }
6
-
7
- /**
8
- * 全局快捷菜单
9
- */
10
- export interface VxeGlobalValidators {
11
- mixin(options: {
12
- [code: string]: VxeGlobalValidatorsHandles.ValidatorsOptions
13
- }): VxeGlobalValidators
14
- has(code: string): boolean
15
- get(code: string): VxeGlobalValidatorsHandles.ValidatorsOptions
16
- add(code: string, callback: VxeGlobalValidatorsHandles.ValidatorsOptions): VxeGlobalValidators
17
- delete(code: string): void
18
- forEach(callback: (options: VxeGlobalValidatorsHandles.ValidatorsOptions, code: string) => void): void
19
- }
1
+ /* eslint-disable no-use-before-define */
2
+
3
+ export namespace VxeGlobalValidatorsHandles {
4
+ export interface ValidatorsOptions {}
5
+ }
6
+
7
+ /**
8
+ * 全局快捷菜单
9
+ */
10
+ export interface VxeGlobalValidators {
11
+ mixin(options: {
12
+ [code: string]: VxeGlobalValidatorsHandles.ValidatorsOptions
13
+ }): VxeGlobalValidators
14
+ has(code: string): boolean
15
+ get(code: string): VxeGlobalValidatorsHandles.ValidatorsOptions
16
+ add(code: string, callback: VxeGlobalValidatorsHandles.ValidatorsOptions): VxeGlobalValidators
17
+ delete(code: string): void
18
+ forEach(callback: (options: VxeGlobalValidatorsHandles.ValidatorsOptions, code: string) => void): void
19
+ }
package/types/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { VxeUIExport } from './core'
2
-
3
- declare global {
4
- interface Window {
5
- /**
6
- * Vxe UI core library
7
- */
8
- VxeUI: VxeUIExport;
9
- }
10
- }
11
-
12
- export * from './tool'
13
- export * from './core'
1
+ import { VxeUIExport } from './core'
2
+
3
+ declare global {
4
+ interface Window {
5
+ /**
6
+ * Vxe UI core library
7
+ */
8
+ VxeUI: VxeUIExport;
9
+ }
10
+ }
11
+
12
+ export * from './tool'
13
+ export * from './core'
@@ -1,111 +1,111 @@
1
- import { App, VNode, ComponentPublicInstance, DefineComponent } from 'vue'
2
-
3
- /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
4
-
5
- /**
6
- * 组件类型
7
- */
8
- export type DefineVxeComponentApp<
9
- P = { [key: string]: any },
10
- E = { [key: string]: any },
11
- S = { [key: string]: (...args: any[]) => any }
12
- > = ({
13
- new (): {
14
- $props: P & E,
15
- $slots: S
16
- }
17
- } & {
18
- install(app: App): void
19
- })
20
-
21
- /**
22
- * 组件配置
23
- */
24
- export type DefineVxeComponentOptions<P, E> = DefineComponent<P & E>
25
-
26
- /**
27
- * 组件实例
28
- */
29
- export type DefineVxeComponentInstance<P, M> = ComponentPublicInstance<P, M>
30
-
31
- /**
32
- * 组件通用的基础参数
33
- */
34
- export interface VxeComponentBaseOptions {
35
- xID: string
36
- }
37
-
38
- /**
39
- * 组件事件参数
40
- */
41
- export interface VxeComponentEventParams {
42
- $event: Event
43
- }
44
-
45
- /**
46
- * 全局事件默认参数
47
- */
48
- export interface VxeComponentEvent<E = Event> {
49
- $event: E
50
- stopPropagation(): void
51
- preventDefault(): void
52
- }
53
-
54
- /**
55
- * 组件尺寸类型
56
- */
57
- export type VxeComponentSizeType = null | '' | 'medium' | 'small' | 'mini'
58
-
59
- /**
60
- * 组件对齐方式
61
- */
62
- export type VxeComponentAlignType = null | '' | 'left' | 'right' | 'center'
63
-
64
- /**
65
- * 组件状态
66
- */
67
- export type VxeComponentStatusType = null | '' | 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'error' | 'perfect'
68
-
69
- /**
70
- * 组件样式类型
71
- */
72
- export type VxeComponentStyleType = Record<string, string | number>
73
-
74
- /**
75
- * 组件 className 类型
76
- */
77
- export type VxeComponentClassNameType = Record<string, boolean>
78
-
79
- /**
80
- * 组件插槽类型
81
- */
82
- export type VxeComponentSlotType = VNode | string
83
-
84
- /**
85
- * 权限码类型
86
- */
87
- export type VxeComponentPermissionCodeType = string | number
88
-
89
- /**
90
- * 权限码判断结果
91
- */
92
- export type VxeComponentPermissionResult = boolean | {
93
- visible: boolean
94
- disabled: boolean
95
- }
96
-
97
- /**
98
- * 权限码判断方法
99
- */
100
- export type VxeComponentPermissionMethod = (params: {
101
- code: VxeComponentPermissionCodeType
102
- }) => VxeComponentPermissionResult
103
-
104
- /**
105
- * 权限码信息
106
- */
107
- export interface VxeComponentPermissionInfo {
108
- code?: VxeComponentPermissionCodeType
109
- visible: boolean
110
- disabled: boolean
111
- }
1
+ import { App, VNode, ComponentPublicInstance, DefineComponent } from 'vue'
2
+
3
+ /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
4
+
5
+ /**
6
+ * 组件类型
7
+ */
8
+ export type DefineVxeComponentApp<
9
+ P = { [key: string]: any },
10
+ E = { [key: string]: any },
11
+ S = { [key: string]: (...args: any[]) => any }
12
+ > = ({
13
+ new (): {
14
+ $props: P & E,
15
+ $slots: S
16
+ }
17
+ } & {
18
+ install(app: App): void
19
+ })
20
+
21
+ /**
22
+ * 组件配置
23
+ */
24
+ export type DefineVxeComponentOptions<P, E> = DefineComponent<P & E>
25
+
26
+ /**
27
+ * 组件实例
28
+ */
29
+ export type DefineVxeComponentInstance<P, M> = ComponentPublicInstance<P, M>
30
+
31
+ /**
32
+ * 组件通用的基础参数
33
+ */
34
+ export interface VxeComponentBaseOptions {
35
+ xID: string
36
+ }
37
+
38
+ /**
39
+ * 组件事件参数
40
+ */
41
+ export interface VxeComponentEventParams {
42
+ $event: Event
43
+ }
44
+
45
+ /**
46
+ * 全局事件默认参数
47
+ */
48
+ export interface VxeComponentEvent<E = Event> {
49
+ $event: E
50
+ stopPropagation(): void
51
+ preventDefault(): void
52
+ }
53
+
54
+ /**
55
+ * 组件尺寸类型
56
+ */
57
+ export type VxeComponentSizeType = null | '' | 'medium' | 'small' | 'mini'
58
+
59
+ /**
60
+ * 组件对齐方式
61
+ */
62
+ export type VxeComponentAlignType = null | '' | 'left' | 'right' | 'center'
63
+
64
+ /**
65
+ * 组件状态
66
+ */
67
+ export type VxeComponentStatusType = null | '' | 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'error' | 'perfect'
68
+
69
+ /**
70
+ * 组件样式类型
71
+ */
72
+ export type VxeComponentStyleType = Record<string, string | number>
73
+
74
+ /**
75
+ * 组件 className 类型
76
+ */
77
+ export type VxeComponentClassNameType = Record<string, boolean>
78
+
79
+ /**
80
+ * 组件插槽类型
81
+ */
82
+ export type VxeComponentSlotType = VNode | string
83
+
84
+ /**
85
+ * 权限码类型
86
+ */
87
+ export type VxeComponentPermissionCodeType = string | number
88
+
89
+ /**
90
+ * 权限码判断结果
91
+ */
92
+ export type VxeComponentPermissionResult = boolean | {
93
+ visible: boolean
94
+ disabled: boolean
95
+ }
96
+
97
+ /**
98
+ * 权限码判断方法
99
+ */
100
+ export type VxeComponentPermissionMethod = (params: {
101
+ code: VxeComponentPermissionCodeType
102
+ }) => VxeComponentPermissionResult
103
+
104
+ /**
105
+ * 权限码信息
106
+ */
107
+ export interface VxeComponentPermissionInfo {
108
+ code?: VxeComponentPermissionCodeType
109
+ visible: boolean
110
+ disabled: boolean
111
+ }
@@ -1,2 +1,2 @@
1
- export * from './util'
2
- export * from './common'
1
+ export * from './util'
2
+ export * from './common'
@@ -1,4 +1,4 @@
1
- /**
2
- * 取出对象值类型
3
- */
4
- export type ValueOf<T> = T extends any[] ? T[number] : T[keyof T]
1
+ /**
2
+ * 取出对象值类型
3
+ */
4
+ export type ValueOf<T> = T extends any[] ? T[number] : T[keyof T]