@dt-frames/ui 2.0.7 → 2.0.9
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/form/index.d.ts +1 -3160
- package/es/components/form/index.js +11 -63
- package/es/components/form/src/components/formIcon.d.ts +11 -11
- package/es/components/form/src/components/formInputUseDialog.d.ts +6 -6
- package/es/components/form/src/hooks/useFormEvent.d.ts +1 -1
- package/es/components/form/src/index.d.ts +2 -2
- package/es/components/form/src/types/form.type.d.ts +11 -5
- package/es/components/form/src/types/items.type.d.ts +375 -0
- package/es/components/modal/index.less +3 -0
- package/es/components/modal/src/components/ModalFooter.d.ts +3 -3
- package/es/components/modal/src/index.d.ts +9 -9
- package/es/components/source/index.js +8 -1
- package/es/components/source/types/source.type.d.ts +1 -1
- package/es/components/table/index.js +9 -7
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { RadioButton, RadioGroup, Button, FormItem as FormItem$1, Col as Col$1, Row, Form as Form$1 } from "ant-design-vue/es";
|
|
2
2
|
import "ant-design-vue/es/form/style";
|
|
3
3
|
import "ant-design-vue/es/row/style";
|
|
4
|
-
import { toRaw, unref, computed, getCurrentInstance, reactive, readonly, watchEffect, nextTick, defineComponent, useAttrs, openBlock, createBlock, mergeProps, isRef, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString,
|
|
5
|
-
import { DtCache, CacheKey, deepMerge, Pages, useGo, useRedo, Language, useAppStore, isNumber, useI18n, isString,
|
|
6
|
-
import { cloneDeep, isEqual,
|
|
4
|
+
import { toRaw, unref, computed, getCurrentInstance, reactive, readonly, watchEffect, nextTick, defineComponent, useAttrs, openBlock, createBlock, mergeProps, isRef, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, toRefs, createVNode, isVNode, ref, watch, resolveDirective, normalizeProps, normalizeStyle, withDirectives, normalizeClass, createCommentVNode, createElementVNode, onMounted, withKeys, createSlots, renderSlot, guardReactiveProps } from "vue";
|
|
5
|
+
import { DtCache, CacheKey, deepMerge, Pages, useGo, useRedo, Language, useAppStore, isNumber, useI18n, isString, useSlots, isArray, isFunction, error, isBoolean, isNull, dispatchResize, isObject, isNullAndUnDef, isEmpty, useTimeoutFn } from "@dt-frames/core";
|
|
6
|
+
import { cloneDeep, isEqual, upperFirst, uniqBy, set } from "lodash-es";
|
|
7
7
|
import { Input, Select, TreeSelect, Radio, Checkbox, AutoComplete, Cascader, DatePicker, InputNumber, Switch, TimePicker, Slider, Rate, Divider, Col, Tooltip, Form, FormItem } from "ant-design-vue";
|
|
8
8
|
import { defineStore } from "pinia";
|
|
9
9
|
import "ant-design-vue/es/radio/style";
|
|
@@ -579,7 +579,7 @@ function useFormValue(props, key = "value", changeEvent = "change", emitData) {
|
|
|
579
579
|
});
|
|
580
580
|
return [state, setState, defaultState];
|
|
581
581
|
}
|
|
582
|
-
const _sfc_main$
|
|
582
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
583
583
|
__name: "radioButton",
|
|
584
584
|
props: {
|
|
585
585
|
value: {
|
|
@@ -630,49 +630,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
630
630
|
};
|
|
631
631
|
}
|
|
632
632
|
});
|
|
633
|
-
const _hoisted_1$1 = { class: "input-with-dialog" };
|
|
634
|
-
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
635
|
-
__name: "formInputUseDialog",
|
|
636
|
-
setup(__props) {
|
|
637
|
-
const { t } = useI18n("UI");
|
|
638
|
-
const attrs = useAttrs();
|
|
639
|
-
const bindProps = computed(() => {
|
|
640
|
-
return {
|
|
641
|
-
...omit(attrs, [
|
|
642
|
-
"formValues"
|
|
643
|
-
]),
|
|
644
|
-
disabled: true
|
|
645
|
-
};
|
|
646
|
-
});
|
|
647
|
-
function onClickInput() {
|
|
648
|
-
const { model, schema = {} } = attrs.formValues;
|
|
649
|
-
if (!schema.openDialog || !isFunction(schema.openDialog)) {
|
|
650
|
-
error(t("MUSE_FUNCTION"));
|
|
651
|
-
return;
|
|
652
|
-
}
|
|
653
|
-
schema.openDialog(model);
|
|
654
|
-
}
|
|
655
|
-
function clearProps() {
|
|
656
|
-
const { model, schema = {} } = attrs.formValues;
|
|
657
|
-
[...schema.linkProps, schema.name].forEach((it) => model[it] = null);
|
|
658
|
-
}
|
|
659
|
-
return (_ctx, _cache) => {
|
|
660
|
-
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
661
|
-
createElementVNode("div", { onClick: onClickInput }, [
|
|
662
|
-
createVNode(unref(Input), normalizeProps(guardReactiveProps(unref(bindProps))), null, 16)
|
|
663
|
-
]),
|
|
664
|
-
unref(attrs).formValues?.schema?.linkProps?.length ? (openBlock(), createElementBlock("i", {
|
|
665
|
-
key: 0,
|
|
666
|
-
class: "i mdi:close-circle",
|
|
667
|
-
onClick: clearProps
|
|
668
|
-
})) : createCommentVNode("", true)
|
|
669
|
-
]);
|
|
670
|
-
};
|
|
671
|
-
}
|
|
672
|
-
});
|
|
673
633
|
const components = {
|
|
674
634
|
Input,
|
|
675
|
-
InputWithDialog: _sfc_main$3,
|
|
676
635
|
InputTextArea: Input.TextArea,
|
|
677
636
|
InputSearch: Input.Search,
|
|
678
637
|
InputGroup: Input.Group,
|
|
@@ -681,7 +640,7 @@ const components = {
|
|
|
681
640
|
TreeSelect,
|
|
682
641
|
Radio,
|
|
683
642
|
RadioGroup: Radio.Group,
|
|
684
|
-
RadioButtonGroup: _sfc_main$
|
|
643
|
+
RadioButtonGroup: _sfc_main$3,
|
|
685
644
|
Checkbox,
|
|
686
645
|
CheckboxGroup: Checkbox.Group,
|
|
687
646
|
AutoComplete,
|
|
@@ -817,7 +776,7 @@ const _sfc_main$2 = {
|
|
|
817
776
|
const getContent = () => {
|
|
818
777
|
const value = unref(getValues);
|
|
819
778
|
let _con = slot ? getSlot(slots, slot, value.model) : render ? render(value.model) : renderFormItem();
|
|
820
|
-
return component === "InputGroup"
|
|
779
|
+
return component === "InputGroup" ? createVNode(FormItem, {
|
|
821
780
|
"class": "m-0"
|
|
822
781
|
}, _isSlot(_con) ? _con : {
|
|
823
782
|
default: () => [_con]
|
|
@@ -1356,10 +1315,7 @@ function useFormEvents({
|
|
|
1356
1315
|
});
|
|
1357
1316
|
}
|
|
1358
1317
|
async function validateFields(nameList) {
|
|
1359
|
-
|
|
1360
|
-
await unref(formElRef)?.validateFields(nameList);
|
|
1361
|
-
} catch (err) {
|
|
1362
|
-
}
|
|
1318
|
+
return unref(formElRef)?.validateFields(nameList);
|
|
1363
1319
|
}
|
|
1364
1320
|
function setFormValues(values) {
|
|
1365
1321
|
if (!values || !Object.keys(values).length) {
|
|
@@ -1467,9 +1423,7 @@ function useFormValues({
|
|
|
1467
1423
|
if (!name)
|
|
1468
1424
|
return;
|
|
1469
1425
|
let names = [];
|
|
1470
|
-
if (
|
|
1471
|
-
names = [name, ...extraName];
|
|
1472
|
-
} else if (isArray(name)) {
|
|
1426
|
+
if (isArray(name)) {
|
|
1473
1427
|
names = name;
|
|
1474
1428
|
} else {
|
|
1475
1429
|
names = [name];
|
|
@@ -1720,7 +1674,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1720
1674
|
formModel[key] = value;
|
|
1721
1675
|
const { validateTrigger } = unref(getBindValue);
|
|
1722
1676
|
if (!validateTrigger || validateTrigger === "change") {
|
|
1723
|
-
validateFields([key])
|
|
1677
|
+
validateFields([key]).catch((err) => {
|
|
1678
|
+
});
|
|
1724
1679
|
}
|
|
1725
1680
|
}
|
|
1726
1681
|
function handleEnterPress() {
|
|
@@ -1953,14 +1908,7 @@ function useForm(props) {
|
|
|
1953
1908
|
};
|
|
1954
1909
|
return [register, methods];
|
|
1955
1910
|
}
|
|
1956
|
-
const withInstall = (comp) => {
|
|
1957
|
-
comp.install = (app) => {
|
|
1958
|
-
app.component(comp.name, comp);
|
|
1959
|
-
};
|
|
1960
|
-
return comp;
|
|
1961
|
-
};
|
|
1962
|
-
const DtForm = withInstall(_sfc_main);
|
|
1963
1911
|
export {
|
|
1964
|
-
DtForm,
|
|
1912
|
+
_sfc_main as DtForm,
|
|
1965
1913
|
useForm
|
|
1966
1914
|
};
|
|
@@ -143,7 +143,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
143
143
|
'onUpdate:value': import("vue").PropType<(val: string) => void>;
|
|
144
144
|
valueModifiers: ObjectConstructor;
|
|
145
145
|
hidden: BooleanConstructor;
|
|
146
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "value" | "disabled" | "allowClear" | "loading" | "hidden" | "
|
|
146
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "value" | "disabled" | "allowClear" | "loading" | "hidden" | "bordered" | "autofocus" | "readonly" | "lazy">;
|
|
147
147
|
$attrs: {
|
|
148
148
|
[x: string]: unknown;
|
|
149
149
|
};
|
|
@@ -153,8 +153,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
153
153
|
$slots: Readonly<{
|
|
154
154
|
[name: string]: import("vue").Slot;
|
|
155
155
|
}>;
|
|
156
|
-
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}
|
|
157
|
-
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}
|
|
156
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
|
|
157
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
|
|
158
158
|
$emit: (event: string, ...args: any[]) => void;
|
|
159
159
|
$el: any;
|
|
160
160
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -236,7 +236,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
236
236
|
allowClear: boolean;
|
|
237
237
|
bordered: boolean;
|
|
238
238
|
lazy: boolean;
|
|
239
|
-
}> & {
|
|
239
|
+
}, {}, string> & {
|
|
240
240
|
beforeCreate?: (() => void) | (() => void)[];
|
|
241
241
|
created?: (() => void) | (() => void)[];
|
|
242
242
|
beforeMount?: (() => void) | (() => void)[];
|
|
@@ -251,7 +251,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
251
251
|
unmounted?: (() => void) | (() => void)[];
|
|
252
252
|
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
253
253
|
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
254
|
-
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}
|
|
254
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>, info: string) => boolean | void)[];
|
|
255
255
|
};
|
|
256
256
|
$forceUpdate: () => void;
|
|
257
257
|
$nextTick: typeof import("vue").nextTick;
|
|
@@ -407,7 +407,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
407
407
|
allowClear: boolean;
|
|
408
408
|
bordered: boolean;
|
|
409
409
|
lazy: boolean;
|
|
410
|
-
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin & {
|
|
410
|
+
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin & {
|
|
411
411
|
readonly Group: import("vue").DefineComponent<{
|
|
412
412
|
prefixCls: StringConstructor;
|
|
413
413
|
size: {
|
|
@@ -1024,8 +1024,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
1024
1024
|
$slots: Readonly<{
|
|
1025
1025
|
[name: string]: import("vue").Slot;
|
|
1026
1026
|
}>;
|
|
1027
|
-
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}
|
|
1028
|
-
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}
|
|
1027
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
|
|
1028
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
|
|
1029
1029
|
$emit: (event: string, ...args: any[]) => void;
|
|
1030
1030
|
$el: any;
|
|
1031
1031
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1084,7 +1084,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
1084
1084
|
ghost: boolean;
|
|
1085
1085
|
danger: boolean;
|
|
1086
1086
|
htmlType: import("ant-design-vue/lib/button/buttonTypes").ButtonHTMLType;
|
|
1087
|
-
}> & {
|
|
1087
|
+
}, {}, string> & {
|
|
1088
1088
|
beforeCreate?: (() => void) | (() => void)[];
|
|
1089
1089
|
created?: (() => void) | (() => void)[];
|
|
1090
1090
|
beforeMount?: (() => void) | (() => void)[];
|
|
@@ -1099,7 +1099,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
1099
1099
|
unmounted?: (() => void) | (() => void)[];
|
|
1100
1100
|
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
1101
1101
|
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
1102
|
-
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}
|
|
1102
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>, info: string) => boolean | void)[];
|
|
1103
1103
|
};
|
|
1104
1104
|
$forceUpdate: () => void;
|
|
1105
1105
|
$nextTick: typeof import("vue").nextTick;
|
|
@@ -1211,7 +1211,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
1211
1211
|
ghost: boolean;
|
|
1212
1212
|
danger: boolean;
|
|
1213
1213
|
htmlType: import("ant-design-vue/lib/button/buttonTypes").ButtonHTMLType;
|
|
1214
|
-
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin & {
|
|
1214
|
+
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin & {
|
|
1215
1215
|
readonly Group: import("vue").DefineComponent<{
|
|
1216
1216
|
prefixCls: StringConstructor;
|
|
1217
1217
|
size: {
|
|
@@ -96,7 +96,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
96
96
|
'onUpdate:value': import("vue").PropType<(val: string) => void>;
|
|
97
97
|
valueModifiers: ObjectConstructor;
|
|
98
98
|
hidden: BooleanConstructor;
|
|
99
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "value" | "disabled" | "allowClear" | "loading" | "hidden" | "
|
|
99
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "value" | "disabled" | "allowClear" | "loading" | "hidden" | "bordered" | "autofocus" | "readonly" | "lazy">;
|
|
100
100
|
$attrs: {
|
|
101
101
|
[x: string]: unknown;
|
|
102
102
|
};
|
|
@@ -106,8 +106,8 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
106
106
|
$slots: Readonly<{
|
|
107
107
|
[name: string]: import("vue").Slot;
|
|
108
108
|
}>;
|
|
109
|
-
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}
|
|
110
|
-
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}
|
|
109
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
|
|
110
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
|
|
111
111
|
$emit: (event: string, ...args: any[]) => void;
|
|
112
112
|
$el: any;
|
|
113
113
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -189,7 +189,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
189
189
|
allowClear: boolean;
|
|
190
190
|
bordered: boolean;
|
|
191
191
|
lazy: boolean;
|
|
192
|
-
}> & {
|
|
192
|
+
}, {}, string> & {
|
|
193
193
|
beforeCreate?: (() => void) | (() => void)[];
|
|
194
194
|
created?: (() => void) | (() => void)[];
|
|
195
195
|
beforeMount?: (() => void) | (() => void)[];
|
|
@@ -204,7 +204,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
204
204
|
unmounted?: (() => void) | (() => void)[];
|
|
205
205
|
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
206
206
|
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
207
|
-
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}
|
|
207
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>, info: string) => boolean | void)[];
|
|
208
208
|
};
|
|
209
209
|
$forceUpdate: () => void;
|
|
210
210
|
$nextTick: typeof import("vue").nextTick;
|
|
@@ -360,7 +360,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
360
360
|
allowClear: boolean;
|
|
361
361
|
bordered: boolean;
|
|
362
362
|
lazy: boolean;
|
|
363
|
-
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin & {
|
|
363
|
+
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin & {
|
|
364
364
|
readonly Group: import("vue").DefineComponent<{
|
|
365
365
|
prefixCls: StringConstructor;
|
|
366
366
|
size: {
|
|
@@ -18,7 +18,7 @@ export declare function useFormEvents({ emits, getSchema, formModel, defaultValu
|
|
|
18
18
|
clearValidate: (name?: string | string[]) => Promise<void>;
|
|
19
19
|
resetForms: () => void;
|
|
20
20
|
removeFormByName: (names: string | string[]) => void;
|
|
21
|
-
validateFields: (nameList: (string | number)[]) => Promise<
|
|
21
|
+
validateFields: (nameList: (string | number)[]) => Promise<any>;
|
|
22
22
|
setFormValues: (values: Recordable | null) => Promise<void>;
|
|
23
23
|
validate: (nameList: (string | number)[]) => Promise<any>;
|
|
24
24
|
appendFormItems: (schema: FormSchema[], prefixName?: string, first?: boolean) => void;
|
|
@@ -2513,7 +2513,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
2513
2513
|
setFormValues: (values: Recordable<any>) => Promise<void>;
|
|
2514
2514
|
appendFormItems: (schema: FormSchema[], prefixName?: string, first?: boolean) => void;
|
|
2515
2515
|
validate: (nameList: (string | number)[]) => Promise<any>;
|
|
2516
|
-
validateFields: (nameList: (string | number)[]) => Promise<
|
|
2516
|
+
validateFields: (nameList: (string | number)[]) => Promise<any>;
|
|
2517
2517
|
getFormValues: () => Recordable<any>;
|
|
2518
2518
|
formActionMethods: {
|
|
2519
2519
|
setProps: (formProps: FormProps) => any;
|
|
@@ -2525,7 +2525,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
2525
2525
|
setFormValues: (values: Recordable<any>) => Promise<void>;
|
|
2526
2526
|
appendFormItems: (schema: FormSchema[], prefixName?: string, first?: boolean) => void;
|
|
2527
2527
|
validate: (nameList: (string | number)[]) => Promise<any>;
|
|
2528
|
-
validateFields: (nameList: (string | number)[]) => Promise<
|
|
2528
|
+
validateFields: (nameList: (string | number)[]) => Promise<any>;
|
|
2529
2529
|
getFormValues: () => Recordable<any>;
|
|
2530
2530
|
};
|
|
2531
2531
|
getActionsProps: import("vue").ComputedRef<Recordable<any>>;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { Recordable } from "@dt-frames/core";
|
|
2
2
|
import { ComputedRef, ExtractPropTypes, Ref, VNode } from "vue";
|
|
3
|
-
import { RuleObject } from 'ant-design-vue/
|
|
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
7
|
export declare type ButtonFlag = 'OK' | 'CANCEL';
|
|
7
8
|
export declare type Rule = RuleObject & {
|
|
8
9
|
trigger?: 'blur' | 'change' | ['change', 'blur'];
|
|
9
10
|
};
|
|
10
11
|
export declare type FormProps = Partial<ExtractPropTypes<typeof BasicProps>>;
|
|
11
|
-
export declare type ComponentType = 'Input' | '
|
|
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
13
|
export declare type ColEx = {
|
|
13
14
|
style?: any;
|
|
14
15
|
span?: number | string;
|
|
@@ -18,7 +19,7 @@ export declare type ColEx = {
|
|
|
18
19
|
xl?: number | string;
|
|
19
20
|
xxl?: number | string;
|
|
20
21
|
};
|
|
21
|
-
|
|
22
|
+
declare type Schema<ComponentType, T> = {
|
|
22
23
|
t?: string;
|
|
23
24
|
name?: string | string[];
|
|
24
25
|
changeEvent?: string;
|
|
@@ -30,12 +31,13 @@ export declare type FormSchema = {
|
|
|
30
31
|
toolTip?: boolean | ((model: Recordable) => boolean);
|
|
31
32
|
toolTipProps?: TooltipProps;
|
|
32
33
|
component?: ComponentType;
|
|
33
|
-
props?: ((model: Recordable) =>
|
|
34
|
+
props?: ((model: Recordable) => T) | T;
|
|
34
35
|
required?: boolean | ((model: Recordable) => boolean) | Ref<boolean> | ComputedRef<boolean>;
|
|
35
36
|
suffix?: string | number | VNode | ((model: Recordable) => VNode | VNode[] | string);
|
|
36
37
|
prefix?: string | number | VNode | ((model: Recordable) => VNode | VNode[] | string);
|
|
37
38
|
rules?: Rule[];
|
|
38
39
|
rulesMessageJoinLabel?: boolean;
|
|
40
|
+
validateTrigger?: string | string[] | false;
|
|
39
41
|
defaultValue?: any;
|
|
40
42
|
show?: boolean | ((model: Recordable) => boolean);
|
|
41
43
|
render?: (model: Recordable) => VNode | VNode[] | string;
|
|
@@ -50,9 +52,12 @@ export declare type FormSchema = {
|
|
|
50
52
|
labelCol?: Partial<ColEx>;
|
|
51
53
|
wrapperCol?: Partial<ColEx>;
|
|
52
54
|
isAdvanced?: boolean;
|
|
53
|
-
openDialog?: (parms: Recordable) => void;
|
|
54
55
|
extraName?: string[];
|
|
55
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', {
|
|
58
|
+
disabled?: boolean;
|
|
59
|
+
[key: string]: any;
|
|
60
|
+
}> | Schema<'Rate', Rate> | Schema<'Divider', Divider>;
|
|
56
61
|
export declare type ButtonProps = {
|
|
57
62
|
t?: string;
|
|
58
63
|
label: string;
|
|
@@ -68,3 +73,4 @@ export declare type ButtonProps = {
|
|
|
68
73
|
loading?: Ref<boolean>;
|
|
69
74
|
onClick?: (args?: any) => any;
|
|
70
75
|
};
|
|
76
|
+
export {};
|