@wyfex/ivue 0.15.0 → 0.17.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.
- package/dist/index.es.js +5 -5
- package/dist/index.umd.cjs +9 -9
- package/dist/ivue.css +1 -1
- package/dist/types/UseCrudTable/defaultExtConfig.d.ts +12 -0
- package/dist/types/UseCrudTable/index.vue.d.ts +44 -0
- package/dist/types/UseCrudTable/props.d.ts +18 -0
- package/dist/types/UseCrudTable/types.d.ts +26 -0
- package/dist/types/UseCrudTable/utils.d.ts +2 -0
- package/dist/types/UseElCheckbox/hook.d.ts +9 -0
- package/dist/types/UseElCheckbox/index.vue.d.ts +64 -0
- package/dist/types/UseElCheckbox/props.d.ts +27 -0
- package/dist/types/UseElCheckbox/types.d.ts +6 -0
- package/dist/types/{components/UseElDatePicker → UseElDatePicker}/index.vue.d.ts +3 -3
- package/dist/types/{components/UseElDatePicker → UseElDatePicker}/props.d.ts +1 -1
- package/dist/types/{components/UseElForm → UseElForm}/components/QueryForm.vue.d.ts +10 -4
- package/dist/types/{components/UseElForm → UseElForm}/components/useQueryColSpan.d.ts +1 -1
- package/dist/types/{components/UseElSelect → UseElSelect}/index.vue.d.ts +5 -5
- package/dist/types/{components/UseElSelect → UseElSelect}/props.d.ts +1 -1
- package/dist/types/{components/UseElTable → UseElTable}/defaultExtConfig.d.ts +0 -2
- package/dist/types/UseElTable/hooks/useTableHeightAdaptive.d.ts +11 -0
- package/dist/types/{components/index.d.ts → index.d.ts} +2 -0
- package/package.json +4 -4
- package/src/components/UseCrudTable/defaultExtConfig.ts +28 -0
- package/src/components/UseCrudTable/props.ts +32 -0
- package/src/components/UseCrudTable/types.ts +51 -0
- package/src/components/UseElCheckbox/props.ts +45 -0
- package/src/components/UseElCheckbox/types.ts +15 -0
- package/src/components/UseElConfigProvider/defaultExtConfig.ts +6 -0
- package/src/components/UseElForm/types.ts +1 -1
- package/src/components/UseElTable/defaultExtConfig.ts +3 -7
- package/src/components/UseElTable/types.ts +2 -6
- package/src/types/index.ts +4 -0
- package/dist/types/components/UseElTable/hooks/useTableHeightAdaptive.d.ts +0 -5
- package/dist/types/{components/UseElButton → UseElButton}/defaultExtConfig.d.ts +0 -0
- package/dist/types/{components/UseElButton → UseElButton}/hook.d.ts +0 -0
- package/dist/types/{components/UseElButton → UseElButton}/index.vue.d.ts +1 -1
- package/dist/types/{components/UseElButton → UseElButton}/props.d.ts +0 -0
- package/dist/types/{components/UseElButton → UseElButton}/types.d.ts +0 -0
- package/dist/types/{components/UseElConfigProvider → UseElConfigProvider}/defaultExtConfig.d.ts +0 -0
- package/dist/types/{components/UseElConfigProvider → UseElConfigProvider}/index.vue.d.ts +0 -0
- package/dist/types/{components/UseElConfigProvider → UseElConfigProvider}/props.d.ts +0 -0
- package/dist/types/{components/UseElConfigProvider → UseElConfigProvider}/types.d.ts +0 -0
- package/dist/types/{components/UseElDatePicker → UseElDatePicker}/types.d.ts +0 -0
- package/dist/types/{components/UseElDescriptions → UseElDescriptions}/hook.d.ts +0 -0
- package/dist/types/{components/UseElDescriptions → UseElDescriptions}/index.vue.d.ts +2 -2
- package/dist/types/{components/UseElDescriptions → UseElDescriptions}/props.d.ts +0 -0
- package/dist/types/{components/UseElDescriptions → UseElDescriptions}/types.d.ts +0 -0
- package/dist/types/{components/UseElDialog → UseElDialog}/hook.d.ts +0 -0
- package/dist/types/{components/UseElDialog → UseElDialog}/index.vue.d.ts +0 -0
- package/dist/types/{components/UseElDialog → UseElDialog}/props.d.ts +0 -0
- package/dist/types/{components/UseElDialog → UseElDialog}/types.d.ts +0 -0
- package/dist/types/{components/UseElDrawer → UseElDrawer}/hook.d.ts +0 -0
- package/dist/types/{components/UseElDrawer → UseElDrawer}/index.vue.d.ts +0 -0
- package/dist/types/{components/UseElDrawer → UseElDrawer}/props.d.ts +0 -0
- package/dist/types/{components/UseElDrawer → UseElDrawer}/types.d.ts +0 -0
- package/dist/types/{components/UseElForm → UseElForm}/components/RowForm.vue.d.ts +2 -2
- package/dist/types/{components/UseElForm → UseElForm}/components/controls/Cascader.vue.d.ts +0 -0
- package/dist/types/{components/UseElForm → UseElForm}/components/controls/DatePicker.vue.d.ts +0 -0
- package/dist/types/{components/UseElForm → UseElForm}/components/controls/Input.vue.d.ts +0 -0
- package/dist/types/{components/UseElForm → UseElForm}/components/controls/InputNumber.vue.d.ts +0 -0
- package/dist/types/{components/UseElForm → UseElForm}/components/controls/InputRange.vue.d.ts +0 -0
- package/dist/types/{components/UseElForm → UseElForm}/components/controls/Radio.vue.d.ts +0 -0
- package/dist/types/{components/UseElForm → UseElForm}/components/controls/Select.vue.d.ts +0 -0
- package/dist/types/{components/UseElForm → UseElForm}/components/controls/Switch.vue.d.ts +0 -0
- package/dist/types/{components/UseElForm → UseElForm}/components/controls/TimePicker.vue.d.ts +0 -0
- package/dist/types/{components/UseElForm → UseElForm}/components/controls/TimeSelect.vue.d.ts +0 -0
- package/dist/types/{components/UseElForm → UseElForm}/components/controls/TreeSelect.vue.d.ts +0 -0
- package/dist/types/{components/UseElForm → UseElForm}/hook.d.ts +0 -0
- package/dist/types/{components/UseElForm → UseElForm}/index.vue.d.ts +2 -2
- package/dist/types/{components/UseElForm → UseElForm}/props.d.ts +0 -0
- package/dist/types/{components/UseElForm → UseElForm}/types.d.ts +0 -0
- package/dist/types/{components/UseElInput → UseElInput}/index.vue.d.ts +3 -3
- package/dist/types/{components/UseElInput → UseElInput}/props.d.ts +0 -0
- package/dist/types/{components/UseElInput → UseElInput}/types.d.ts +0 -0
- package/dist/types/{components/UseElSelect → UseElSelect}/hook.d.ts +0 -0
- package/dist/types/{components/UseElSelect → UseElSelect}/types.d.ts +0 -0
- package/dist/types/{components/UseElSwitch → UseElSwitch}/index.vue.d.ts +0 -0
- package/dist/types/{components/UseElSwitch → UseElSwitch}/props.d.ts +0 -0
- package/dist/types/{components/UseElTable → UseElTable}/components/EditableCell.vue.d.ts +0 -0
- package/dist/types/{components/UseElTable → UseElTable}/components/RecTableColumn.vue.d.ts +1 -1
- package/dist/types/{components/UseElTable → UseElTable}/components/Selection.vue.d.ts +0 -0
- package/dist/types/{components/UseElTable → UseElTable}/components/Span.vue.d.ts +0 -0
- package/dist/types/{components/UseElTable → UseElTable}/hooks/useElTable.d.ts +0 -0
- package/dist/types/{components/UseElTable → UseElTable}/hooks/usePagination.d.ts +0 -0
- package/dist/types/{components/UseElTable → UseElTable}/hooks/useSelection.d.ts +0 -0
- package/dist/types/{components/UseElTable → UseElTable}/hooks/useTableColumnMinWidth.d.ts +0 -0
- package/dist/types/{components/UseElTable → UseElTable}/index.vue.d.ts +3 -3
- package/dist/types/{components/UseElTable → UseElTable}/props.d.ts +0 -0
- package/dist/types/{components/UseElTable → UseElTable}/types.d.ts +1 -1
- /package/dist/types/{components/UseElTable → UseElTable}/utils.d.ts +0 -0
- /package/dist/types/{components/UseIconfont → UseIconfont}/index.vue.d.ts +0 -0
- /package/dist/types/{components/UseIconfont → UseIconfont}/props.d.ts +0 -0
- /package/dist/types/{components/UseLineTitle → UseLineTitle}/defaultExtConfig.d.ts +0 -0
- /package/dist/types/{components/UseLineTitle → UseLineTitle}/index.vue.d.ts +0 -0
- /package/dist/types/{components/UseLineTitle → UseLineTitle}/props.d.ts +0 -0
- /package/dist/types/{components/UseLineTitle → UseLineTitle}/types.d.ts +0 -0
- /package/dist/types/{components/UseRender → UseRender}/hook.d.ts +0 -0
- /package/dist/types/{components/UseRender → UseRender}/index.vue.d.ts +0 -0
- /package/dist/types/{components/UseRender → UseRender}/props.d.ts +0 -0
- /package/dist/types/{components/UseRender → UseRender}/types.d.ts +0 -0
- /package/dist/types/{components/UseSvgIcon → UseSvgIcon}/index.vue.d.ts +0 -0
- /package/dist/types/{components/UseSvgIcon → UseSvgIcon}/props.d.ts +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
configs: {
|
|
3
|
+
type: import('vue').PropType<import('./types').Configs[]>;
|
|
4
|
+
required: boolean;
|
|
5
|
+
};
|
|
6
|
+
tableExtConfig: {
|
|
7
|
+
type: import('vue').PropType<import('../UseElTable/types').ExtConfig>;
|
|
8
|
+
default: () => {};
|
|
9
|
+
};
|
|
10
|
+
extConfig: {
|
|
11
|
+
type: import('vue').PropType<import('./types').ExtConfig>;
|
|
12
|
+
default: () => {};
|
|
13
|
+
};
|
|
14
|
+
}>, {
|
|
15
|
+
uefRef: import('vue').Ref<any, any>;
|
|
16
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
17
|
+
onDictKeys: (value?: string[] | undefined) => any;
|
|
18
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
19
|
+
configs: {
|
|
20
|
+
type: import('vue').PropType<import('./types').Configs[]>;
|
|
21
|
+
required: boolean;
|
|
22
|
+
};
|
|
23
|
+
tableExtConfig: {
|
|
24
|
+
type: import('vue').PropType<import('../UseElTable/types').ExtConfig>;
|
|
25
|
+
default: () => {};
|
|
26
|
+
};
|
|
27
|
+
extConfig: {
|
|
28
|
+
type: import('vue').PropType<import('./types').ExtConfig>;
|
|
29
|
+
default: () => {};
|
|
30
|
+
};
|
|
31
|
+
}>> & Readonly<{
|
|
32
|
+
onOnDictKeys?: ((value?: string[] | undefined) => any) | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
extConfig: import('./types').ExtConfig;
|
|
35
|
+
tableExtConfig: import('../UseElTable/types').ExtConfig;
|
|
36
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
37
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
38
|
+
declare const _default: typeof __VLS_export;
|
|
39
|
+
export default _default;
|
|
40
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
41
|
+
new (): {
|
|
42
|
+
$slots: S;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { ExtConfig as TableExtConfig } from '../UseElTable/types';
|
|
3
|
+
import { Configs, ExtConfig } from './types';
|
|
4
|
+
declare const _default: {
|
|
5
|
+
configs: {
|
|
6
|
+
type: PropType<Configs[]>;
|
|
7
|
+
required: boolean;
|
|
8
|
+
};
|
|
9
|
+
tableExtConfig: {
|
|
10
|
+
type: PropType<TableExtConfig>;
|
|
11
|
+
default: () => {};
|
|
12
|
+
};
|
|
13
|
+
extConfig: {
|
|
14
|
+
type: PropType<ExtConfig>;
|
|
15
|
+
default: () => {};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
|
2
|
+
import { default as componentProps } from './props';
|
|
3
|
+
import { FormColumn } from '../UseElForm/types';
|
|
4
|
+
import { TableColumn } from '../UseElTable/types';
|
|
5
|
+
export type Props = ExtractPropTypes<typeof componentProps>;
|
|
6
|
+
export interface Emits {
|
|
7
|
+
(e: 'onDictKeys', value?: string[]): void;
|
|
8
|
+
}
|
|
9
|
+
export type BaseConfigs = Omit<FormColumn, 'prop'> & Omit<TableColumn, 'prop'>;
|
|
10
|
+
export interface Configs extends BaseConfigs {
|
|
11
|
+
prop: string;
|
|
12
|
+
onlySearch?: boolean;
|
|
13
|
+
tableOrder?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface Divider {
|
|
16
|
+
show: boolean;
|
|
17
|
+
borderStyle: 'none' | 'solid' | 'hidden' | 'dashed';
|
|
18
|
+
}
|
|
19
|
+
export interface ExtConfig {
|
|
20
|
+
actionBar: {
|
|
21
|
+
margin: string;
|
|
22
|
+
showControlFormDisplayBtn: boolean;
|
|
23
|
+
reverse: boolean;
|
|
24
|
+
divider: Divider;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Emits, Props } from './types';
|
|
2
|
+
export declare const useElCheckbox: (props: Props, emits: Emits) => {
|
|
3
|
+
dataComputed: import('vue').ComputedRef<any>;
|
|
4
|
+
checkedItems: import('vue').WritableComputedRef<unknown[], any>;
|
|
5
|
+
isIndeterminate: import('vue').Ref<boolean, boolean>;
|
|
6
|
+
checkAll: import('vue').Ref<boolean, boolean>;
|
|
7
|
+
handleCheckAllChange: (bool: boolean) => void;
|
|
8
|
+
handleCheckedItemsChange: (list: any[]) => void;
|
|
9
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
4
|
+
default: () => never[];
|
|
5
|
+
};
|
|
6
|
+
data: any;
|
|
7
|
+
defaultProps: {
|
|
8
|
+
type: ObjectConstructor;
|
|
9
|
+
default: () => {
|
|
10
|
+
label: string;
|
|
11
|
+
value: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
showCheckAll: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
vertical: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
toJoin: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
27
|
+
"update:modelValue": (value: string | number | (string | number)[]) => any;
|
|
28
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
29
|
+
modelValue: {
|
|
30
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
31
|
+
default: () => never[];
|
|
32
|
+
};
|
|
33
|
+
data: any;
|
|
34
|
+
defaultProps: {
|
|
35
|
+
type: ObjectConstructor;
|
|
36
|
+
default: () => {
|
|
37
|
+
label: string;
|
|
38
|
+
value: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
showCheckAll: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
45
|
+
vertical: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
toJoin: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
}>> & Readonly<{
|
|
54
|
+
"onUpdate:modelValue"?: ((value: string | number | (string | number)[]) => any) | undefined;
|
|
55
|
+
}>, {
|
|
56
|
+
data: any;
|
|
57
|
+
toJoin: boolean;
|
|
58
|
+
modelValue: string | unknown[];
|
|
59
|
+
defaultProps: Record<string, any>;
|
|
60
|
+
showCheckAll: boolean;
|
|
61
|
+
vertical: boolean;
|
|
62
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
63
|
+
declare const _default: typeof __VLS_export;
|
|
64
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
4
|
+
default: () => never[];
|
|
5
|
+
};
|
|
6
|
+
data: any;
|
|
7
|
+
defaultProps: {
|
|
8
|
+
type: ObjectConstructor;
|
|
9
|
+
default: () => {
|
|
10
|
+
label: string;
|
|
11
|
+
value: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
showCheckAll: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
vertical: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
toJoin: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
2
|
modelValue: {
|
|
3
|
-
type: (
|
|
3
|
+
type: (ArrayConstructor | StringConstructor | NumberConstructor)[];
|
|
4
4
|
default: string;
|
|
5
5
|
};
|
|
6
6
|
useRender: {
|
|
@@ -40,7 +40,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
40
40
|
"update:modelValue": (value: string | number | any[]) => any;
|
|
41
41
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
42
42
|
modelValue: {
|
|
43
|
-
type: (
|
|
43
|
+
type: (ArrayConstructor | StringConstructor | NumberConstructor)[];
|
|
44
44
|
default: string;
|
|
45
45
|
};
|
|
46
46
|
useRender: {
|
|
@@ -80,8 +80,8 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
80
80
|
"onUpdate:modelValue"?: ((value: string | number | any[]) => any) | undefined;
|
|
81
81
|
}>, {
|
|
82
82
|
type: string;
|
|
83
|
-
modelValue: string | number | unknown[];
|
|
84
83
|
useRender: boolean | import('../../types').RenderConfig;
|
|
84
|
+
modelValue: string | number | unknown[];
|
|
85
85
|
startPlaceholder: string;
|
|
86
86
|
endPlaceholder: string;
|
|
87
87
|
rangeSeparator: string;
|
|
@@ -2,7 +2,7 @@ import { PropType } from 'vue';
|
|
|
2
2
|
import { RenderConfig } from '../../types';
|
|
3
3
|
declare const _default: {
|
|
4
4
|
modelValue: {
|
|
5
|
-
type: (
|
|
5
|
+
type: (ArrayConstructor | StringConstructor | NumberConstructor)[];
|
|
6
6
|
default: string;
|
|
7
7
|
};
|
|
8
8
|
useRender: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
2
|
formColumns: {
|
|
3
3
|
type: import('vue').PropType<import('../types').FormColumn[]>;
|
|
4
4
|
required: boolean;
|
|
@@ -55,7 +55,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
55
55
|
};
|
|
56
56
|
}>, {
|
|
57
57
|
showQueryForm: import('vue').Ref<boolean, boolean>;
|
|
58
|
-
handleDisplayQueryForm: () =>
|
|
58
|
+
handleDisplayQueryForm: () => void;
|
|
59
59
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
60
60
|
onDictKeys: (value?: string[] | undefined) => any;
|
|
61
61
|
"update:formModel": (value: Record<string, any>) => any;
|
|
@@ -119,16 +119,22 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
119
119
|
"onUpdate:formModel"?: ((value: Record<string, any>) => any) | undefined;
|
|
120
120
|
}>, {
|
|
121
121
|
dictMap: import('../../../types').DictMap;
|
|
122
|
-
useRender: boolean | import('../../../types').RenderConfig;
|
|
123
122
|
dictProps: import('../../../types').DictProps;
|
|
124
|
-
|
|
123
|
+
useRender: boolean | import('../../../types').RenderConfig;
|
|
125
124
|
formItemWidth: string;
|
|
126
125
|
labelSuffix: string;
|
|
126
|
+
labelWidth: string;
|
|
127
127
|
labelPosition: string;
|
|
128
128
|
rowGutter: number;
|
|
129
129
|
colSpan: number;
|
|
130
130
|
disabled: boolean;
|
|
131
131
|
queryConfig: import('../types').QueryConfig;
|
|
132
132
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
133
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
133
134
|
declare const _default: typeof __VLS_export;
|
|
134
135
|
export default _default;
|
|
136
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
137
|
+
new (): {
|
|
138
|
+
$slots: S;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComputedRef } from 'vue';
|
|
2
2
|
import { FormColumn, Props } from '../types';
|
|
3
3
|
export declare const useQueryColSpan: (props: Props, formColumnsComputed: ComputedRef<FormColumn[]>) => {
|
|
4
|
-
queryColSpanComputed: ComputedRef<0 | 1 |
|
|
4
|
+
queryColSpanComputed: ComputedRef<0 | 1 | 12 | 24 | 8 | 6 | 4 | 3 | 2>;
|
|
5
5
|
btnColSpanComputed: ComputedRef<number>;
|
|
6
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
2
|
modelValue: {
|
|
3
|
-
type: (
|
|
3
|
+
type: (ArrayConstructor | StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
4
4
|
default: string;
|
|
5
5
|
};
|
|
6
6
|
options: {
|
|
@@ -40,7 +40,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
40
40
|
"update:label": (label: string | string[]) => any;
|
|
41
41
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
42
42
|
modelValue: {
|
|
43
|
-
type: (
|
|
43
|
+
type: (ArrayConstructor | StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
44
44
|
default: string;
|
|
45
45
|
};
|
|
46
46
|
options: {
|
|
@@ -79,12 +79,12 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
79
79
|
"onUpdate:modelValue"?: ((value: string | number | (string | number)[]) => any) | undefined;
|
|
80
80
|
"onUpdate:label"?: ((label: string | string[]) => any) | undefined;
|
|
81
81
|
}>, {
|
|
82
|
+
dictProps: import('../../types').DictProps;
|
|
83
|
+
useRender: boolean | import('../../types').RenderConfig;
|
|
84
|
+
width: string;
|
|
82
85
|
toJoin: boolean;
|
|
83
86
|
modelValue: string | number | boolean | unknown[];
|
|
84
|
-
useRender: boolean | import('../../types').RenderConfig;
|
|
85
87
|
placeholder: string;
|
|
86
|
-
dictProps: import('../../types').DictProps;
|
|
87
|
-
width: string;
|
|
88
88
|
clearable: boolean;
|
|
89
89
|
options: Record<string, any>[];
|
|
90
90
|
useV2: boolean;
|
|
@@ -2,7 +2,7 @@ import { PropType } from 'vue';
|
|
|
2
2
|
import { DictProps, RenderConfig } from '../../types';
|
|
3
3
|
declare const _default: {
|
|
4
4
|
modelValue: {
|
|
5
|
-
type: (
|
|
5
|
+
type: (ArrayConstructor | StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
6
6
|
default: string;
|
|
7
7
|
};
|
|
8
8
|
options: {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { Props } from '../types';
|
|
3
|
+
import { GlobalConfig } from '../../../types';
|
|
4
|
+
export declare const useTableHeightAdaptive: ({ rootRef, tableWrapperRef, mergedProps, globalConfig }: {
|
|
5
|
+
rootRef: Ref<HTMLDivElement | null>;
|
|
6
|
+
tableWrapperRef: Ref<HTMLDivElement | null>;
|
|
7
|
+
mergedProps: ComputedRef<Props>;
|
|
8
|
+
globalConfig: ComputedRef<GlobalConfig>;
|
|
9
|
+
}) => {
|
|
10
|
+
tableRealHeight: Ref<string, string>;
|
|
11
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
export { default as UseCrudTable } from './UseCrudTable/index.vue';
|
|
1
2
|
export { default as UseElButton } from './UseElButton/index.vue';
|
|
3
|
+
export { default as UseElCheckbox } from './UseElCheckbox/index.vue';
|
|
2
4
|
export { default as UseElConfigProvider } from './UseElConfigProvider/index.vue';
|
|
3
5
|
export { default as UseElDatePicker } from './UseElDatePicker/index.vue';
|
|
4
6
|
export { default as UseElDescriptions } from './UseElDescriptions/index.vue';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wyfex/ivue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "万有前端 X 体系下基于 Vite8 + Vue3 + Typescript6 + ElementPlus2 构建的 iVue 组件库",
|
|
5
5
|
"homepage": "https://wyfe.top/idocs/ivue",
|
|
6
6
|
"type": "module",
|
|
@@ -53,16 +53,16 @@
|
|
|
53
53
|
"@types/node": "^26.0.1",
|
|
54
54
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
55
55
|
"@vue/tsconfig": "^0.9.1",
|
|
56
|
-
"@wyfex/iutils": "
|
|
56
|
+
"@wyfex/iutils": "^0.40.0",
|
|
57
57
|
"element-plus": "^2.14.2",
|
|
58
58
|
"sass-embedded": "^1.100.0",
|
|
59
59
|
"typescript": "~6.0.3",
|
|
60
60
|
"unplugin-auto-import": "^21.0.0",
|
|
61
61
|
"unplugin-dts": "^1.0.3",
|
|
62
62
|
"unplugin-vue-components": "^32.1.0",
|
|
63
|
-
"vite": "^8.1.
|
|
63
|
+
"vite": "^8.1.2",
|
|
64
64
|
"vite-svg-loader": "^5.1.1",
|
|
65
65
|
"vue": "^3.5.39",
|
|
66
|
-
"vue-tsc": "^3.3.
|
|
66
|
+
"vue-tsc": "^3.3.6"
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ExtConfig } from './types'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 默认扩展配置
|
|
5
|
+
*/
|
|
6
|
+
export default {
|
|
7
|
+
/**
|
|
8
|
+
* 操作栏配置项
|
|
9
|
+
*/
|
|
10
|
+
actionBar: {
|
|
11
|
+
/**
|
|
12
|
+
* 操作栏外边距配置项
|
|
13
|
+
*/
|
|
14
|
+
margin: '20px 0',
|
|
15
|
+
/**
|
|
16
|
+
* 是否显示【收起/展开查询】按钮配置项
|
|
17
|
+
*/
|
|
18
|
+
showControlFormDisplayBtn: true,
|
|
19
|
+
/**
|
|
20
|
+
* 是否反转操作栏按钮 仅showControlFormDisplayBtn为true时生效
|
|
21
|
+
*/
|
|
22
|
+
reverse: false,
|
|
23
|
+
/**
|
|
24
|
+
* 操作栏底部分割线配置项
|
|
25
|
+
*/
|
|
26
|
+
divider: { show: false, borderStyle: 'solid' }
|
|
27
|
+
}
|
|
28
|
+
} satisfies ExtConfig
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { PropType } from 'vue'
|
|
2
|
+
import type { ExtConfig as TableExtConfig } from '../UseElTable/types'
|
|
3
|
+
import type { Configs, ExtConfig } from './types'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 组件props
|
|
7
|
+
*/
|
|
8
|
+
export default {
|
|
9
|
+
/**
|
|
10
|
+
* 配置项 必传
|
|
11
|
+
* 1、configs是【formColumns】和【tableColumns】的统一配置入口
|
|
12
|
+
* 2、configs在【formColumns】和【tableColumns】的配置基础上新增了【onlySearch】和【tableOrder】配置项用于兼容特殊应用场景
|
|
13
|
+
*/
|
|
14
|
+
configs: {
|
|
15
|
+
type: Array as PropType<Configs[]>,
|
|
16
|
+
required: true
|
|
17
|
+
},
|
|
18
|
+
/**
|
|
19
|
+
* 表格扩展配置项
|
|
20
|
+
*/
|
|
21
|
+
tableExtConfig: {
|
|
22
|
+
type: Object as PropType<TableExtConfig>,
|
|
23
|
+
default: () => ({})
|
|
24
|
+
},
|
|
25
|
+
/**
|
|
26
|
+
* 扩展配置 如【操作栏】等
|
|
27
|
+
*/
|
|
28
|
+
extConfig: {
|
|
29
|
+
type: Object as PropType<ExtConfig>,
|
|
30
|
+
default: () => ({})
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue'
|
|
2
|
+
import componentProps from './props'
|
|
3
|
+
import type { FormColumn } from '../UseElForm/types'
|
|
4
|
+
import type { TableColumn } from '../UseElTable/types'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* props类型
|
|
8
|
+
*/
|
|
9
|
+
export type Props = ExtractPropTypes<typeof componentProps>
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* emits接口
|
|
13
|
+
*/
|
|
14
|
+
export interface Emits {
|
|
15
|
+
// dictKeys事件
|
|
16
|
+
(e: 'onDictKeys', value?: string[]): void
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 基础配置类型
|
|
21
|
+
*/
|
|
22
|
+
export type BaseConfigs = Omit<FormColumn, 'prop'> & Omit<TableColumn, 'prop'>
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 配置项接口
|
|
26
|
+
*/
|
|
27
|
+
export interface Configs extends BaseConfigs {
|
|
28
|
+
prop: string
|
|
29
|
+
onlySearch?: boolean
|
|
30
|
+
tableOrder?: number
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 分割线配置项接口
|
|
35
|
+
*/
|
|
36
|
+
export interface Divider {
|
|
37
|
+
show: boolean
|
|
38
|
+
borderStyle: 'none' | 'solid' | 'hidden' | 'dashed'
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* extConfig接口
|
|
43
|
+
*/
|
|
44
|
+
export interface ExtConfig {
|
|
45
|
+
actionBar: {
|
|
46
|
+
margin: string
|
|
47
|
+
showControlFormDisplayBtn: boolean
|
|
48
|
+
reverse: boolean
|
|
49
|
+
divider: Divider
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 组件props
|
|
3
|
+
*/
|
|
4
|
+
export default {
|
|
5
|
+
/**
|
|
6
|
+
* 双向绑定数据源
|
|
7
|
+
*/
|
|
8
|
+
modelValue: {
|
|
9
|
+
type: [Array, String],
|
|
10
|
+
default: () => []
|
|
11
|
+
},
|
|
12
|
+
/**
|
|
13
|
+
* 选项数据源
|
|
14
|
+
*/
|
|
15
|
+
data: {
|
|
16
|
+
type: Array,
|
|
17
|
+
required: true
|
|
18
|
+
} as any,
|
|
19
|
+
/**
|
|
20
|
+
* 选项默认配置
|
|
21
|
+
*/
|
|
22
|
+
defaultProps: {
|
|
23
|
+
type: Object,
|
|
24
|
+
default: () => ({ label: 'label', value: 'value' })
|
|
25
|
+
},
|
|
26
|
+
// 是否显示全选按钮
|
|
27
|
+
showCheckAll: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* 是否垂直布局
|
|
33
|
+
*/
|
|
34
|
+
vertical: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: false
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* 是否字符串拼接
|
|
40
|
+
*/
|
|
41
|
+
toJoin: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue'
|
|
2
|
+
import componentProps from './props'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* props类型
|
|
6
|
+
*/
|
|
7
|
+
export type Props = ExtractPropTypes<typeof componentProps>
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* emits接口
|
|
11
|
+
*/
|
|
12
|
+
export interface Emits {
|
|
13
|
+
// 更新value值
|
|
14
|
+
(e: 'update:modelValue', value: string | number | (string | number)[]): void
|
|
15
|
+
}
|
|
@@ -4,7 +4,13 @@ import type { ExtConfig } from './types'
|
|
|
4
4
|
* 默认扩展配置
|
|
5
5
|
*/
|
|
6
6
|
export default {
|
|
7
|
+
/**
|
|
8
|
+
* 字典属性配置项
|
|
9
|
+
*/
|
|
7
10
|
dictProps: { value: 'value', label: 'label', children: 'children' },
|
|
11
|
+
/**
|
|
12
|
+
* 表格配置项
|
|
13
|
+
*/
|
|
8
14
|
table: { bottomOffset: 20, modalFooterHeight: 82 },
|
|
9
15
|
debug: { open: false, type: 'primary', toJson: false }
|
|
10
16
|
} satisfies ExtConfig
|
|
@@ -13,7 +13,7 @@ export type Props = ExtractPropTypes<typeof componentProps>
|
|
|
13
13
|
export interface Emits {
|
|
14
14
|
// dictKeys事件
|
|
15
15
|
(e: 'onDictKeys', value?: string[]): void
|
|
16
|
-
// 更新formModel
|
|
16
|
+
// 更新formModel
|
|
17
17
|
(e: 'update:formModel', value: Record<string, any>): void
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -18,14 +18,10 @@ export default {
|
|
|
18
18
|
/**
|
|
19
19
|
* 高度自适应配置项
|
|
20
20
|
* isModal:是否弹窗模式,弹窗模式自动追加底部按钮预留
|
|
21
|
-
* modalFooterHeight:弹窗底部操作栏固定高度,isModal=true
|
|
22
|
-
* bottomOffset
|
|
21
|
+
* modalFooterHeight:弹窗底部操作栏固定高度,isModal=true生效,该项由UseElConfigProvider组件统一提供默认值
|
|
22
|
+
* bottomOffset:底部预留偏移,该项由UseElConfigProvider组件统一提供默认值
|
|
23
23
|
*/
|
|
24
|
-
heightAdaptive: {
|
|
25
|
-
isModal: false,
|
|
26
|
-
modalFooterHeight: 82,
|
|
27
|
-
bottomOffset: 20
|
|
28
|
-
},
|
|
24
|
+
heightAdaptive: { isModal: false },
|
|
29
25
|
/**
|
|
30
26
|
* 选择器配置项
|
|
31
27
|
* 绑定v-model:selectionData="selectionData"则开启选择器 不显式设置type则默认为CHECKBOX复选
|
|
@@ -67,6 +67,8 @@ export interface TableColumnExtConfig {
|
|
|
67
67
|
class?: string | string[]
|
|
68
68
|
// 样式
|
|
69
69
|
style?: string | Record<string, unknown>
|
|
70
|
+
// 插槽 为true则在模板代码中添加`<template #prop="{ row }"></template>`即可,可传入string自定义具名插槽名称
|
|
71
|
+
slot?: boolean | string
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
/**
|
|
@@ -81,12 +83,6 @@ export interface TableColumn {
|
|
|
81
83
|
* 如为string或dict.data为string则将dict或dict.data作为dictMap的key
|
|
82
84
|
*/
|
|
83
85
|
useDict?: boolean | string | UseDict
|
|
84
|
-
/**
|
|
85
|
-
* 插槽
|
|
86
|
-
* 为true则在模板代码中添加`<template #prop="{ row }"></template>`即可
|
|
87
|
-
* 可传入string自定义具名插槽名称
|
|
88
|
-
*/
|
|
89
|
-
slot?: boolean | string
|
|
90
86
|
width?: string | number
|
|
91
87
|
minWidth?: string | number
|
|
92
88
|
show?: boolean
|
package/src/types/index.ts
CHANGED
|
@@ -98,6 +98,10 @@ export interface GlobalConfig {
|
|
|
98
98
|
finalDictProps: DictProps
|
|
99
99
|
// 最终字典映射
|
|
100
100
|
finalDictMap: DictMap
|
|
101
|
+
// 最终表格底部预留偏移
|
|
102
|
+
finalTableBottomOffset: number
|
|
103
|
+
// 最终表格弹窗底部操作栏固定高度,isModal=true生效
|
|
104
|
+
finalTableModalFooterHeight?: number
|
|
101
105
|
// 最终上传配置
|
|
102
106
|
finalUploadConfig: UploadConfig
|
|
103
107
|
}
|