@vxe-ui/core 1.0.11 → 1.0.13

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 (75) 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/lib/index.umd.js +22 -19
  8. package/lib/index.umd.min.js +1 -1
  9. package/lib/src/clipboard.min.js +1 -1
  10. package/lib/src/commands.min.js +1 -1
  11. package/lib/src/core.js +1 -1
  12. package/lib/src/core.min.js +1 -1
  13. package/lib/src/event.min.js +1 -1
  14. package/lib/src/formats.min.js +1 -1
  15. package/lib/src/globalStore.min.js +1 -1
  16. package/lib/src/hooks.min.js +1 -1
  17. package/lib/src/i18n.min.js +1 -1
  18. package/lib/src/i18nStore.min.js +1 -1
  19. package/lib/src/iconStore.min.js +1 -1
  20. package/lib/src/interceptor.min.js +1 -1
  21. package/lib/src/log.js +1 -1
  22. package/lib/src/log.min.js +1 -1
  23. package/lib/src/menus.min.js +1 -1
  24. package/lib/src/permission.min.js +1 -1
  25. package/lib/src/renderer.min.js +1 -1
  26. package/lib/src/resize.min.js +1 -1
  27. package/lib/src/store.min.js +1 -1
  28. package/lib/src/themeStore.min.js +1 -1
  29. package/lib/src/useFns.min.js +1 -1
  30. package/lib/src/validators.min.js +1 -1
  31. package/package.json +78 -78
  32. package/packages/index.ts +4 -4
  33. package/packages/src/clipboard.ts +53 -53
  34. package/packages/src/commands.ts +62 -62
  35. package/packages/src/core.ts +167 -167
  36. package/packages/src/event.ts +113 -113
  37. package/packages/src/formats.ts +62 -62
  38. package/packages/src/globalStore.ts +8 -8
  39. package/packages/src/hooks.ts +5 -5
  40. package/packages/src/i18n.ts +19 -19
  41. package/packages/src/i18nStore.ts +11 -11
  42. package/packages/src/iconStore.ts +3 -3
  43. package/packages/src/interceptor.ts +65 -65
  44. package/packages/src/log.ts +19 -19
  45. package/packages/src/menus.ts +62 -62
  46. package/packages/src/permission.ts +39 -39
  47. package/packages/src/renderer.ts +50 -50
  48. package/packages/src/resize.ts +89 -89
  49. package/packages/src/store.ts +49 -49
  50. package/packages/src/themeStore.ts +7 -7
  51. package/packages/src/useFns.ts +34 -34
  52. package/packages/src/validators.ts +9 -9
  53. package/types/core/clipboard.d.ts +13 -13
  54. package/types/core/commands.d.ts +19 -19
  55. package/types/core/components.d.ts +4 -4
  56. package/types/core/formats.d.ts +19 -19
  57. package/types/core/global-config.d.ts +55 -55
  58. package/types/core/global-event.d.ts +39 -39
  59. package/types/core/global-icon.d.ts +6 -6
  60. package/types/core/global-lang.d.ts +1 -1
  61. package/types/core/global-resize.d.ts +3 -3
  62. package/types/core/global-theme.d.ts +1 -1
  63. package/types/core/hooks.d.ts +14 -14
  64. package/types/core/index.d.ts +224 -224
  65. package/types/core/interceptor.d.ts +22 -22
  66. package/types/core/log.d.ts +8 -8
  67. package/types/core/menus.d.ts +19 -19
  68. package/types/core/permission.d.ts +10 -10
  69. package/types/core/renderer.d.ts +14 -14
  70. package/types/core/useFn.d.ts +27 -27
  71. package/types/core/validators.d.ts +19 -19
  72. package/types/index.d.ts +10 -10
  73. package/types/tool/common.d.ts +99 -99
  74. package/types/tool/index.d.ts +2 -2
  75. package/types/tool/util.d.ts +4 -4
