@vxe-ui/core 1.0.12 → 4.0.0

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 (77) 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/log.js +1 -1
  7. package/es/src/permission.js +36 -14
  8. package/lib/index.umd.js +59 -34
  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/core.js +1 -1
  13. package/lib/src/core.min.js +1 -1
  14. package/lib/src/event.min.js +1 -1
  15. package/lib/src/formats.min.js +1 -1
  16. package/lib/src/globalStore.min.js +1 -1
  17. package/lib/src/hooks.min.js +1 -1
  18. package/lib/src/i18n.min.js +1 -1
  19. package/lib/src/i18nStore.min.js +1 -1
  20. package/lib/src/iconStore.min.js +1 -1
  21. package/lib/src/interceptor.min.js +1 -1
  22. package/lib/src/log.js +1 -1
  23. package/lib/src/log.min.js +1 -1
  24. package/lib/src/menus.min.js +1 -1
  25. package/lib/src/permission.js +37 -15
  26. package/lib/src/permission.min.js +1 -1
  27. package/lib/src/renderer.min.js +1 -1
  28. package/lib/src/resize.min.js +1 -1
  29. package/lib/src/store.min.js +1 -1
  30. package/lib/src/themeStore.min.js +1 -1
  31. package/lib/src/useFns.min.js +1 -1
  32. package/lib/src/validators.min.js +1 -1
  33. package/package.json +78 -78
  34. package/packages/index.ts +4 -4
  35. package/packages/src/clipboard.ts +53 -53
  36. package/packages/src/commands.ts +62 -62
  37. package/packages/src/core.ts +167 -167
  38. package/packages/src/event.ts +113 -113
  39. package/packages/src/formats.ts +62 -62
  40. package/packages/src/globalStore.ts +8 -8
  41. package/packages/src/hooks.ts +5 -5
  42. package/packages/src/i18n.ts +19 -19
  43. package/packages/src/i18nStore.ts +11 -11
  44. package/packages/src/iconStore.ts +3 -3
  45. package/packages/src/interceptor.ts +65 -65
  46. package/packages/src/log.ts +19 -19
  47. package/packages/src/menus.ts +62 -62
  48. package/packages/src/permission.ts +61 -39
  49. package/packages/src/renderer.ts +50 -50
  50. package/packages/src/resize.ts +89 -89
  51. package/packages/src/store.ts +49 -49
  52. package/packages/src/themeStore.ts +7 -7
  53. package/packages/src/useFns.ts +34 -34
  54. package/packages/src/validators.ts +9 -9
  55. package/types/core/clipboard.d.ts +13 -13
  56. package/types/core/commands.d.ts +19 -19
  57. package/types/core/components.d.ts +4 -4
  58. package/types/core/formats.d.ts +19 -19
  59. package/types/core/global-config.d.ts +55 -55
  60. package/types/core/global-event.d.ts +39 -39
  61. package/types/core/global-icon.d.ts +6 -6
  62. package/types/core/global-lang.d.ts +1 -1
  63. package/types/core/global-resize.d.ts +3 -3
  64. package/types/core/global-theme.d.ts +1 -1
  65. package/types/core/hooks.d.ts +14 -14
  66. package/types/core/index.d.ts +224 -224
  67. package/types/core/interceptor.d.ts +22 -22
  68. package/types/core/log.d.ts +8 -8
  69. package/types/core/menus.d.ts +19 -19
  70. package/types/core/permission.d.ts +10 -10
  71. package/types/core/renderer.d.ts +14 -14
  72. package/types/core/useFn.d.ts +27 -27
  73. package/types/core/validators.d.ts +19 -19
  74. package/types/index.d.ts +10 -10
  75. package/types/tool/common.d.ts +99 -99
  76. package/types/tool/index.d.ts +2 -2
  77. package/types/tool/util.d.ts +4 -4
