@dt-frames/ui 2.0.7 → 2.0.8
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.js +27 -16
- package/package.json +1 -1
|
@@ -630,6 +630,14 @@ 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"]]);
|
|
633
641
|
const _hoisted_1$1 = { class: "input-with-dialog" };
|
|
634
642
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
635
643
|
__name: "formInputUseDialog",
|
|
@@ -665,14 +673,15 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
665
673
|
key: 0,
|
|
666
674
|
class: "i mdi:close-circle",
|
|
667
675
|
onClick: clearProps
|
|
668
|
-
})) : createCommentVNode("", true)
|
|
676
|
+
})) : createCommentVNode("v-if", true)
|
|
669
677
|
]);
|
|
670
678
|
};
|
|
671
679
|
}
|
|
672
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"]]);
|
|
673
682
|
const components = {
|
|
674
683
|
Input,
|
|
675
|
-
InputWithDialog:
|
|
684
|
+
InputWithDialog: DtFormInputDialog,
|
|
676
685
|
InputTextArea: Input.TextArea,
|
|
677
686
|
InputSearch: Input.Search,
|
|
678
687
|
InputGroup: Input.Group,
|
|
@@ -681,7 +690,7 @@ const components = {
|
|
|
681
690
|
TreeSelect,
|
|
682
691
|
Radio,
|
|
683
692
|
RadioGroup: Radio.Group,
|
|
684
|
-
RadioButtonGroup
|
|
693
|
+
RadioButtonGroup,
|
|
685
694
|
Checkbox,
|
|
686
695
|
CheckboxGroup: Checkbox.Group,
|
|
687
696
|
AutoComplete,
|
|
@@ -1072,6 +1081,7 @@ const _sfc_main$2 = {
|
|
|
1072
1081
|
};
|
|
1073
1082
|
}
|
|
1074
1083
|
};
|
|
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"]]);
|
|
1075
1085
|
const _hoisted_1 = {
|
|
1076
1086
|
key: 0,
|
|
1077
1087
|
className: "preIcon pr-1"
|
|
@@ -1194,18 +1204,18 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1194
1204
|
icon: withCtx(() => [
|
|
1195
1205
|
button.preIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1, null, 512)), [
|
|
1196
1206
|
[_directive_icon, button.preIcon]
|
|
1197
|
-
]) : createCommentVNode("", true)
|
|
1207
|
+
]) : createCommentVNode("v-if", true)
|
|
1198
1208
|
]),
|
|
1199
1209
|
default: withCtx(() => [
|
|
1200
1210
|
createTextVNode(" " + toDisplayString(unref(t)(button.label)) + " ", 1),
|
|
1201
1211
|
button.postIcon ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2, null, 512)), [
|
|
1202
1212
|
[_directive_icon, button.postIcon]
|
|
1203
|
-
]) : createCommentVNode("", true)
|
|
1213
|
+
]) : createCommentVNode("v-if", true)
|
|
1204
1214
|
]),
|
|
1205
1215
|
_: 2
|
|
1206
1216
|
}, 1032, ["type", "class", "loading", "disabled", "onClick"])), [
|
|
1207
1217
|
[_directive_auth, button.auth]
|
|
1208
|
-
]) : createCommentVNode("", true)
|
|
1218
|
+
]) : createCommentVNode("v-if", true)
|
|
1209
1219
|
], 64);
|
|
1210
1220
|
}), 256)),
|
|
1211
1221
|
unref(showAdvanceRef) ? (openBlock(), createBlock(_component_AButton, {
|
|
@@ -1215,22 +1225,24 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1215
1225
|
onClick: toggleAdvanced
|
|
1216
1226
|
}, {
|
|
1217
1227
|
default: withCtx(() => [
|
|
1228
|
+
createCommentVNode(" \u6536\u8D77 | \u5C55\u5F00 "),
|
|
1218
1229
|
createElementVNode("span", _hoisted_3, toDisplayString(advancedRef.value ? unref(t)("UI.ADVANCED") : unref(t)("UI.EXPAND")), 1),
|
|
1219
1230
|
createElementVNode("span", {
|
|
1220
1231
|
class: normalizeClass(unref(getAdvanceClass))
|
|
1221
1232
|
}, _hoisted_5, 2)
|
|
1222
1233
|
]),
|
|
1223
1234
|
_: 1
|
|
1224
|
-
})) : createCommentVNode("", true)
|
|
1235
|
+
})) : createCommentVNode("v-if", true)
|
|
1225
1236
|
]),
|
|
1226
1237
|
_: 1
|
|
1227
1238
|
}, 8, ["style"])
|
|
1228
1239
|
]),
|
|
1229
1240
|
_: 1
|
|
1230
|
-
}, 16)) : createCommentVNode("", true);
|
|
1241
|
+
}, 16)) : createCommentVNode("v-if", true);
|
|
1231
1242
|
};
|
|
1232
1243
|
}
|
|
1233
1244
|
});
|
|
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"]]);
|
|
1234
1246
|
const SEARCH_BTN_NAME = "UI.SEARCH";
|
|
1235
1247
|
const RESET_BTN_NAME = "UI.RESET";
|
|
1236
1248
|
const SEARCH_BTNS = [
|
|
@@ -1356,10 +1368,7 @@ function useFormEvents({
|
|
|
1356
1368
|
});
|
|
1357
1369
|
}
|
|
1358
1370
|
async function validateFields(nameList) {
|
|
1359
|
-
|
|
1360
|
-
await unref(formElRef)?.validateFields(nameList);
|
|
1361
|
-
} catch (err) {
|
|
1362
|
-
}
|
|
1371
|
+
return unref(formElRef)?.validateFields(nameList);
|
|
1363
1372
|
}
|
|
1364
1373
|
function setFormValues(values) {
|
|
1365
1374
|
if (!values || !Object.keys(values).length) {
|
|
@@ -1720,7 +1729,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1720
1729
|
formModel[key] = value;
|
|
1721
1730
|
const { validateTrigger } = unref(getBindValue);
|
|
1722
1731
|
if (!validateTrigger || validateTrigger === "change") {
|
|
1723
|
-
validateFields([key])
|
|
1732
|
+
validateFields([key]).catch((err) => {
|
|
1733
|
+
});
|
|
1724
1734
|
}
|
|
1725
1735
|
}
|
|
1726
1736
|
function handleEnterPress() {
|
|
@@ -1854,7 +1864,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1854
1864
|
} }), {
|
|
1855
1865
|
default: withCtx(() => [
|
|
1856
1866
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getSchema), (schema) => {
|
|
1857
|
-
return openBlock(), createBlock(unref(
|
|
1867
|
+
return openBlock(), createBlock(unref(DtFormItem), {
|
|
1858
1868
|
key: schema.name,
|
|
1859
1869
|
schema,
|
|
1860
1870
|
formProps: unref(getProps),
|
|
@@ -1873,7 +1883,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1873
1883
|
})
|
|
1874
1884
|
]), 1032, ["schema", "formProps", "formModel", "defaultValues"]);
|
|
1875
1885
|
}), 128)),
|
|
1876
|
-
unref(getActionsProps).buttonList?.length ? (openBlock(), createBlock(unref(
|
|
1886
|
+
unref(getActionsProps).buttonList?.length ? (openBlock(), createBlock(unref(DtFormButtons), mergeProps({ key: 0 }, unref(getActionsProps), { onHandleMethod: unref(handleMethod) }), null, 16, ["onHandleMethod"])) : createCommentVNode("v-if", true)
|
|
1877
1887
|
]),
|
|
1878
1888
|
_: 3
|
|
1879
1889
|
}, 16)
|
|
@@ -1883,6 +1893,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1883
1893
|
};
|
|
1884
1894
|
}
|
|
1885
1895
|
});
|
|
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"]]);
|
|
1886
1897
|
function useForm(props) {
|
|
1887
1898
|
const formRef = ref(null);
|
|
1888
1899
|
const loadedRef = ref(false);
|
|
@@ -1959,7 +1970,7 @@ const withInstall = (comp) => {
|
|
|
1959
1970
|
};
|
|
1960
1971
|
return comp;
|
|
1961
1972
|
};
|
|
1962
|
-
const DtForm = withInstall(
|
|
1973
|
+
const DtForm = withInstall(Forms);
|
|
1963
1974
|
export {
|
|
1964
1975
|
DtForm,
|
|
1965
1976
|
useForm
|