@@ -1,19 +1,19 @@
1
- /* eslint-disable no-use-before-define */
2
-
3
- export namespace VxeGlobalMenusHandles {
4
- export interface MenusOption {}
5
- }
6
-
7
- /**
8
- * 全局快捷菜单
9
- */
10
- export interface VxeGlobalMenus {
11
- mixin(opts: {
12
- [code: string]: VxeGlobalMenusHandles.MenusOption | ((params: any, event: Event) => any)
13
- }): VxeGlobalMenus
14
- has(code: string): boolean
15
- get(code: string): VxeGlobalMenusHandles.MenusOption
16
- add(code: string, options: VxeGlobalMenusHandles.MenusOption | ((params: any, event: Event) => any)): VxeGlobalMenus
17
- delete(code: string): void
18
- forEach(callback: (options: VxeGlobalMenusHandles.MenusOption, code: string) => void): void
19
- }
1
+ /* eslint-disable no-use-before-define */
2
+
3
+ export namespace VxeGlobalMenusHandles {
4
+ export interface MenusOption {}
5
+ }
6
+
7
+ /**
8
+ * 全局快捷菜单
9
+ */
10
+ export interface VxeGlobalMenus {
11
+ mixin(opts: {
12
+ [code: string]: VxeGlobalMenusHandles.MenusOption | ((params: any, event: Event) => any)
13
+ }): VxeGlobalMenus
14
+ has(code: string): boolean
15
+ get(code: string): VxeGlobalMenusHandles.MenusOption
16
+ add(code: string, options: VxeGlobalMenusHandles.MenusOption | ((params: any, event: Event) => any)): VxeGlobalMenus
17
+ delete(code: string): void
18
+ forEach(callback: (options: VxeGlobalMenusHandles.MenusOption, code: string) => void): void
19
+ }
@@ -1,10 +1,10 @@
1
- import { VxeComponentPermissionCodeType, VxeComponentPermissionInfo } from '../tool'
2
-
3
- /**
4
- * 全局权限控制
5
- */
6
- export interface VxeGlobalPermission {
7
- getCheckInfo (code: VxeComponentPermissionCodeType): VxeComponentPermissionInfo
8
- checkVisible (code: VxeComponentPermissionCodeType): boolean
9
- checkDisable (code: VxeComponentPermissionCodeType): boolean
10
- }
1
+ import { VxeComponentPermissionCodeType, VxeComponentPermissionInfo } from '../tool'
2
+
3
+ /**
4
+ * 全局权限控制
5
+ */
6
+ export interface VxeGlobalPermission {
7
+ getCheckInfo (code: VxeComponentPermissionCodeType): VxeComponentPermissionInfo
8
+ checkVisible (code: VxeComponentPermissionCodeType): boolean
9
+ checkDisable (code: VxeComponentPermissionCodeType): boolean
10
+ }
@@ -1,14 +1,14 @@
1
- export interface VxeGlobalRendererOptions {}
2
-
3
- export namespace VxeGlobalRendererHandles {}
4
-
5
- /**
6
- * 渲染器
7
- */
8
- export interface VxeGlobalRenderer {
9
- mixin(options: Record<string, VxeGlobalRendererOptions>): VxeGlobalRenderer
10
- get(name: string | null | undefined): VxeGlobalRendererOptions
11
- add(name: string, options: VxeGlobalRendererOptions): VxeGlobalRenderer
12
- forEach(callback: (item: VxeGlobalRendererOptions, name: string, renderMap: Record<string, VxeGlobalRendererOptions>) => void): VxeGlobalRenderer
13
- delete(name: string): void
14
- }
1
+ export interface VxeGlobalRendererOptions {}
2
+
3
+ export namespace VxeGlobalRendererHandles {}
4
+
5
+ /**
6
+ * 渲染器
7
+ */
8
+ export interface VxeGlobalRenderer {
9
+ mixin(options: Record<string, VxeGlobalRendererOptions>): VxeGlobalRenderer
10
+ get(name: string | null | undefined): VxeGlobalRendererOptions
11
+ add(name: string, options: VxeGlobalRendererOptions): VxeGlobalRenderer
12
+ forEach(callback: (item: VxeGlobalRendererOptions, name: string, renderMap: Record<string, VxeGlobalRendererOptions>) => void): VxeGlobalRenderer
13
+ delete(name: string): void
14
+ }
@@ -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,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]