@pungfe/element 0.5.1 → 0.5.4
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/README.md +5 -0
- package/dist/{advance-CB0gWtLg.js → advance-BY7MMpvJ.js} +126 -126
- package/dist/{advance-D-QeX-GV.cjs → advance-C7GMTyVo.cjs} +1 -1
- package/dist/advance.cjs +1 -1
- package/dist/advance.d.ts +1 -1
- package/dist/advance.js +1 -1
- package/dist/{basic-C6A5vPPP.js → basic-7ajmoMou.js} +68 -63
- package/dist/basic-Ian9axAR.cjs +1 -0
- package/dist/basic.cjs +1 -1
- package/dist/basic.d.ts +1 -1
- package/dist/basic.js +1 -1
- package/dist/components/advance/XButtonAsync.vue.d.ts +7 -11
- package/dist/components/advance/XButtonConfirm.vue.d.ts +7 -11
- package/dist/components/advance/XCascaderRequest.vue.d.ts +28 -23
- package/dist/components/advance/XFormFlex.vue.d.ts +12 -8
- package/dist/components/advance/XFormRequestNext.vue.d.ts +26 -21
- package/dist/components/advance/XRequest.vue.d.ts +28 -32
- package/dist/components/advance/XSelectRequest.vue.d.ts +26 -21
- package/dist/components/advance/XTableConfig.vue.d.ts +23 -18
- package/dist/components/advance/XTableFlex.vue.d.ts +17 -13
- package/dist/components/advance/XTableRequestConfigNext.vue.d.ts +37 -32
- package/dist/components/advance/XTableRequestNext.vue.d.ts +41 -36
- package/dist/components/advance/XUploadOssNext.vue.d.ts +16 -14
- package/dist/components/basic/Button.vue.d.ts +8 -12
- package/dist/components/basic/Cascader.vue.d.ts +18 -13
- package/dist/components/basic/Checkbox.vue.d.ts +9 -7
- package/dist/components/basic/ConfigProvider.vue.d.ts +7 -11
- package/dist/components/basic/DatePicker.vue.d.ts +20 -14
- package/dist/components/basic/Dialog.vue.d.ts +18 -26
- package/dist/components/basic/Form.vue.d.ts +11 -6
- package/dist/components/basic/FormItem.vue.d.ts +12 -10
- package/dist/components/basic/Input.vue.d.ts +23 -23
- package/dist/components/basic/InputNumber.vue.d.ts +12 -19
- package/dist/components/basic/Pagination.vue.d.ts +19 -22
- package/dist/components/basic/Select.vue.d.ts +28 -23
- package/dist/components/basic/TabPane.vue.d.ts +7 -11
- package/dist/components/basic/Table.vue.d.ts +46 -40
- package/dist/components/basic/Tabs.vue.d.ts +23 -21
- package/dist/components/basic/Upload.vue.d.ts +18 -31
- package/dist/constants/index.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/{locales-Ci_7wNxx.js → locales-1sqaDY76.js} +463 -447
- package/dist/locales-BCty7For.cjs +1 -0
- package/dist/locales.cjs +1 -1
- package/dist/locales.d.ts +2 -2
- package/dist/locales.js +2 -2
- package/dist/resolver.cjs +1 -1
- package/dist/resolver.js +5 -1
- package/dist/style.css +2 -2
- package/dist/types.d.ts +17 -17
- package/package.json +38 -29
- package/dist/basic-pOPUQrFu.cjs +0 -1
- package/dist/locales-CIRzA_S9.cjs +0 -1
|
@@ -6,21 +6,20 @@ export interface XFormItemProps {
|
|
|
6
6
|
validator?: () => string | void;
|
|
7
7
|
}
|
|
8
8
|
export interface XFormItemValidation {
|
|
9
|
-
id?: string;
|
|
10
9
|
clearValidate: () => void;
|
|
10
|
+
id?: string;
|
|
11
11
|
label?: string;
|
|
12
12
|
required?: boolean;
|
|
13
13
|
validate: () => boolean;
|
|
14
14
|
validator?: () => string | void;
|
|
15
15
|
}
|
|
16
|
-
declare const
|
|
17
|
-
props:
|
|
18
|
-
|
|
16
|
+
declare const __VLS_export: <D extends object>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
17
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<XFormItemProps> & (typeof globalThis extends {
|
|
18
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
19
|
+
} ? P : {});
|
|
20
|
+
expose: (exposed: {}) => void;
|
|
19
21
|
attrs: any;
|
|
20
|
-
slots:
|
|
21
|
-
default: () => VNodeChild;
|
|
22
|
-
label: () => VNodeChild;
|
|
23
|
-
}> & {
|
|
22
|
+
slots: {
|
|
24
23
|
default: () => VNodeChild;
|
|
25
24
|
label: () => VNodeChild;
|
|
26
25
|
};
|
|
@@ -28,7 +27,10 @@ declare const _default: <D extends object>(__VLS_props: NonNullable<Awaited<type
|
|
|
28
27
|
}>) => import('vue').VNode & {
|
|
29
28
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
30
29
|
};
|
|
30
|
+
declare const _default: typeof __VLS_export;
|
|
31
31
|
export default _default;
|
|
32
|
-
type __VLS_PrettifyLocal<T> = {
|
|
32
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
33
33
|
[K in keyof T]: T[K];
|
|
34
|
-
}
|
|
34
|
+
} : {
|
|
35
|
+
[K in keyof T as K]: T[K];
|
|
36
|
+
}) & {};
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import { InputProps } from 'element-plus';
|
|
2
2
|
import { VNode } from 'vue';
|
|
3
3
|
export interface XInputProps {
|
|
4
|
-
clearable?: InputProps['clearable'];
|
|
5
|
-
disabled?: InputProps['disabled'];
|
|
6
|
-
size?: InputProps['size'];
|
|
7
|
-
type?: InputProps['type'];
|
|
8
|
-
showPassword?: InputProps['showPassword'];
|
|
9
4
|
autocomplete?: InputProps['autocomplete'];
|
|
10
5
|
autosize?: InputProps['autosize'];
|
|
6
|
+
clearable?: InputProps['clearable'];
|
|
7
|
+
disabled?: InputProps['disabled'];
|
|
11
8
|
placeholder?: InputProps['placeholder'];
|
|
12
9
|
prefixIcon?: InputProps['prefixIcon'];
|
|
10
|
+
showPassword?: InputProps['showPassword'];
|
|
11
|
+
size?: InputProps['size'];
|
|
13
12
|
suffixIcon?: InputProps['suffixIcon'];
|
|
13
|
+
type?: InputProps['type'];
|
|
14
14
|
}
|
|
15
|
-
declare const
|
|
16
|
-
props: __VLS_PrettifyLocal<
|
|
17
|
-
readonly "onUpdate:modelValue"?: ((value: MV) => any) | undefined;
|
|
18
|
-
readonly onFocus?: ((e: FocusEvent) => any) | undefined;
|
|
19
|
-
readonly onBlur?: ((e: FocusEvent) => any) | undefined;
|
|
20
|
-
readonly onChange?: ((e: MV) => any) | undefined;
|
|
21
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onFocus" | "onBlur" | "onChange" | "onUpdate:modelValue"> & ({
|
|
15
|
+
declare const __VLS_export: <MV extends string | number>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
16
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<(XInputProps & {
|
|
22
17
|
modelValue?: MV;
|
|
23
|
-
}
|
|
24
|
-
|
|
18
|
+
}) & {
|
|
19
|
+
"onUpdate:modelValue"?: ((value: MV | undefined) => any) | undefined;
|
|
20
|
+
onFocus?: ((e: FocusEvent) => any) | undefined;
|
|
21
|
+
onBlur?: ((e: FocusEvent) => any) | undefined;
|
|
22
|
+
onChange?: ((e: MV) => any) | undefined;
|
|
23
|
+
}> & (typeof globalThis extends {
|
|
24
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
25
|
+
} ? P : {});
|
|
26
|
+
expose: (exposed: {}) => void;
|
|
25
27
|
attrs: any;
|
|
26
|
-
slots:
|
|
27
|
-
append: () => VNode;
|
|
28
|
-
prefix: () => VNode;
|
|
29
|
-
prepend: () => VNode;
|
|
30
|
-
suffix: () => VNode;
|
|
31
|
-
}> & {
|
|
28
|
+
slots: {
|
|
32
29
|
append: () => VNode;
|
|
33
30
|
prefix: () => VNode;
|
|
34
31
|
prepend: () => VNode;
|
|
35
32
|
suffix: () => VNode;
|
|
36
33
|
};
|
|
37
|
-
emit: (((evt: "focus", e: FocusEvent) => void) & ((evt: "blur", e: FocusEvent) => void) & ((evt: "change", e: MV) => void)) & ((
|
|
34
|
+
emit: (((evt: "focus", e: FocusEvent) => void) & ((evt: "blur", e: FocusEvent) => void) & ((evt: "change", e: MV) => void)) & ((event: "update:modelValue", value: MV | undefined) => void);
|
|
38
35
|
}>) => import('vue').VNode & {
|
|
39
36
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
40
37
|
};
|
|
38
|
+
declare const _default: typeof __VLS_export;
|
|
41
39
|
export default _default;
|
|
42
|
-
type __VLS_PrettifyLocal<T> = {
|
|
40
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
43
41
|
[K in keyof T]: T[K];
|
|
44
|
-
}
|
|
42
|
+
} : {
|
|
43
|
+
[K in keyof T as K]: T[K];
|
|
44
|
+
}) & {};
|
|
@@ -14,34 +14,27 @@ export interface XInputNumberProps {
|
|
|
14
14
|
stepStrictly?: InputNumberProps['stepStrictly'];
|
|
15
15
|
}
|
|
16
16
|
type __VLS_Props = XInputNumberProps;
|
|
17
|
-
type
|
|
17
|
+
type __VLS_Slots = {
|
|
18
|
+
prefix: () => VNode;
|
|
19
|
+
suffix: () => VNode;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_ModelProps = {
|
|
18
22
|
modelValue?: number;
|
|
19
|
-
} & __VLS_Props;
|
|
20
|
-
declare function __VLS_template(): {
|
|
21
|
-
attrs: Partial<{}>;
|
|
22
|
-
slots: Readonly<{
|
|
23
|
-
prefix: () => VNode;
|
|
24
|
-
suffix: () => VNode;
|
|
25
|
-
}> & {
|
|
26
|
-
prefix: () => VNode;
|
|
27
|
-
suffix: () => VNode;
|
|
28
|
-
};
|
|
29
|
-
refs: {};
|
|
30
|
-
rootEl: any;
|
|
31
23
|
};
|
|
32
|
-
type
|
|
33
|
-
declare const
|
|
34
|
-
"update:modelValue": (value: number) => any;
|
|
24
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
25
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
26
|
+
"update:modelValue": (value: number | undefined) => any;
|
|
35
27
|
focus: (e: FocusEvent) => any;
|
|
36
28
|
blur: (e: FocusEvent) => any;
|
|
37
29
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
38
|
-
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
30
|
+
"onUpdate:modelValue"?: ((value: number | undefined) => any) | undefined;
|
|
39
31
|
onFocus?: ((e: FocusEvent) => any) | undefined;
|
|
40
32
|
onBlur?: ((e: FocusEvent) => any) | undefined;
|
|
41
33
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
42
|
-
declare const
|
|
34
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
|
+
declare const _default: typeof __VLS_export;
|
|
43
36
|
export default _default;
|
|
44
|
-
type
|
|
37
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
45
38
|
new (): {
|
|
46
39
|
$slots: S;
|
|
47
40
|
};
|
|
@@ -3,41 +3,38 @@ export interface XPaginationConfig {
|
|
|
3
3
|
layout?: XPaginationProps['layout'];
|
|
4
4
|
}
|
|
5
5
|
export interface XPaginationProps {
|
|
6
|
-
pageSizes?: PaginationProps['pageSizes'];
|
|
7
6
|
background?: PaginationProps['background'];
|
|
8
|
-
|
|
7
|
+
defaultPageSize?: PaginationProps['defaultPageSize'];
|
|
9
8
|
layout?: PaginationProps['layout'];
|
|
9
|
+
pageSizes?: PaginationProps['pageSizes'];
|
|
10
|
+
size?: PaginationProps['size'];
|
|
10
11
|
total?: PaginationProps['total'];
|
|
11
|
-
defaultPageSize?: PaginationProps['defaultPageSize'];
|
|
12
12
|
}
|
|
13
13
|
type __VLS_Props = XPaginationProps;
|
|
14
|
-
type
|
|
14
|
+
type __VLS_ModelProps = {
|
|
15
15
|
'currentPage'?: number;
|
|
16
16
|
'pageSize'?: number;
|
|
17
|
-
} & __VLS_Props;
|
|
18
|
-
declare function __VLS_template(): {
|
|
19
|
-
attrs: Partial<{}>;
|
|
20
|
-
slots: {
|
|
21
|
-
default?(_: {}): any;
|
|
22
|
-
};
|
|
23
|
-
refs: {};
|
|
24
|
-
rootEl: any;
|
|
25
17
|
};
|
|
26
|
-
type
|
|
27
|
-
declare
|
|
28
|
-
|
|
18
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
19
|
+
declare var __VLS_11: {};
|
|
20
|
+
type __VLS_Slots = {} & {
|
|
21
|
+
default?: (props: typeof __VLS_11) => any;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
29
24
|
currentChange: (current: number) => any;
|
|
30
|
-
|
|
31
|
-
"update:
|
|
25
|
+
sizeChange: (size: number) => any;
|
|
26
|
+
"update:currentPage": (value: number | undefined) => any;
|
|
27
|
+
"update:pageSize": (value: number | undefined) => any;
|
|
32
28
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
33
|
-
onSizeChange?: ((size: number) => any) | undefined;
|
|
34
29
|
onCurrentChange?: ((current: number) => any) | undefined;
|
|
35
|
-
|
|
36
|
-
"onUpdate:
|
|
30
|
+
onSizeChange?: ((size: number) => any) | undefined;
|
|
31
|
+
"onUpdate:currentPage"?: ((value: number | undefined) => any) | undefined;
|
|
32
|
+
"onUpdate:pageSize"?: ((value: number | undefined) => any) | undefined;
|
|
37
33
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
38
|
-
declare const
|
|
34
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
|
+
declare const _default: typeof __VLS_export;
|
|
39
36
|
export default _default;
|
|
40
|
-
type
|
|
37
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
41
38
|
new (): {
|
|
42
39
|
$slots: S;
|
|
43
40
|
};
|
|
@@ -1,52 +1,57 @@
|
|
|
1
|
-
import { VNodeChild } from 'vue';
|
|
2
1
|
import { SelectProps } from 'element-plus';
|
|
2
|
+
import { VNodeChild } from 'vue';
|
|
3
|
+
export interface XSelectEvents<V> {
|
|
4
|
+
blur: [e: FocusEvent];
|
|
5
|
+
change: [value: V];
|
|
6
|
+
focus: [e: FocusEvent];
|
|
7
|
+
}
|
|
3
8
|
export interface XSelectOptionProps<V> {
|
|
4
9
|
disabled?: boolean;
|
|
5
10
|
label?: number | string;
|
|
6
|
-
value: V;
|
|
7
11
|
render?: VNodeChild;
|
|
12
|
+
value: V;
|
|
8
13
|
}
|
|
9
14
|
export interface XSelectProps<D, V> {
|
|
10
|
-
collapseTagsTooltip?: SelectProps['collapseTagsTooltip'];
|
|
11
|
-
defaultFirstOption?: SelectProps['defaultFirstOption'];
|
|
12
|
-
clearable?: SelectProps['clearable'];
|
|
13
15
|
allowCreate?: SelectProps['allowCreate'];
|
|
16
|
+
clearable?: SelectProps['clearable'];
|
|
14
17
|
collapseTags?: SelectProps['collapseTags'];
|
|
18
|
+
collapseTagsTooltip?: SelectProps['collapseTagsTooltip'];
|
|
15
19
|
data?: D[];
|
|
20
|
+
defaultFirstOption?: SelectProps['defaultFirstOption'];
|
|
16
21
|
disabled?: SelectProps['disabled'];
|
|
17
22
|
factory: (option: D) => XSelectOptionProps<V>;
|
|
18
23
|
filterable?: SelectProps['filterable'];
|
|
19
24
|
identify?: (value: V) => number | string;
|
|
20
25
|
loading?: SelectProps['loading'];
|
|
21
26
|
multiple?: SelectProps['multiple'];
|
|
27
|
+
placeholder?: SelectProps['placeholder'];
|
|
22
28
|
remote?: SelectProps['remote'];
|
|
23
29
|
remoteMethod?: (query: string) => void;
|
|
24
30
|
size?: SelectProps['size'];
|
|
25
31
|
supplement?: (lacks: V[]) => D[] | PromiseLike<D[]>;
|
|
26
|
-
placeholder?: SelectProps['placeholder'];
|
|
27
|
-
}
|
|
28
|
-
export interface XSelectEvents<V> {
|
|
29
|
-
blur: [e: FocusEvent];
|
|
30
|
-
change: [value: V];
|
|
31
|
-
focus: [e: FocusEvent];
|
|
32
32
|
}
|
|
33
|
-
declare const
|
|
34
|
-
props: __VLS_PrettifyLocal<
|
|
35
|
-
readonly "onUpdate:modelValue"?: ((value: MV) => any) | undefined;
|
|
36
|
-
readonly onFocus?: ((e: FocusEvent) => any) | undefined;
|
|
37
|
-
readonly onBlur?: ((e: FocusEvent) => any) | undefined;
|
|
38
|
-
readonly onChange?: ((value: V) => any) | undefined;
|
|
39
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onFocus" | "onBlur" | "onChange" | "onUpdate:modelValue"> & ({
|
|
33
|
+
declare const __VLS_export: <D, V, MV extends V | V[]>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
34
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<(XSelectProps<D, V> & {
|
|
40
35
|
modelValue?: MV;
|
|
41
|
-
}
|
|
42
|
-
|
|
36
|
+
}) & {
|
|
37
|
+
"onUpdate:modelValue"?: ((value: MV | undefined) => any) | undefined;
|
|
38
|
+
onFocus?: ((e: FocusEvent) => any) | undefined;
|
|
39
|
+
onBlur?: ((e: FocusEvent) => any) | undefined;
|
|
40
|
+
onChange?: ((value: V) => any) | undefined;
|
|
41
|
+
}> & (typeof globalThis extends {
|
|
42
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
43
|
+
} ? P : {});
|
|
44
|
+
expose: (exposed: {}) => void;
|
|
43
45
|
attrs: any;
|
|
44
46
|
slots: {};
|
|
45
|
-
emit: (((evt: "focus", e: FocusEvent) => void) & ((evt: "blur", e: FocusEvent) => void) & ((evt: "change", value: V) => void)) & ((
|
|
47
|
+
emit: (((evt: "focus", e: FocusEvent) => void) & ((evt: "blur", e: FocusEvent) => void) & ((evt: "change", value: V) => void)) & ((event: "update:modelValue", value: MV | undefined) => void);
|
|
46
48
|
}>) => import('vue').VNode & {
|
|
47
49
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
48
50
|
};
|
|
51
|
+
declare const _default: typeof __VLS_export;
|
|
49
52
|
export default _default;
|
|
50
|
-
type __VLS_PrettifyLocal<T> = {
|
|
53
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
51
54
|
[K in keyof T]: T[K];
|
|
52
|
-
}
|
|
55
|
+
} : {
|
|
56
|
+
[K in keyof T as K]: T[K];
|
|
57
|
+
}) & {};
|
|
@@ -10,22 +10,18 @@ export interface XTabPaneProps {
|
|
|
10
10
|
lazy?: TabPaneProps['lazy'];
|
|
11
11
|
name?: TabPaneProps['name'];
|
|
12
12
|
}
|
|
13
|
-
declare
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
default?(_: {}): any;
|
|
17
|
-
};
|
|
18
|
-
refs: {};
|
|
19
|
-
rootEl: any;
|
|
13
|
+
declare var __VLS_8: {};
|
|
14
|
+
type __VLS_Slots = {} & {
|
|
15
|
+
default?: (props: typeof __VLS_8) => any;
|
|
20
16
|
};
|
|
21
|
-
|
|
22
|
-
declare const __VLS_component: import('vue').DefineComponent<XTabPaneProps, {
|
|
17
|
+
declare const __VLS_base: import('vue').DefineComponent<XTabPaneProps, {
|
|
23
18
|
label: string | undefined;
|
|
24
19
|
name: string | number | undefined;
|
|
25
20
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<XTabPaneProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
26
|
-
declare const
|
|
21
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
27
23
|
export default _default;
|
|
28
|
-
type
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
25
|
new (): {
|
|
30
26
|
$slots: S;
|
|
31
27
|
};
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { TableColumnCtx, TableProps } from 'element-plus';
|
|
2
2
|
import { CSSProperties, VNode, VNodeChild } from 'vue';
|
|
3
|
-
export
|
|
4
|
-
/**
|
|
5
|
-
* 是否隐藏额外内容并在单元格悬停时使用 Tooltip 显示它们。这将影响全部列的展示
|
|
6
|
-
* @default false
|
|
7
|
-
*/
|
|
8
|
-
showOverflowTooltip?: TableProps<any>['showOverflowTooltip'];
|
|
9
|
-
border?: TableProps<any>['border'];
|
|
10
|
-
fit?: TableProps<any>['fit'];
|
|
11
|
-
emptyText?: TableProps<any>['emptyText'];
|
|
12
|
-
headerAlign?: string;
|
|
13
|
-
align?: string;
|
|
14
|
-
}
|
|
3
|
+
export type DefaultRow = Record<PropertyKey, unknown>;
|
|
15
4
|
export interface XTableColumnProps<D> {
|
|
5
|
+
align?: string;
|
|
6
|
+
columnKey?: string;
|
|
16
7
|
content?: (scope: {
|
|
17
8
|
index: number;
|
|
18
9
|
row: D;
|
|
@@ -21,15 +12,31 @@ export interface XTableColumnProps<D> {
|
|
|
21
12
|
header?: (scope: {
|
|
22
13
|
column: XTableColumnProps<D>;
|
|
23
14
|
}) => VNodeChild;
|
|
15
|
+
headerAlign?: string;
|
|
24
16
|
label?: string;
|
|
17
|
+
minWidth?: number;
|
|
25
18
|
prop?: string;
|
|
26
19
|
selectable?: (row: D, index: number) => boolean;
|
|
27
20
|
type?: 'index' | 'selection';
|
|
28
21
|
width?: number;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
headerAlign?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface XTableConfig {
|
|
32
24
|
align?: string;
|
|
25
|
+
border?: TableProps<DefaultRow>['border'];
|
|
26
|
+
emptyText?: TableProps<DefaultRow>['emptyText'];
|
|
27
|
+
fit?: TableProps<DefaultRow>['fit'];
|
|
28
|
+
headerAlign?: string;
|
|
29
|
+
/**
|
|
30
|
+
* 是否隐藏额外内容并在单元格悬停时使用 Tooltip 显示它们。这将影响全部列的展示
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
showOverflowTooltip?: TableProps<DefaultRow>['showOverflowTooltip'];
|
|
34
|
+
}
|
|
35
|
+
export interface XTableEvents<D> {
|
|
36
|
+
headerDragend: [newWidth: number, oldWidth: number, column: TableColumnCtx];
|
|
37
|
+
rowClick: [row: D];
|
|
38
|
+
rowDblclick: [row: D];
|
|
39
|
+
selectionChange: [rows: D[]];
|
|
33
40
|
}
|
|
34
41
|
export interface XTableProps<D> extends XTableConfig {
|
|
35
42
|
cellClassName?: ((scope: {
|
|
@@ -46,48 +53,44 @@ export interface XTableProps<D> extends XTableConfig {
|
|
|
46
53
|
}) => CSSProperties) | CSSProperties;
|
|
47
54
|
columns?: XTableColumnProps<D>[];
|
|
48
55
|
data?: D[];
|
|
49
|
-
height?: TableProps<
|
|
56
|
+
height?: TableProps<DefaultRow>['height'];
|
|
50
57
|
rowClassName?: ((scope: {
|
|
51
58
|
row: D;
|
|
52
59
|
rowIndex: number;
|
|
53
60
|
}) => string) | string;
|
|
61
|
+
rowKey?: (scope: {
|
|
62
|
+
row: D;
|
|
63
|
+
}) => string;
|
|
54
64
|
rowStyle?: ((scope: {
|
|
55
65
|
row: D;
|
|
56
66
|
rowIndex: number;
|
|
57
67
|
}) => CSSProperties) | CSSProperties;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}) => string;
|
|
61
|
-
showSummary?: TableProps<any>['showSummary'];
|
|
62
|
-
size?: TableProps<any>['size'];
|
|
68
|
+
showSummary?: TableProps<DefaultRow>['showSummary'];
|
|
69
|
+
size?: TableProps<DefaultRow>['size'];
|
|
63
70
|
spanMethod?: (scope: {
|
|
64
71
|
column: TableColumnCtx;
|
|
65
72
|
columnIndex: number;
|
|
66
73
|
row: D;
|
|
67
74
|
rowIndex: number;
|
|
68
|
-
}) =>
|
|
75
|
+
}) => {
|
|
69
76
|
colspan: number;
|
|
70
77
|
rowspan: number;
|
|
71
|
-
};
|
|
78
|
+
} | number[] | undefined;
|
|
72
79
|
summaryMethod?: (scope: {
|
|
73
80
|
columns: TableColumnCtx[];
|
|
74
81
|
data: D[];
|
|
75
82
|
}) => (string | VNode)[];
|
|
76
83
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
readonly onRowDblclick?: ((row: D) => any) | undefined;
|
|
88
|
-
readonly onSelectionChange?: ((rows: D[]) => any) | undefined;
|
|
89
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onHeaderDragend" | "onRowClick" | "onRowDblclick" | "onSelectionChange"> & XTableProps<D> & Partial<{}>> & import('vue').PublicProps;
|
|
90
|
-
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
84
|
+
declare const __VLS_export: <D>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
85
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<XTableProps<D> & {
|
|
86
|
+
onHeaderDragend?: ((newWidth: number, oldWidth: number, column: TableColumnCtx) => any) | undefined;
|
|
87
|
+
onRowClick?: ((row: D) => any) | undefined;
|
|
88
|
+
onRowDblclick?: ((row: D) => any) | undefined;
|
|
89
|
+
onSelectionChange?: ((rows: D[]) => any) | undefined;
|
|
90
|
+
}> & (typeof globalThis extends {
|
|
91
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
92
|
+
} ? P : {});
|
|
93
|
+
expose: (exposed: import('vue').ShallowUnwrapRef<{
|
|
91
94
|
clearSelection: () => void | undefined;
|
|
92
95
|
doLayout: () => void | undefined;
|
|
93
96
|
getSelectionRows: () => D[];
|
|
@@ -97,14 +100,17 @@ declare const _default: <D>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
97
100
|
setScrollTop: (top: number) => void | undefined;
|
|
98
101
|
toggleAllSelection: () => void | undefined;
|
|
99
102
|
toggleRowSelection: (row: D, selected?: boolean, ignoreSelectable?: boolean) => void | undefined;
|
|
100
|
-
}>)
|
|
103
|
+
}>) => void;
|
|
101
104
|
attrs: any;
|
|
102
105
|
slots: {};
|
|
103
106
|
emit: ((evt: "headerDragend", newWidth: number, oldWidth: number, column: TableColumnCtx) => void) & ((evt: "rowClick", row: D) => void) & ((evt: "rowDblclick", row: D) => void) & ((evt: "selectionChange", rows: D[]) => void);
|
|
104
107
|
}>) => import('vue').VNode & {
|
|
105
108
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
106
109
|
};
|
|
110
|
+
declare const _default: typeof __VLS_export;
|
|
107
111
|
export default _default;
|
|
108
|
-
type __VLS_PrettifyLocal<T> = {
|
|
112
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
109
113
|
[K in keyof T]: T[K];
|
|
110
|
-
}
|
|
114
|
+
} : {
|
|
115
|
+
[K in keyof T as K]: T[K];
|
|
116
|
+
}) & {};
|
|
@@ -1,39 +1,41 @@
|
|
|
1
1
|
import { TabsProps } from 'element-plus';
|
|
2
2
|
import { VNodeChild } from 'vue';
|
|
3
|
+
export interface XTabsEvents<V> {
|
|
4
|
+
change: [name: V];
|
|
5
|
+
edit: [name: V, action: 'add' | 'remove'];
|
|
6
|
+
remove: [name: V];
|
|
7
|
+
}
|
|
3
8
|
export interface XTabsProps {
|
|
4
9
|
addable?: TabsProps['addable'];
|
|
5
10
|
editable?: TabsProps['editable'];
|
|
6
11
|
tabPosition?: TabsProps['tabPosition'];
|
|
7
12
|
type?: TabsProps['type'];
|
|
8
13
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
remove: [name: V];
|
|
12
|
-
edit: [name: V, action: 'remove' | 'add'];
|
|
13
|
-
}
|
|
14
|
-
declare const _default: <V extends string | number>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
15
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
16
|
-
readonly "onUpdate:modelValue"?: ((value: V) => any) | undefined;
|
|
17
|
-
readonly onChange?: ((name: V) => any) | undefined;
|
|
18
|
-
readonly onRemove?: ((name: V) => any) | undefined;
|
|
19
|
-
readonly onEdit?: ((name: V, action: "add" | "remove") => any) | undefined;
|
|
20
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onChange" | "onUpdate:modelValue" | "onRemove" | "onEdit"> & ({
|
|
14
|
+
declare const __VLS_export: <V extends string | number>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
15
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<(XTabsProps & {
|
|
21
16
|
modelValue?: V;
|
|
22
|
-
}
|
|
23
|
-
|
|
17
|
+
}) & {
|
|
18
|
+
"onUpdate:modelValue"?: ((value: V | undefined) => any) | undefined;
|
|
19
|
+
onChange?: ((name: V) => any) | undefined;
|
|
20
|
+
onRemove?: ((name: V) => any) | undefined;
|
|
21
|
+
onEdit?: ((name: V, action: "add" | "remove") => any) | undefined;
|
|
22
|
+
}> & (typeof globalThis extends {
|
|
23
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
24
|
+
} ? P : {});
|
|
25
|
+
expose: (exposed: {}) => void;
|
|
24
26
|
attrs: any;
|
|
25
|
-
slots:
|
|
26
|
-
default: () => VNodeChild;
|
|
27
|
+
slots: {
|
|
27
28
|
addIcon: () => VNodeChild;
|
|
28
|
-
}> & {
|
|
29
29
|
default: () => VNodeChild;
|
|
30
|
-
addIcon: () => VNodeChild;
|
|
31
30
|
};
|
|
32
|
-
emit: (((evt: "change", name: V) => void) & ((evt: "remove", name: V) => void) & ((evt: "edit", name: V, action: "add" | "remove") => void)) & ((
|
|
31
|
+
emit: (((evt: "change", name: V) => void) & ((evt: "remove", name: V) => void) & ((evt: "edit", name: V, action: "add" | "remove") => void)) & ((event: "update:modelValue", value: V | undefined) => void);
|
|
33
32
|
}>) => import('vue').VNode & {
|
|
34
33
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
35
34
|
};
|
|
35
|
+
declare const _default: typeof __VLS_export;
|
|
36
36
|
export default _default;
|
|
37
|
-
type __VLS_PrettifyLocal<T> = {
|
|
37
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
38
38
|
[K in keyof T]: T[K];
|
|
39
|
-
}
|
|
39
|
+
} : {
|
|
40
|
+
[K in keyof T as K]: T[K];
|
|
41
|
+
}) & {};
|
|
@@ -1,46 +1,33 @@
|
|
|
1
1
|
import { UploadFile, UploadProps } from 'element-plus';
|
|
2
2
|
import { VNodeChild } from 'vue';
|
|
3
3
|
export interface XUploadProps {
|
|
4
|
-
action?: UploadProps['action'];
|
|
5
4
|
accept?: UploadProps['accept'];
|
|
5
|
+
action?: UploadProps['action'];
|
|
6
|
+
beforeUpload?: UploadProps['beforeUpload'];
|
|
6
7
|
data?: UploadProps['data'];
|
|
7
8
|
disabled?: UploadProps['disabled'];
|
|
8
|
-
limit?: UploadProps['limit'];
|
|
9
|
-
showFileList?: UploadProps['showFileList'];
|
|
10
9
|
fileList?: UploadProps['fileList'];
|
|
10
|
+
limit?: UploadProps['limit'];
|
|
11
11
|
multiple?: UploadProps['multiple'];
|
|
12
|
-
beforeUpload?: UploadProps['beforeUpload'];
|
|
13
|
-
onSuccess?: UploadProps['onSuccess'];
|
|
14
|
-
onRemove?: UploadProps['onRemove'];
|
|
15
12
|
onPreview?: UploadProps['onPreview'];
|
|
13
|
+
onRemove?: UploadProps['onRemove'];
|
|
14
|
+
onSuccess?: UploadProps['onSuccess'];
|
|
15
|
+
showFileList?: UploadProps['showFileList'];
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
tip: () => VNodeChild;
|
|
26
|
-
trigger: () => VNodeChild;
|
|
27
|
-
}> & {
|
|
28
|
-
default: () => VNodeChild;
|
|
29
|
-
file: (scope: {
|
|
30
|
-
file: UploadFile;
|
|
31
|
-
index: number;
|
|
32
|
-
}) => VNodeChild;
|
|
33
|
-
tip: () => VNodeChild;
|
|
34
|
-
trigger: () => VNodeChild;
|
|
35
|
-
};
|
|
36
|
-
refs: {};
|
|
37
|
-
rootEl: any;
|
|
17
|
+
type __VLS_Slots = {
|
|
18
|
+
default: () => VNodeChild;
|
|
19
|
+
file: (scope: {
|
|
20
|
+
file: UploadFile;
|
|
21
|
+
index: number;
|
|
22
|
+
}) => VNodeChild;
|
|
23
|
+
tip: () => VNodeChild;
|
|
24
|
+
trigger: () => VNodeChild;
|
|
38
25
|
};
|
|
39
|
-
|
|
40
|
-
declare const
|
|
41
|
-
declare const _default:
|
|
26
|
+
declare const __VLS_base: import('vue').DefineComponent<XUploadProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<XUploadProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
42
29
|
export default _default;
|
|
43
|
-
type
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
44
31
|
new (): {
|
|
45
32
|
$slots: S;
|
|
46
33
|
};
|
|
@@ -14,5 +14,5 @@ export declare const X_ELEMENT_IN_TABS: InjectionKey<boolean>;
|
|
|
14
14
|
export declare const X_ELEMENT_IN_TAB_PANE: InjectionKey<boolean>;
|
|
15
15
|
export declare const X_FORM_VALIDATIONS: InjectionKey<XFormItemValidation[]>;
|
|
16
16
|
export declare const X_FORM_ITEM_VALIDATION: InjectionKey<XFormItemValidation>;
|
|
17
|
-
export declare const X_TAB_PANE_NAME: InjectionKey<
|
|
17
|
+
export declare const X_TAB_PANE_NAME: InjectionKey<number | string | undefined>;
|
|
18
18
|
export declare const X_TABS_MODEL_UPDATE_HOOK: InjectionKey<EventHook>;
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./basic-Ian9axAR.cjs"),t=require("./advance-C7GMTyVo.cjs");let n=require("element-plus");require("vue");var r={button:{autoInsertSpace:!1},datePicker:{},pagination:{layout:`prev, pager, next, sizes, jumper, ->, total`},table:{showOverflowTooltip:!1}},i=(e={})=>({button:{...r.button,...e.button},datePicker:{...r.datePicker,...e.datePicker},oss:e.oss,pagination:{...r.pagination,...e.pagination},table:{...r.table,...e.table}}),a=(r,a={})=>{r[e.v]||(r[e.v]=!0,r.provide(e._,i(a.config)),r.directive(`loading`,n.vLoading),Object.entries({...e.t,...a.advance?t.t:{}}).forEach(([e,t])=>r.component(e,t)))},o=`0.5.4`,s=a;exports.default=s,exports.install=a,exports.version=o;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as e, t, v as n } from "./basic-
|
|
2
|
-
import { t as r } from "./advance-
|
|
1
|
+
import { _ as e, t, v as n } from "./basic-7ajmoMou.js";
|
|
2
|
+
import { t as r } from "./advance-BY7MMpvJ.js";
|
|
3
3
|
import { vLoading as i } from "element-plus";
|
|
4
4
|
import "vue";
|
|
5
5
|
//#region src/composables/useElementConfig.ts
|
|
@@ -31,6 +31,6 @@ var a = {
|
|
|
31
31
|
...t,
|
|
32
32
|
...s.advance ? r : {}
|
|
33
33
|
}).forEach(([e, t]) => a.component(e, t)));
|
|
34
|
-
}, c = "0.5.
|
|
34
|
+
}, c = "0.5.4", l = s;
|
|
35
35
|
//#endregion
|
|
36
36
|
export { l as default, s as install, c as version };
|