@dt-frames/ui 2.0.9 → 2.0.10
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/es/components/curd/index.js +69 -77
- package/es/components/curd/index.less +2 -0
- package/es/components/curd/src/components/Curd.d.ts +16 -8
- package/es/components/curd/src/hooks/useCurd.d.ts +1 -1
- package/es/components/curd/src/props.d.ts +0 -1
- package/es/components/form/index.js +50 -21
- package/es/components/form/index.less +18 -0
- package/es/components/form/src/components/FormButtons.d.ts +13 -3
- package/es/components/form/src/components/FormItem.d.ts +0 -1
- package/es/components/form/src/hooks/useLabelWidth.d.ts +2 -18
- package/es/components/form/src/props.d.ts +3 -4
- package/es/components/form/src/types/form.type.d.ts +3 -3
- package/es/components/form/src/types/items.type.d.ts +12 -5
- package/es/components/modal/index.js +22 -2
- package/es/components/modal/src/components/Modal.d.ts +1 -1
- package/es/components/modal/src/components/ModalFooter.d.ts +10 -0
- package/es/components/modal/src/index.d.ts +14 -4
- package/es/components/modal/src/props.d.ts +2 -1
- package/es/components/table/index.js +33 -54
- package/es/components/table/index.less +3 -3
- package/es/components/table/src/components/tableSetting/DownloadCtrl.d.ts +15 -5
- package/es/theme/index.js +144 -88
- package/es/theme/index.less +1 -0
- package/es/theme/src/components/header/components/size.d.ts +5 -5
- package/es/theme/src/components/header/index.d.ts +5 -5
- package/es/theme/src/components/header/multiple-header.d.ts +5 -5
- package/es/theme/src/index.d.ts +10 -10
- package/es/theme/transition.less +105 -0
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ export declare const BasicProps: {
|
|
|
16
16
|
default: () => {};
|
|
17
17
|
};
|
|
18
18
|
layout: {
|
|
19
|
-
type: PropType<"vertical" | "
|
|
19
|
+
type: PropType<"vertical" | "horizontal" | "inline">;
|
|
20
20
|
default: string;
|
|
21
21
|
};
|
|
22
22
|
labelWidth: {
|
|
@@ -42,7 +42,7 @@ export declare const BasicProps: {
|
|
|
42
42
|
rowProps: {
|
|
43
43
|
type: PropType<Partial<import("vue").ExtractPropTypes<{
|
|
44
44
|
align: PropType<"stretch" | "bottom" | "top" | "middle">;
|
|
45
|
-
justify: PropType<"space-around" | "space-between" | "center" | "end"
|
|
45
|
+
justify: PropType<"start" | "space-around" | "space-between" | "center" | "end">;
|
|
46
46
|
prefixCls: StringConstructor;
|
|
47
47
|
gutter: {
|
|
48
48
|
type: PropType<import("ant-design-vue/lib/grid/Row").Gutter | [import("ant-design-vue/lib/grid/Row").Gutter, import("ant-design-vue/lib/grid/Row").Gutter]>;
|
|
@@ -60,8 +60,7 @@ export declare const BasicProps: {
|
|
|
60
60
|
default: () => {};
|
|
61
61
|
};
|
|
62
62
|
size: {
|
|
63
|
-
type: PropType<"
|
|
64
|
-
default: string;
|
|
63
|
+
type: PropType<"small" | "middle" | "large">;
|
|
65
64
|
};
|
|
66
65
|
disabled: {
|
|
67
66
|
type: BooleanConstructor;
|
|
@@ -3,13 +3,13 @@ import { ComputedRef, ExtractPropTypes, Ref, VNode } from "vue";
|
|
|
3
3
|
import { RuleObject } from 'ant-design-vue/es/form/interface';
|
|
4
4
|
import { TooltipProps } from "ant-design-vue/es/tooltip/Tooltip";
|
|
5
5
|
import { BasicProps } from "../props";
|
|
6
|
-
import type { Cascader, Checkbox, CheckboxGroup, DatePicker, Divider, Input, InputGroup, InputNumber, InputPassword, InputSearch, InputTextArea, Radio, RadioGroup, RangePicker, Rate, Select, Switch, TimePicker, TreeSelect } from "./items.type";
|
|
6
|
+
import type { Cascader, Checkbox, CheckboxGroup, DatePicker, Divider, Input, InputGroup, InputNumber, InputPassword, InputSearch, InputTextArea, InputWithDialog, Radio, RadioGroup, RangePicker, Rate, Select, Switch, TimePicker, TreeSelect } from "./items.type";
|
|
7
7
|
export declare type ButtonFlag = 'OK' | 'CANCEL';
|
|
8
8
|
export declare type Rule = RuleObject & {
|
|
9
9
|
trigger?: 'blur' | 'change' | ['change', 'blur'];
|
|
10
10
|
};
|
|
11
11
|
export declare type FormProps = Partial<ExtractPropTypes<typeof BasicProps>>;
|
|
12
|
-
export declare type ComponentType = 'Input' | 'InputGroup' | 'InputPassword' | 'InputSearch' | 'InputTextArea' | 'InputNumber' | 'Select' | 'TreeSelect' | 'Radio' | 'RadioButtonGroup' | 'RadioGroup' | 'Checkbox' | 'CheckboxGroup' | 'AutoComplete' | 'Cascader' | 'DatePicker' | 'MonthPicker' | 'RangePicker' | 'WeekPicker' | 'TimePicker' | 'Switch' | 'Upload' | 'Slider' | 'Rate' | 'Divider';
|
|
12
|
+
export declare type ComponentType = 'Input' | 'InputWithDialog' | 'InputGroup' | 'InputPassword' | 'InputSearch' | 'InputTextArea' | 'InputNumber' | 'Select' | 'TreeSelect' | 'Radio' | 'RadioButtonGroup' | 'RadioGroup' | 'Checkbox' | 'CheckboxGroup' | 'AutoComplete' | 'Cascader' | 'DatePicker' | 'MonthPicker' | 'RangePicker' | 'WeekPicker' | 'TimePicker' | 'Switch' | 'Upload' | 'Slider' | 'Rate' | 'Divider';
|
|
13
13
|
export declare type ColEx = {
|
|
14
14
|
style?: any;
|
|
15
15
|
span?: number | string;
|
|
@@ -54,7 +54,7 @@ declare type Schema<ComponentType, T> = {
|
|
|
54
54
|
isAdvanced?: boolean;
|
|
55
55
|
extraName?: string[];
|
|
56
56
|
};
|
|
57
|
-
export declare type FormSchema = Schema<'Input', Input> | Schema<'InputGroup', InputGroup> | Schema<'InputPassword', InputPassword> | Schema<'InputSearch', InputSearch> | Schema<'InputTextArea', InputTextArea> | Schema<'InputNumber', InputNumber> | Schema<'Select', Select> | Schema<'TreeSelect', TreeSelect> | Schema<'Radio', Radio> | Schema<'RadioButtonGroup', Radio> | Schema<'RadioGroup', RadioGroup> | Schema<'Checkbox', Checkbox> | Schema<'CheckboxGroup', CheckboxGroup> | Schema<'AutoComplete', Recordable> | Schema<'Cascader', Cascader> | Schema<'DatePicker', DatePicker> | Schema<'MonthPicker', DatePicker> | Schema<'RangePicker', RangePicker> | Schema<'WeekPicker', DatePicker> | Schema<'TimePicker', TimePicker> | Schema<'Switch', Switch> | Schema<'Slider', {
|
|
57
|
+
export declare type FormSchema = Schema<'Input', Input> | Schema<'InputWithDialog', InputWithDialog> | Schema<'InputGroup', InputGroup> | Schema<'InputPassword', InputPassword> | Schema<'InputSearch', InputSearch> | Schema<'InputTextArea', InputTextArea> | Schema<'InputNumber', InputNumber> | Schema<'Select', Select> | Schema<'TreeSelect', TreeSelect> | Schema<'Radio', Radio> | Schema<'RadioButtonGroup', Radio> | Schema<'RadioGroup', RadioGroup> | Schema<'Checkbox', Checkbox> | Schema<'CheckboxGroup', CheckboxGroup> | Schema<'AutoComplete', Recordable> | Schema<'Cascader', Cascader> | Schema<'DatePicker', DatePicker> | Schema<'MonthPicker', DatePicker> | Schema<'RangePicker', RangePicker> | Schema<'WeekPicker', DatePicker> | Schema<'TimePicker', TimePicker> | Schema<'Switch', Switch> | Schema<'Slider', {
|
|
58
58
|
disabled?: boolean;
|
|
59
59
|
[key: string]: any;
|
|
60
60
|
}> | Schema<'Rate', Rate> | Schema<'Divider', Divider>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DtEvent, Recordable, SelectOptions } from "@dt-frames/core";
|
|
2
2
|
import dayjs from "dayjs";
|
|
3
|
-
import { Ref, Slot, VNode, CSSProperties } from "vue";
|
|
3
|
+
import { Ref, Slot, VNode, CSSProperties, ComputedRef } from "vue";
|
|
4
4
|
declare type BaseInput = {
|
|
5
5
|
placeholder?: string;
|
|
6
6
|
addonAfter?: string | VNode;
|
|
@@ -106,7 +106,7 @@ export declare type Select = {
|
|
|
106
106
|
notFoundContent?: string | Slot;
|
|
107
107
|
open?: boolean;
|
|
108
108
|
optionFilterProp?: string;
|
|
109
|
-
options?: SelectOptions[]
|
|
109
|
+
options?: SelectOptions[] | ComputedRef<SelectOptions[]> | Ref<SelectOptions[]>;
|
|
110
110
|
placeholder?: string;
|
|
111
111
|
removeIcon?: VNode | Slot;
|
|
112
112
|
searchValue?: string;
|
|
@@ -194,7 +194,7 @@ export declare type RadioGroup = {
|
|
|
194
194
|
buttonStyle?: 'outline' | 'solid';
|
|
195
195
|
disabled?: boolean;
|
|
196
196
|
name?: string;
|
|
197
|
-
options?: string[] | number[] | SelectOptions[]
|
|
197
|
+
options?: string[] | number[] | SelectOptions[] | ComputedRef<SelectOptions[]> | Ref<SelectOptions[]>;
|
|
198
198
|
optionType?: 'default' | 'button';
|
|
199
199
|
size?: 'large' | 'default' | 'small';
|
|
200
200
|
defaultValue?: string | number | boolean;
|
|
@@ -215,7 +215,11 @@ export declare type CheckboxGroup = {
|
|
|
215
215
|
name?: string;
|
|
216
216
|
options?: string[] | (SelectOptions & {
|
|
217
217
|
indeterminate?: boolean;
|
|
218
|
-
})[]
|
|
218
|
+
})[] | ComputedRef<(SelectOptions & {
|
|
219
|
+
indeterminate?: boolean;
|
|
220
|
+
})[]> | Ref<(SelectOptions & {
|
|
221
|
+
indeterminate?: boolean;
|
|
222
|
+
})[]>;
|
|
219
223
|
onChange?: (checkedValue: (string | number | boolean)[], model: Recordable) => void;
|
|
220
224
|
[key: string]: any;
|
|
221
225
|
};
|
|
@@ -250,7 +254,7 @@ export declare type Cascader = {
|
|
|
250
254
|
multiple?: boolean;
|
|
251
255
|
notFoundContent?: string | VNode;
|
|
252
256
|
open?: boolean;
|
|
253
|
-
options?: CascaderOption[]
|
|
257
|
+
options?: CascaderOption[] | ComputedRef<CascaderOption[]> | Ref<CascaderOption[]>;
|
|
254
258
|
placement?: 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight';
|
|
255
259
|
searchValue?: string;
|
|
256
260
|
showSearch?: boolean | object;
|
|
@@ -372,4 +376,7 @@ export declare type Divider = {
|
|
|
372
376
|
type?: 'horizontal' | 'vertical';
|
|
373
377
|
[key: string]: any;
|
|
374
378
|
};
|
|
379
|
+
export declare type InputWithDialog = Input & {
|
|
380
|
+
openDialog?: (model: Recordable) => void;
|
|
381
|
+
};
|
|
375
382
|
export {};
|
|
@@ -100,6 +100,12 @@ function useModal(props, setModalData) {
|
|
|
100
100
|
return;
|
|
101
101
|
nextTick(() => {
|
|
102
102
|
setModalData(data);
|
|
103
|
+
if (!data)
|
|
104
|
+
return;
|
|
105
|
+
if (props?.title && isFunction(props?.title)) {
|
|
106
|
+
let title = props.title(data);
|
|
107
|
+
methods.setModalProps({ title });
|
|
108
|
+
}
|
|
103
109
|
});
|
|
104
110
|
});
|
|
105
111
|
const methods = {
|
|
@@ -812,6 +818,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
812
818
|
isAdvanced: {
|
|
813
819
|
type: Boolean,
|
|
814
820
|
default: true
|
|
821
|
+
},
|
|
822
|
+
colspan: {
|
|
823
|
+
type: Object
|
|
815
824
|
}
|
|
816
825
|
},
|
|
817
826
|
emits: ["handle-method"],
|
|
@@ -831,6 +840,17 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
831
840
|
Object.assign(style, {
|
|
832
841
|
display: "inline-block"
|
|
833
842
|
});
|
|
843
|
+
return { style };
|
|
844
|
+
} else if (props.mode === null) {
|
|
845
|
+
Object.assign(style, {
|
|
846
|
+
display: "flex",
|
|
847
|
+
justifyContent: "center",
|
|
848
|
+
marginBottom: "20px"
|
|
849
|
+
});
|
|
850
|
+
return {
|
|
851
|
+
style,
|
|
852
|
+
span: 24
|
|
853
|
+
};
|
|
834
854
|
}
|
|
835
855
|
return { style };
|
|
836
856
|
});
|
|
@@ -853,8 +873,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
853
873
|
}
|
|
854
874
|
}
|
|
855
875
|
watch(() => props.isAdvanced, (v) => {
|
|
856
|
-
if (v) {
|
|
857
|
-
|
|
876
|
+
if (v || props.mode !== "search") {
|
|
877
|
+
requestAnimationFrame(toggleAdvanced);
|
|
858
878
|
}
|
|
859
879
|
}, {
|
|
860
880
|
immediate: true
|
|
@@ -40,7 +40,7 @@ declare const _sfc_main: {
|
|
|
40
40
|
default: boolean;
|
|
41
41
|
};
|
|
42
42
|
title: {
|
|
43
|
-
type: import("vue").PropType<String | import("vue").ComputedRef<String
|
|
43
|
+
type: import("vue").PropType<String | import("vue").ComputedRef<String> | ((data: import("@dt-frames/core").Recordable<any>) => String)>;
|
|
44
44
|
};
|
|
45
45
|
loading: {
|
|
46
46
|
type: BooleanConstructor;
|
|
@@ -54,6 +54,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
54
54
|
type: BooleanConstructor;
|
|
55
55
|
default: boolean;
|
|
56
56
|
};
|
|
57
|
+
colspan: {
|
|
58
|
+
type: ObjectConstructor;
|
|
59
|
+
};
|
|
57
60
|
}, {
|
|
58
61
|
props: any;
|
|
59
62
|
emits: (event: "handle-method", ...args: any[]) => void;
|
|
@@ -72,6 +75,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
72
75
|
showAdvanceRef: import("vue").ComputedRef<boolean>;
|
|
73
76
|
colOpt: import("vue").ComputedRef<{
|
|
74
77
|
style: import("@dt-frames/core").Recordable<any>;
|
|
78
|
+
span?: undefined;
|
|
79
|
+
} | {
|
|
80
|
+
style: import("@dt-frames/core").Recordable<any>;
|
|
81
|
+
span: number;
|
|
75
82
|
}>;
|
|
76
83
|
getAdvanceClass: import("vue").ComputedRef<(string | {
|
|
77
84
|
'basic-arrow--active': boolean;
|
|
@@ -103,6 +110,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
103
110
|
type: BooleanConstructor;
|
|
104
111
|
default: boolean;
|
|
105
112
|
};
|
|
113
|
+
colspan: {
|
|
114
|
+
type: ObjectConstructor;
|
|
115
|
+
};
|
|
106
116
|
}>> & {
|
|
107
117
|
"onHandle-method"?: (...args: any[]) => any;
|
|
108
118
|
}, {
|
|
@@ -40,7 +40,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
40
40
|
default: boolean;
|
|
41
41
|
};
|
|
42
42
|
title: {
|
|
43
|
-
type: import("vue").PropType<String | import("vue").ComputedRef<String
|
|
43
|
+
type: import("vue").PropType<String | import("vue").ComputedRef<String> | ((data: import("@dt-frames/core").Recordable<any>) => String)>;
|
|
44
44
|
};
|
|
45
45
|
loading: {
|
|
46
46
|
type: BooleanConstructor;
|
|
@@ -141,7 +141,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
141
141
|
default: boolean;
|
|
142
142
|
};
|
|
143
143
|
title: {
|
|
144
|
-
type: import("vue").PropType<String | import("vue").ComputedRef<String
|
|
144
|
+
type: import("vue").PropType<String | import("vue").ComputedRef<String> | ((data: import("@dt-frames/core").Recordable<any>) => String)>;
|
|
145
145
|
};
|
|
146
146
|
loading: {
|
|
147
147
|
type: BooleanConstructor;
|
|
@@ -257,7 +257,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
257
257
|
default: boolean;
|
|
258
258
|
};
|
|
259
259
|
title: {
|
|
260
|
-
type: import("vue").PropType<String | import("vue").ComputedRef<String
|
|
260
|
+
type: import("vue").PropType<String | import("vue").ComputedRef<String> | ((data: import("@dt-frames/core").Recordable<any>) => String)>;
|
|
261
261
|
};
|
|
262
262
|
loading: {
|
|
263
263
|
type: BooleanConstructor;
|
|
@@ -567,6 +567,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
567
567
|
type: BooleanConstructor;
|
|
568
568
|
default: boolean;
|
|
569
569
|
};
|
|
570
|
+
colspan: {
|
|
571
|
+
type: ObjectConstructor;
|
|
572
|
+
};
|
|
570
573
|
}, {
|
|
571
574
|
props: any;
|
|
572
575
|
emits: (event: "handle-method", ...args: any[]) => void;
|
|
@@ -585,6 +588,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
585
588
|
showAdvanceRef: import("vue").ComputedRef<boolean>;
|
|
586
589
|
colOpt: import("vue").ComputedRef<{
|
|
587
590
|
style: import("@dt-frames/core").Recordable<any>;
|
|
591
|
+
span?: undefined;
|
|
592
|
+
} | {
|
|
593
|
+
style: import("@dt-frames/core").Recordable<any>;
|
|
594
|
+
span: number;
|
|
588
595
|
}>;
|
|
589
596
|
getAdvanceClass: import("vue").ComputedRef<(string | {
|
|
590
597
|
'basic-arrow--active': boolean;
|
|
@@ -616,6 +623,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
616
623
|
type: BooleanConstructor;
|
|
617
624
|
default: boolean;
|
|
618
625
|
};
|
|
626
|
+
colspan: {
|
|
627
|
+
type: ObjectConstructor;
|
|
628
|
+
};
|
|
619
629
|
}>> & {
|
|
620
630
|
"onHandle-method"?: (...args: any[]) => any;
|
|
621
631
|
}, {
|
|
@@ -688,7 +698,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
688
698
|
default: boolean;
|
|
689
699
|
};
|
|
690
700
|
title: {
|
|
691
|
-
type: import("vue").PropType<String | import("vue").ComputedRef<String
|
|
701
|
+
type: import("vue").PropType<String | import("vue").ComputedRef<String> | ((data: import("@dt-frames/core").Recordable<any>) => String)>;
|
|
692
702
|
};
|
|
693
703
|
loading: {
|
|
694
704
|
type: BooleanConstructor;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ButtonProps } from '../../form/src/types/form.type';
|
|
2
|
+
import { Recordable } from "@dt-frames/core";
|
|
2
3
|
import { ComputedRef, CSSProperties, PropType } from "vue";
|
|
3
4
|
export declare const basicProps: {
|
|
4
5
|
t: {
|
|
@@ -39,7 +40,7 @@ export declare const basicProps: {
|
|
|
39
40
|
default: boolean;
|
|
40
41
|
};
|
|
41
42
|
title: {
|
|
42
|
-
type: PropType<String | ComputedRef<String
|
|
43
|
+
type: PropType<String | ComputedRef<String> | ((data: Recordable) => String)>;
|
|
43
44
|
};
|
|
44
45
|
loading: {
|
|
45
46
|
type: BooleanConstructor;
|