@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.
- package/LICENSE +21 -21
- package/README.en.md +31 -31
- package/README.md +31 -31
- package/README.zh-TW.md +31 -31
- package/es/src/core.js +1 -1
- package/es/src/event.js +10 -8
- package/es/src/log.js +1 -1
- package/lib/index.umd.js +942 -145
- package/lib/index.umd.min.js +1 -1
- package/lib/src/clipboard.min.js +1 -1
- package/lib/src/commands.min.js +1 -1
- package/lib/src/config.min.js +1 -1
- package/lib/src/configStore.min.js +1 -1
- package/lib/src/core.js +1 -1
- package/lib/src/core.min.js +1 -1
- package/lib/src/dataStore.min.js +1 -1
- package/lib/src/event.js +10 -8
- package/lib/src/event.min.js +1 -1
- package/lib/src/formats.min.js +1 -1
- package/lib/src/hooks.min.js +1 -1
- package/lib/src/i18n.min.js +1 -1
- package/lib/src/i18nStore.min.js +1 -1
- package/lib/src/icon.min.js +1 -1
- package/lib/src/iconStore.min.js +1 -1
- package/lib/src/interceptor.min.js +1 -1
- package/lib/src/log.js +1 -1
- package/lib/src/log.min.js +1 -1
- package/lib/src/menus.min.js +1 -1
- package/lib/src/permission.min.js +1 -1
- package/lib/src/renderer.min.js +1 -1
- package/lib/src/resize.min.js +1 -1
- package/lib/src/store.min.js +1 -1
- package/lib/src/theme.min.js +1 -1
- package/lib/src/themeStore.min.js +1 -1
- package/lib/src/useFns.min.js +1 -1
- package/lib/src/validators.min.js +1 -1
- package/package.json +79 -79
- package/packages/index.ts +117 -117
- package/packages/src/clipboard.ts +53 -53
- package/packages/src/commands.ts +62 -62
- package/packages/src/config.ts +30 -30
- package/packages/src/configStore.ts +8 -8
- package/packages/src/core.ts +9 -9
- package/packages/src/dataStore.ts +4 -4
- package/packages/src/event.ts +127 -125
- package/packages/src/formats.ts +62 -62
- package/packages/src/hooks.ts +5 -5
- package/packages/src/i18n.ts +43 -43
- package/packages/src/i18nStore.ts +11 -11
- package/packages/src/icon.ts +16 -16
- package/packages/src/iconStore.ts +3 -3
- package/packages/src/interceptor.ts +65 -65
- package/packages/src/log.ts +19 -19
- package/packages/src/menus.ts +62 -62
- package/packages/src/permission.ts +61 -61
- package/packages/src/renderer.ts +50 -50
- package/packages/src/resize.ts +89 -89
- package/packages/src/store.ts +49 -49
- package/packages/src/theme.ts +20 -20
- package/packages/src/themeStore.ts +7 -7
- package/packages/src/useFns.ts +34 -34
- package/packages/src/validators.ts +9 -9
- package/types/core/clipboard.d.ts +13 -13
- package/types/core/commands.d.ts +19 -19
- package/types/core/components.d.ts +4 -4
- package/types/core/formats.d.ts +19 -19
- package/types/core/global-config.d.ts +62 -62
- package/types/core/global-data.d.ts +7 -7
- package/types/core/global-event.d.ts +39 -39
- package/types/core/global-icon.d.ts +6 -6
- package/types/core/global-lang.d.ts +22 -22
- package/types/core/global-resize.d.ts +3 -3
- package/types/core/global-theme.d.ts +1 -1
- package/types/core/hooks.d.ts +14 -14
- package/types/core/index.d.ts +255 -255
- package/types/core/interceptor.d.ts +22 -22
- package/types/core/log.d.ts +8 -8
- package/types/core/menus.d.ts +19 -19
- package/types/core/permission.d.ts +10 -10
- package/types/core/renderer.d.ts +14 -14
- package/types/core/useFn.d.ts +27 -27
- package/types/core/validators.d.ts +19 -19
- package/types/index.d.ts +13 -13
- package/types/tool/common.d.ts +111 -111
- package/types/tool/index.d.ts +2 -2
- package/types/tool/util.d.ts +4 -4
package/types/core/useFn.d.ts
CHANGED
|
@@ -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'
|
package/types/tool/common.d.ts
CHANGED
|
@@ -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
|
+
}
|
package/types/tool/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './util'
|
|
2
|
-
export * from './common'
|
|
1
|
+
export * from './util'
|
|
2
|
+
export * from './common'
|
package/types/tool/util.d.ts
CHANGED
|
@@ -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]
|