@vxe-ui/core 3.4.12 → 3.4.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 (59) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +29 -29
  3. package/es/src/core.js +1 -1
  4. package/es/src/log.js +1 -1
  5. package/lib/index.umd.js +173 -73
  6. package/lib/index.umd.min.js +1 -1
  7. package/lib/src/core.js +1 -1
  8. package/lib/src/core.min.js +1 -1
  9. package/lib/src/log.js +1 -1
  10. package/lib/src/log.min.js +1 -1
  11. package/package.json +80 -80
  12. package/packages/index.ts +147 -147
  13. package/packages/src/clipboard.ts +56 -56
  14. package/packages/src/commands.ts +56 -56
  15. package/packages/src/config.ts +30 -30
  16. package/packages/src/configStore.ts +8 -8
  17. package/packages/src/core.ts +11 -11
  18. package/packages/src/dataStore.ts +4 -4
  19. package/packages/src/event.ts +160 -160
  20. package/packages/src/formats.ts +56 -56
  21. package/packages/src/i18n.ts +66 -66
  22. package/packages/src/i18nStore.ts +16 -16
  23. package/packages/src/icon.ts +32 -32
  24. package/packages/src/iconStore.ts +3 -3
  25. package/packages/src/interceptor.ts +64 -64
  26. package/packages/src/log.ts +19 -19
  27. package/packages/src/menus.ts +56 -56
  28. package/packages/src/mixins.ts +39 -39
  29. package/packages/src/permission.ts +61 -61
  30. package/packages/src/renderer.ts +48 -48
  31. package/packages/src/resize.ts +89 -89
  32. package/packages/src/store.ts +47 -47
  33. package/packages/src/theme.ts +20 -20
  34. package/packages/src/themeStore.ts +7 -7
  35. package/packages/src/validators.ts +7 -7
  36. package/packages/src/vm.ts +10 -10
  37. package/types/core/clipboard.d.ts +22 -22
  38. package/types/core/commands.d.ts +19 -19
  39. package/types/core/components.d.ts +7 -7
  40. package/types/core/formats.d.ts +19 -19
  41. package/types/core/global-config.d.ts +70 -70
  42. package/types/core/global-data.d.ts +7 -7
  43. package/types/core/global-event.d.ts +47 -47
  44. package/types/core/global-icon.d.ts +10 -10
  45. package/types/core/global-lang.d.ts +27 -27
  46. package/types/core/global-resize.d.ts +3 -3
  47. package/types/core/global-theme.d.ts +1 -1
  48. package/types/core/index.d.ts +286 -286
  49. package/types/core/interceptor.d.ts +22 -22
  50. package/types/core/log.d.ts +8 -8
  51. package/types/core/menus.d.ts +19 -19
  52. package/types/core/mixins.d.ts +16 -16
  53. package/types/core/permission.d.ts +10 -10
  54. package/types/core/renderer.d.ts +14 -14
  55. package/types/core/validators.d.ts +19 -19
  56. package/types/index.d.ts +13 -13
  57. package/types/tool/common.d.ts +143 -143
  58. package/types/tool/index.d.ts +2 -2
  59. package/types/tool/util.d.ts +4 -4