@@ -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,10 +1,10 @@
1
- import { VxeUIExport } from './core'
2
-
3
- declare global {
4
- interface Window {
5
- VxeUI: VxeUIExport;
6
- }
7
- }
8
-
9
- export * from './tool'
10
- export * from './core'
1
+ import { VxeUIExport } from './core'
2
+
3
+ declare global {
4
+ interface Window {
5
+ VxeUI: VxeUIExport;
6
+ }
7
+ }
8
+
9
+ export * from './tool'
10
+ export * from './core'
@@ -1,99 +1,99 @@
1
- import { App, VNode } from 'vue'
2
-
3
- /**
4
- * 定义组件
5
- */
6
- export type defineVxeComponent<
7
- P = { [key: string]: any },
8
- E = { [key: string]: any },
9
- S = { [key: string]: (...args: any[]) => any }
10
- > = ({
11
- new (): {
12
- $props: P & E,
13
- $slots: S
14
- }
15
- } & {
16
- install(app: App): void
17
- })
18
-
19
- /**
20
- * 组件通用的基础参数
21
- */
22
- export interface VxeComponentBaseOptions {
23
- xID: string
24
- }
25
-
26
- /**
27
- * 组件事件参数
28
- */
29
- export interface VxeComponentEventParams {
30
- $event: Event
31
- }
32
-
33
- /**
34
- * 全局事件默认参数
35
- */
36
- export interface VxeComponentEvent<E = Event> {
37
- $event: E
38
- stopPropagation(): void
39
- preventDefault(): void
40
- }
41
-
42
- /**
43
- * 组件尺寸类型
44
- */
45
- export type VxeComponentSizeType = null | '' | 'medium' | 'small' | 'mini'
46
-
47
- /**
48
- * 组件对齐方式
49
- */
50
- export type VxeComponentAlignType = null | '' | 'left' | 'right' | 'center'
51
-
52
- /**
53
- * 组件状态
54
- */
55
- export type VxeComponentStatusType = null | '' | 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'error' | 'perfect'
56
-
57
- /**
58
- * 组件样式类型
59
- */
60
- export type VxeComponentStyleType = Record<string, string | number>
61
-
62
- /**
63
- * 组件 className 类型
64
- */
65
- export type VxeComponentClassNameType = Record<string, boolean>
66
-
67
- /**
68
- * 组件插槽类型
69
- */
70
- export type VxeComponentSlotType = VNode | string | number
71
-
72
- /**
73
- * 权限码类型
74
- */
75
- export type VxeComponentPermissionCodeType = string | number
76
-
77
- /**
78
- * 权限码判断结果
79
- */
80
- export type VxeComponentPermissionResult = boolean | {
81
- visible: boolean
82
- disabled: boolean
83
- }
84
-
85
- /**
86
- * 权限码判断方法
87
- */
88
- export type VxeComponentPermissionMethod = (params: {
89
- code: VxeComponentPermissionCodeType
90
- }) => VxeComponentPermissionResult
91
-
92
- /**
93
- * 权限码信息
94
- */
95
- export interface VxeComponentPermissionInfo {
96
- code?: VxeComponentPermissionCodeType
97
- visible: boolean
98
- disabled: boolean
99
- }
1
+ import { App, VNode } from 'vue'
2
+
3
+ /**
4
+ * 定义组件
5
+ */
6
+ export type defineVxeComponent<
7
+ P = { [key: string]: any },
8
+ E = { [key: string]: any },
9
+ S = { [key: string]: (...args: any[]) => any }
10
+ > = ({
11
+ new (): {
12
+ $props: P & E,
13
+ $slots: S
14
+ }
15
+ } & {
16
+ install(app: App): void
17
+ })
18
+
19
+ /**
20
+ * 组件通用的基础参数
21
+ */
22
+ export interface VxeComponentBaseOptions {
23
+ xID: string
24
+ }
25
+
26
+ /**
27
+ * 组件事件参数
28
+ */
29
+ export interface VxeComponentEventParams {
30
+ $event: Event
31
+ }
32
+
33
+ /**
34
+ * 全局事件默认参数
35
+ */
36
+ export interface VxeComponentEvent<E = Event> {
37
+ $event: E
38
+ stopPropagation(): void
39
+ preventDefault(): void
40
+ }
41
+
42
+ /**
43
+ * 组件尺寸类型
44
+ */
45
+ export type VxeComponentSizeType = null | '' | 'medium' | 'small' | 'mini'
46
+
47
+ /**
48
+ * 组件对齐方式
49
+ */
50
+ export type VxeComponentAlignType = null | '' | 'left' | 'right' | 'center'
51
+
52
+ /**
53
+ * 组件状态
54
+ */
55
+ export type VxeComponentStatusType = null | '' | 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'error' | 'perfect'
56
+
57
+ /**
58
+ * 组件样式类型
59
+ */
60
+ export type VxeComponentStyleType = Record<string, string | number>
61
+
62
+ /**
63
+ * 组件 className 类型
64
+ */
65
+ export type VxeComponentClassNameType = Record<string, boolean>
66
+
67
+ /**
68
+ * 组件插槽类型
69
+ */
70
+ export type VxeComponentSlotType = VNode | string | number
71
+
72
+ /**
73
+ * 权限码类型
74
+ */
75
+ export type VxeComponentPermissionCodeType = string | number
76
+
77
+ /**
78
+ * 权限码判断结果
79
+ */
80
+ export type VxeComponentPermissionResult = boolean | {
81
+ visible: boolean
82
+ disabled: boolean
83
+ }
84
+
85
+ /**
86
+ * 权限码判断方法
87
+ */
88
+ export type VxeComponentPermissionMethod = (params: {
89
+ code: VxeComponentPermissionCodeType
90
+ }) => VxeComponentPermissionResult
91
+
92
+ /**
93
+ * 权限码信息
94
+ */
95
+ export interface VxeComponentPermissionInfo {
96
+ code?: VxeComponentPermissionCodeType
97
+ visible: boolean
98
+ disabled: boolean
99
+ }
@@ -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]