@dt-frames/ui 2.0.8 → 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 +15 -78
- 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,58 +630,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
630
630
|
};
|
|
631
631
|
}
|
|
632
632
|
});
|
|
633
|
-
const _export_sfc = (sfc, props) => {
|
|
634
|
-
const target = sfc.__vccOpts || sfc;
|
|
635
|
-
for (const [key, val] of props) {
|
|
636
|
-
target[key] = val;
|
|
637
|
-
}
|
|
638
|
-
return target;
|
|
639
|
-
};
|
|
640
|
-
const RadioButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/form/src/components/radioButton.vue"]]);
|
|
641
|
-
const _hoisted_1$1 = { class: "input-with-dialog" };
|
|
642
|
-
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
643
|
-
__name: "formInputUseDialog",
|
|
644
|
-
setup(__props) {
|
|
645
|
-
const { t } = useI18n("UI");
|
|
646
|
-
const attrs = useAttrs();
|
|
647
|
-
const bindProps = computed(() => {
|
|
648
|
-
return {
|
|
649
|
-
...omit(attrs, [
|
|
650
|
-
"formValues"
|
|
651
|
-
]),
|
|
652
|
-
disabled: true
|
|
653
|
-
};
|
|
654
|
-
});
|
|
655
|
-
function onClickInput() {
|
|
656
|
-
const { model, schema = {} } = attrs.formValues;
|
|
657
|
-
if (!schema.openDialog || !isFunction(schema.openDialog)) {
|
|
658
|
-
error(t("MUSE_FUNCTION"));
|
|
659
|
-
return;
|
|
660
|
-
}
|
|
661
|
-
schema.openDialog(model);
|
|
662
|
-
}
|
|
663
|
-
function clearProps() {
|
|
664
|
-
const { model, schema = {} } = attrs.formValues;
|
|
665
|
-
[...schema.linkProps, schema.name].forEach((it) => model[it] = null);
|
|
666
|
-
}
|
|
667
|
-
return (_ctx, _cache) => {
|
|
668
|
-
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
669
|
-
createElementVNode("div", { onClick: onClickInput }, [
|
|
670
|
-
createVNode(unref(Input), normalizeProps(guardReactiveProps(unref(bindProps))), null, 16)
|
|
671
|
-
]),
|
|
672
|
-
unref(attrs).formValues?.schema?.linkProps?.length ? (openBlock(), createElementBlock("i", {
|
|
673
|
-
key: 0,
|
|
674
|
-
class: "i mdi:close-circle",
|
|
675
|
-
onClick: clearProps
|
|
676
|
-
})) : createCommentVNode("v-if", true)
|
|
677
|
-
]);
|
|
678
|
-
};
|
|
679
|
-
}
|
|
680
|
-
});
|
|
681
|
-
const DtFormInputDialog = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/form/src/components/formInputUseDialog.vue"]]);
|
|
682
633
|
const components = {
|
|
683
634
|
Input,
|
|
684
|
-
InputWithDialog: DtFormInputDialog,
|
|
685
635
|
InputTextArea: Input.TextArea,
|
|
686
636
|
InputSearch: Input.Search,
|
|
687
637
|
InputGroup: Input.Group,
|
|
@@ -690,7 +640,7 @@ const components = {
|
|
|
690
640
|
TreeSelect,
|
|
691
641
|
Radio,
|
|
692
642
|
RadioGroup: Radio.Group,
|
|
693
|
-
RadioButtonGroup,
|
|
643
|
+
RadioButtonGroup: _sfc_main$3,
|
|
694
644
|
Checkbox,
|
|
695
645
|
CheckboxGroup: Checkbox.Group,
|
|
696
646
|
AutoComplete,
|
|
@@ -826,7 +776,7 @@ const _sfc_main$2 = {
|
|
|
826
776
|
const getContent = () => {
|
|
827
777
|
const value = unref(getValues);
|
|
828
778
|
let _con = slot ? getSlot(slots, slot, value.model) : render ? render(value.model) : renderFormItem();
|
|
829
|
-
return component === "InputGroup"
|
|
779
|
+
return component === "InputGroup" ? createVNode(FormItem, {
|
|
830
780
|
"class": "m-0"
|
|
831
781
|
}, _isSlot(_con) ? _con : {
|
|
832
782
|
default: () => [_con]
|
|
@@ -1081,7 +1031,6 @@ const _sfc_main$2 = {
|
|
|
1081
1031
|
};
|
|
1082
1032
|
}
|
|
1083
1033
|
};
|
|
1084
|
-
const DtFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/form/src/components/FormItem.vue"]]);
|
|
1085
1034
|
const _hoisted_1 = {
|
|
1086
1035
|
key: 0,
|
|
1087
1036
|
className: "preIcon pr-1"
|
|
@@ -1204,18 +1153,18 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1204
1153
|
icon: withCtx(() => [
|
|
1205
1154
|
button.preIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1, null, 512)), [
|
|
1206
1155
|
[_directive_icon, button.preIcon]
|
|
1207
|
-
]) : createCommentVNode("
|
|
1156
|
+
]) : createCommentVNode("", true)
|
|
1208
1157
|
]),
|
|
1209
1158
|
default: withCtx(() => [
|
|
1210
1159
|
createTextVNode(" " + toDisplayString(unref(t)(button.label)) + " ", 1),
|
|
1211
1160
|
button.postIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2, null, 512)), [
|
|
1212
1161
|
[_directive_icon, button.postIcon]
|
|
1213
|
-
]) : createCommentVNode("
|
|
1162
|
+
]) : createCommentVNode("", true)
|
|
1214
1163
|
]),
|
|
1215
1164
|
_: 2
|
|
1216
1165
|
}, 1032, ["type", "class", "loading", "disabled", "onClick"])), [
|
|
1217
1166
|
[_directive_auth, button.auth]
|
|
1218
|
-
]) : createCommentVNode("
|
|
1167
|
+
]) : createCommentVNode("", true)
|
|
1219
1168
|
], 64);
|
|
1220
1169
|
}), 256)),
|
|
1221
1170
|
unref(showAdvanceRef) ? (openBlock(), createBlock(_component_AButton, {
|
|
@@ -1225,24 +1174,22 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1225
1174
|
onClick: toggleAdvanced
|
|
1226
1175
|
}, {
|
|
1227
1176
|
default: withCtx(() => [
|
|
1228
|
-
createCommentVNode(" \u6536\u8D77 | \u5C55\u5F00 "),
|
|
1229
1177
|
createElementVNode("span", _hoisted_3, toDisplayString(advancedRef.value ? unref(t)("UI.ADVANCED") : unref(t)("UI.EXPAND")), 1),
|
|
1230
1178
|
createElementVNode("span", {
|
|
1231
1179
|
class: normalizeClass(unref(getAdvanceClass))
|
|
1232
1180
|
}, _hoisted_5, 2)
|
|
1233
1181
|
]),
|
|
1234
1182
|
_: 1
|
|
1235
|
-
})) : createCommentVNode("
|
|
1183
|
+
})) : createCommentVNode("", true)
|
|
1236
1184
|
]),
|
|
1237
1185
|
_: 1
|
|
1238
1186
|
}, 8, ["style"])
|
|
1239
1187
|
]),
|
|
1240
1188
|
_: 1
|
|
1241
|
-
}, 16)) : createCommentVNode("
|
|
1189
|
+
}, 16)) : createCommentVNode("", true);
|
|
1242
1190
|
};
|
|
1243
1191
|
}
|
|
1244
1192
|
});
|
|
1245
|
-
const DtFormButtons = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/form/src/components/FormButtons.vue"]]);
|
|
1246
1193
|
const SEARCH_BTN_NAME = "UI.SEARCH";
|
|
1247
1194
|
const RESET_BTN_NAME = "UI.RESET";
|
|
1248
1195
|
const SEARCH_BTNS = [
|
|
@@ -1476,9 +1423,7 @@ function useFormValues({
|
|
|
1476
1423
|
if (!name)
|
|
1477
1424
|
return;
|
|
1478
1425
|
let names = [];
|
|
1479
|
-
if (
|
|
1480
|
-
names = [name, ...extraName];
|
|
1481
|
-
} else if (isArray(name)) {
|
|
1426
|
+
if (isArray(name)) {
|
|
1482
1427
|
names = name;
|
|
1483
1428
|
} else {
|
|
1484
1429
|
names = [name];
|
|
@@ -1864,7 +1809,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1864
1809
|
} }), {
|
|
1865
1810
|
default: withCtx(() => [
|
|
1866
1811
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getSchema), (schema) => {
|
|
1867
|
-
return openBlock(), createBlock(unref(
|
|
1812
|
+
return openBlock(), createBlock(unref(_sfc_main$2), {
|
|
1868
1813
|
key: schema.name,
|
|
1869
1814
|
schema,
|
|
1870
1815
|
formProps: unref(getProps),
|
|
@@ -1883,7 +1828,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1883
1828
|
})
|
|
1884
1829
|
]), 1032, ["schema", "formProps", "formModel", "defaultValues"]);
|
|
1885
1830
|
}), 128)),
|
|
1886
|
-
unref(getActionsProps).buttonList?.length ? (openBlock(), createBlock(unref(
|
|
1831
|
+
unref(getActionsProps).buttonList?.length ? (openBlock(), createBlock(unref(_sfc_main$1), mergeProps({ key: 0 }, unref(getActionsProps), { onHandleMethod: unref(handleMethod) }), null, 16, ["onHandleMethod"])) : createCommentVNode("", true)
|
|
1887
1832
|
]),
|
|
1888
1833
|
_: 3
|
|
1889
1834
|
}, 16)
|
|
@@ -1893,7 +1838,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1893
1838
|
};
|
|
1894
1839
|
}
|
|
1895
1840
|
});
|
|
1896
|
-
const Forms = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/form/src/index.vue"]]);
|
|
1897
1841
|
function useForm(props) {
|
|
1898
1842
|
const formRef = ref(null);
|
|
1899
1843
|
const loadedRef = ref(false);
|
|
@@ -1964,14 +1908,7 @@ function useForm(props) {
|
|
|
1964
1908
|
};
|
|
1965
1909
|
return [register, methods];
|
|
1966
1910
|
}
|
|
1967
|
-
const withInstall = (comp) => {
|
|
1968
|
-
comp.install = (app) => {
|
|
1969
|
-
app.component(comp.name, comp);
|
|
1970
|
-
};
|
|
1971
|
-
return comp;
|
|
1972
|
-
};
|
|
1973
|
-
const DtForm = withInstall(Forms);
|
|
1974
1911
|
export {
|
|
1975
|
-
DtForm,
|
|
1912
|
+
_sfc_main as DtForm,
|
|
1976
1913
|
useForm
|
|
1977
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 {};
|