@@ -1,16 +1,16 @@
1
- import { Vue, ExtendedVue } from 'vue/types/vue'
2
- import { VxeComponentSizeType, VxeComponentPermissionInfo } from '../tool'
3
-
4
- /* eslint-disable @typescript-eslint/ban-types */
5
-
6
- /**
7
- * 通用方法
8
- */
9
- export interface VxeGlobalUseMixins {
10
- sizeMixin: ExtendedVue<Vue, {}, {}, {
11
- computeSize: VxeComponentSizeType
12
- }, Record<string, any>>
13
- permissionMixin: ExtendedVue<Vue, {}, {}, {
14
- computePermissionInfo: VxeComponentPermissionInfo
15
- }, Record<string, any>>
16
- }
1
+ import { Vue, ExtendedVue } from 'vue/types/vue'
2
+ import { VxeComponentSizeType, VxeComponentPermissionInfo } from '../tool'
3
+
4
+ /* eslint-disable @typescript-eslint/ban-types */
5
+
6
+ /**
7
+ * 通用方法
8
+ */
9
+ export interface VxeGlobalUseMixins {
10
+ sizeMixin: ExtendedVue<Vue, {}, {}, {
11
+ computeSize: VxeComponentSizeType
12
+ }, Record<string, any>>
13
+ permissionMixin: ExtendedVue<Vue, {}, {}, {
14
+ computePermissionInfo: VxeComponentPermissionInfo
15
+ }, Record<string, any>>
16
+ }
@@ -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 | null | undefined): 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 | null | undefined): void
14
+ }
@@ -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,143 +1,143 @@
1
- import Vue, { VueConstructor, VNode } from 'vue'
2
- import { CombinedVueInstance, ExtendedVue } from 'vue/types/vue'
3
-
4
- /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
5
-
6
- type SafeProp<T> = {
7
- [K in keyof T]: T[K] extends string ? T[K] : any
8
- }
9
-
10
- /**
11
- * 定义组件
12
- */
13
- export type DefineVxeComponentApp<
14
- P = any,
15
- E = { [key: string]: any },
16
- S = { [key: string]: (...args: any[]) => any },
17
- M = { [key: string]: any }
18
- > = ({
19
- new (): P & E & M & {
20
- $slots: S
21
- }
22
- } & {
23
- props: SafeProp<Required<P>>
24
- install(app: VueConstructor): void
25
- })
26
-
27
- /**
28
- * 全局组件
29
- */
30
- export type DefineVxeGlobalComponent<
31
- P = any,
32
- E = { [key: string]: any },
33
- S = { [key: string]: (...args: any[]) => any }
34
- > = ({
35
- new (): P & E & {
36
- $slots: S
37
- }
38
- } & {
39
- install(app: VueConstructor): void
40
- })
41
-
42
- export type DefineVxeComponentOptions<Props> = ExtendedVue<Vue, object, object, object, Props>
43
-
44
- export type DefineVxeComponentInstance<Data, Props, Computed, Methods> = CombinedVueInstance<Vue, VxeComponentBaseOptions & Data, Methods, Computed, Props>
45
-
46
- /**
47
- * 组件通用的基础参数
48
- */
49
- export interface VxeComponentBaseOptions {
50
- xID: string
51
- }
52
-
53
- /**
54
- * 组件事件参数
55
- */
56
- export interface VxeComponentEventParams {
57
- $event: Event
58
- }
59
-
60
- /**
61
- * 全局事件默认参数
62
- */
63
- export interface VxeComponentEvent<E = Event> {
64
- $event: E
65
- stopPropagation(): void
66
- preventDefault(): void
67
- }
68
-
69
- /**
70
- * 组件尺寸类型
71
- */
72
- export type VxeComponentSizeType = null | '' | 'large' | 'medium' | 'small' | 'mini'
73
-
74
- /**
75
- * 组件对齐方式
76
- */
77
- export type VxeComponentAlignType = null | '' | 'left' | 'right' | 'center'
78
-
79
- /**
80
- * 组件状态
81
- */
82
- export type VxeComponentStatusType = null | '' | 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'error' | 'perfect'
83
-
84
- /**
85
- * 组件样式类型
86
- */
87
- export type VxeComponentStyleType = Record<string, string | number>
88
-
89
- /**
90
- * 组件 className 类型
91
- */
92
- export type VxeComponentClassNameType = Record<string, boolean>
93
-
94
- /**
95
- * 组件插槽类型
96
- */
97
- export type VxeComponentSlotType = VNode | string
98
-
99
- /**
100
- * 权限码类型
101
- */
102
- export type VxeComponentPermissionCodeType = string | number
103
-
104
- /**
105
- * 权限码判断结果
106
- */
107
- export type VxeComponentPermissionResult = boolean | {
108
- visible: boolean
109
- disabled: boolean
110
- }
111
-
112
- /**
113
- * 权限码判断方法
114
- */
115
- export type VxeComponentPermissionMethod = (params: {
116
- code: VxeComponentPermissionCodeType
117
- }) => VxeComponentPermissionResult
118
-
119
- /**
120
- * 权限码信息
121
- */
122
- export interface VxeComponentPermissionInfo {
123
- code?: VxeComponentPermissionCodeType
124
- visible: boolean
125
- disabled: boolean
126
- }
127
-
128
- type CamelToKebabRest<S extends string> = S extends `${infer First}${infer Rest}`? `${First extends Lowercase<First> ? '' : '-'}${Lowercase<First>}${CamelToKebabRest<Rest>}`: S
129
- type CamelToKebab<S extends string> = S extends `${infer First}${infer Rest}`? `${Lowercase<First>}${CamelToKebabRest<Rest>}`: S
130
-
131
- /**
132
- * 将带驼峰字符串转成字符串,例如: ProjectName 转为 project-name
133
- */
134
- export type VxeComponentKebabCaseKeys<T> = {
135
- [K in keyof T as K extends string ? CamelToKebab<K> : K]: T[K]
136
- }
137
-
138
- /**
139
- * 将指定的属性设置为必选类型
140
- */
141
- export type VxeWithRequired<T, K extends keyof T> = T & {
142
- [P in K]-?: T[P]
143
- }
1
+ import Vue, { VueConstructor, VNode } from 'vue'
2
+ import { CombinedVueInstance, ExtendedVue } from 'vue/types/vue'
3
+
4
+ /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
5
+
6
+ type SafeProp<T> = {
7
+ [K in keyof T]: T[K] extends string ? T[K] : any
8
+ }
9
+
10
+ /**
11
+ * 定义组件
12
+ */
13
+ export type DefineVxeComponentApp<
14
+ P = any,
15
+ E = { [key: string]: any },
16
+ S = { [key: string]: (...args: any[]) => any },
17
+ M = { [key: string]: any }
18
+ > = ({
19
+ new (): P & E & M & {
20
+ $slots: S
21
+ }
22
+ } & {
23
+ props: SafeProp<Required<P>>
24
+ install(app: VueConstructor): void
25
+ })
26
+
27
+ /**
28
+ * 全局组件
29
+ */
30
+ export type DefineVxeGlobalComponent<
31
+ P = any,
32
+ E = { [key: string]: any },
33
+ S = { [key: string]: (...args: any[]) => any }
34
+ > = ({
35
+ new (): P & E & {
36
+ $slots: S
37
+ }
38
+ } & {
39
+ install(app: VueConstructor): void
40
+ })
41
+
42
+ export type DefineVxeComponentOptions<Props> = ExtendedVue<Vue, object, object, object, Props>
43
+
44
+ export type DefineVxeComponentInstance<Data, Props, Computed, Methods> = CombinedVueInstance<Vue, VxeComponentBaseOptions & Data, Methods, Computed, Props>
45
+
46
+ /**
47
+ * 组件通用的基础参数
48
+ */
49
+ export interface VxeComponentBaseOptions {
50
+ xID: string
51
+ }
52
+
53
+ /**
54
+ * 组件事件参数
55
+ */
56
+ export interface VxeComponentEventParams {
57
+ $event: Event
58
+ }
59
+
60
+ /**
61
+ * 全局事件默认参数
62
+ */
63
+ export interface VxeComponentEvent<E = Event> {
64
+ $event: E
65
+ stopPropagation(): void
66
+ preventDefault(): void
67
+ }
68
+
69
+ /**
70
+ * 组件尺寸类型
71
+ */
72
+ export type VxeComponentSizeType = null | '' | 'large' | 'medium' | 'small' | 'mini'
73
+
74
+ /**
75
+ * 组件对齐方式
76
+ */
77
+ export type VxeComponentAlignType = null | '' | 'left' | 'right' | 'center'
78
+
79
+ /**
80
+ * 组件状态
81
+ */
82
+ export type VxeComponentStatusType = null | '' | 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'error' | 'perfect'
83
+
84
+ /**
85
+ * 组件样式类型
86
+ */
87
+ export type VxeComponentStyleType = Record<string, string | number>
88
+
89
+ /**
90
+ * 组件 className 类型
91
+ */
92
+ export type VxeComponentClassNameType = Record<string, boolean>
93
+
94
+ /**
95
+ * 组件插槽类型
96
+ */
97
+ export type VxeComponentSlotType = VNode | string
98
+
99
+ /**
100
+ * 权限码类型
101
+ */
102
+ export type VxeComponentPermissionCodeType = string | number
103
+
104
+ /**
105
+ * 权限码判断结果
106
+ */
107
+ export type VxeComponentPermissionResult = boolean | {
108
+ visible: boolean
109
+ disabled: boolean
110
+ }
111
+
112
+ /**
113
+ * 权限码判断方法
114
+ */
115
+ export type VxeComponentPermissionMethod = (params: {
116
+ code: VxeComponentPermissionCodeType
117
+ }) => VxeComponentPermissionResult
118
+
119
+ /**
120
+ * 权限码信息
121
+ */
122
+ export interface VxeComponentPermissionInfo {
123
+ code?: VxeComponentPermissionCodeType
124
+ visible: boolean
125
+ disabled: boolean
126
+ }
127
+
128
+ type CamelToKebabRest<S extends string> = S extends `${infer First}${infer Rest}`? `${First extends Lowercase<First> ? '' : '-'}${Lowercase<First>}${CamelToKebabRest<Rest>}`: S
129
+ type CamelToKebab<S extends string> = S extends `${infer First}${infer Rest}`? `${Lowercase<First>}${CamelToKebabRest<Rest>}`: S
130
+
131
+ /**
132
+ * 将带驼峰字符串转成字符串,例如: ProjectName 转为 project-name
133
+ */
134
+ export type VxeComponentKebabCaseKeys<T> = {
135
+ [K in keyof T as K extends string ? CamelToKebab<K> : K]: T[K]
136
+ }
137
+
138
+ /**
139
+ * 将指定的属性设置为必选类型
140
+ */
141
+ export type VxeWithRequired<T, K extends keyof T> = T & {
142
+ [P in K]-?: T[P]
143
+ }
@@ -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]