dfs-page-config 0.4.58 → 0.4.60
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/dfs-page-config.js +46 -27
- package/dist/dfs-page-config.umd.cjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/dfs-page-config.js
CHANGED
|
@@ -28683,40 +28683,43 @@ const __unplugin_components_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["re
|
|
|
28683
28683
|
if (pe.validate)
|
|
28684
28684
|
ae.value.validate((kt) => {
|
|
28685
28685
|
if (kt) {
|
|
28686
|
-
|
|
28686
|
+
const jt = $e(Ue);
|
|
28687
|
+
if (jt === !1)
|
|
28687
28688
|
return;
|
|
28688
|
-
Et(Dt);
|
|
28689
|
+
Et(Dt, jt);
|
|
28689
28690
|
}
|
|
28690
28691
|
});
|
|
28691
28692
|
else {
|
|
28692
|
-
|
|
28693
|
+
const kt = $e(Ue);
|
|
28694
|
+
if (kt === !1)
|
|
28693
28695
|
return;
|
|
28694
|
-
Et(Dt);
|
|
28696
|
+
Et(Dt, kt);
|
|
28695
28697
|
}
|
|
28696
28698
|
}
|
|
28697
28699
|
function $e(Dt) {
|
|
28698
28700
|
if (pe.submitBefore) {
|
|
28699
28701
|
let Ue = {};
|
|
28700
|
-
|
|
28701
|
-
|
|
28702
|
+
pe.relation && (Ue = getRelationComp(ie, k.pageKey, pe.relation));
|
|
28703
|
+
const kt = pe.submitBefore({ relation: Ue, formData: pe.formData, row: pe.row, triggerButton: Dt });
|
|
28704
|
+
return kt === !1 ? !1 : kt;
|
|
28702
28705
|
}
|
|
28703
28706
|
return !0;
|
|
28704
28707
|
}
|
|
28705
|
-
function Et(Dt) {
|
|
28708
|
+
function Et(Dt, Ue) {
|
|
28706
28709
|
ie.commit("setLoading", !0);
|
|
28707
|
-
let
|
|
28710
|
+
let kt = pe.method == "GET" ? "params" : "data";
|
|
28708
28711
|
service({
|
|
28709
28712
|
url: ie.state._BASE_URL + pe.url,
|
|
28710
|
-
[
|
|
28713
|
+
[kt]: typeof Ue == "object" ? Ue : pe.formData || {},
|
|
28711
28714
|
method: pe.method || "POST"
|
|
28712
|
-
}).then((
|
|
28715
|
+
}).then((jt) => {
|
|
28713
28716
|
if (pe.submitAfter) {
|
|
28714
|
-
let
|
|
28715
|
-
pe.relation && (
|
|
28717
|
+
let tr = {};
|
|
28718
|
+
pe.relation && (tr = getRelationComp(ie, k.pageKey, pe.relation)), pe.submitAfter({ res: jt, relation: tr, formData: pe.formData, row: pe.row });
|
|
28716
28719
|
}
|
|
28717
28720
|
Dt({ ..._e.formData });
|
|
28718
|
-
}).catch((
|
|
28719
|
-
console.log(
|
|
28721
|
+
}).catch((jt) => {
|
|
28722
|
+
console.log(jt);
|
|
28720
28723
|
}).finally(() => {
|
|
28721
28724
|
ie.commit("setLoading", !1);
|
|
28722
28725
|
});
|
|
@@ -28733,7 +28736,7 @@ const __unplugin_components_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["re
|
|
|
28733
28736
|
remoteMethod: Oe
|
|
28734
28737
|
};
|
|
28735
28738
|
}
|
|
28736
|
-
}),
|
|
28739
|
+
}), Form_vue_vue_type_style_index_0_scoped_0c9aa8ab_lang = "", _hoisted_1$g = {
|
|
28737
28740
|
key: 0,
|
|
28738
28741
|
class: "mask"
|
|
28739
28742
|
};
|
|
@@ -29054,7 +29057,7 @@ function _sfc_render$h(k, L, ie, ae, pe, _e) {
|
|
|
29054
29057
|
_: 3
|
|
29055
29058
|
}, 8, ["class", "model", "size", "inline", "label-width", "style"]);
|
|
29056
29059
|
}
|
|
29057
|
-
const Form = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-
|
|
29060
|
+
const Form = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-0c9aa8ab"]]), _sfc_main$h = defineComponent({
|
|
29058
29061
|
name: "Upload",
|
|
29059
29062
|
props: {
|
|
29060
29063
|
url: String,
|
|
@@ -29095,7 +29098,7 @@ const Form = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h]
|
|
|
29095
29098
|
default: "small"
|
|
29096
29099
|
}
|
|
29097
29100
|
},
|
|
29098
|
-
emits: ["onSuccess"],
|
|
29101
|
+
emits: ["onSuccess", "onError"],
|
|
29099
29102
|
setup(k, L) {
|
|
29100
29103
|
const { t: ie } = getCurrentInstance().appContext.config.globalProperties.useI18n(), ae = useStore(), pe = ref(), _e = reactive({
|
|
29101
29104
|
uploadUrl: computed$1(
|
|
@@ -29114,11 +29117,11 @@ const Form = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h]
|
|
|
29114
29117
|
xe.value = !0, ae.commit("setLoading", !0);
|
|
29115
29118
|
}
|
|
29116
29119
|
function $e(qe) {
|
|
29117
|
-
qe.code == 0 ? (ElMessage.success(qe.msg || ie("上传成功")), L.emit("onSuccess", qe)) : ElMessage.error(qe.msg), xe.value = !1, ae.commit("setLoading", !1);
|
|
29120
|
+
qe.code == 0 ? (ElMessage.success(qe.msg || ie("上传成功")), L.emit("onSuccess", qe)) : (ElMessage.error(qe.msg), L.emit("onError", qe)), xe.value = !1, ae.commit("setLoading", !1);
|
|
29118
29121
|
}
|
|
29119
29122
|
function Et(qe) {
|
|
29120
29123
|
const Dt = qe.toString(), Ue = new RegExp('"msg":"(.*?)(?<!\\\\)"'), kt = Dt.match(Ue);
|
|
29121
|
-
kt && ElMessage.error(kt[1]), xe.value = !1, ae.commit("setLoading", !1);
|
|
29124
|
+
kt && ElMessage.error(kt[1]), xe.value = !1, ae.commit("setLoading", !1), L.emit("onError", qe);
|
|
29122
29125
|
}
|
|
29123
29126
|
return {
|
|
29124
29127
|
...toRefs(_e),
|
|
@@ -29748,7 +29751,7 @@ const _sfc_main$g = defineComponent({
|
|
|
29748
29751
|
}, Ue);
|
|
29749
29752
|
}
|
|
29750
29753
|
function Dt(Ue, kt) {
|
|
29751
|
-
kt.queryTarget && _e(kt.queryTarget);
|
|
29754
|
+
kt.queryTarget && _e(kt.queryTarget), kt.onSuccess && kt.onSuccess(Ue);
|
|
29752
29755
|
}
|
|
29753
29756
|
return {
|
|
29754
29757
|
...toRefs(ie),
|
|
@@ -29759,7 +29762,7 @@ const _sfc_main$g = defineComponent({
|
|
|
29759
29762
|
// exportData
|
|
29760
29763
|
};
|
|
29761
29764
|
}
|
|
29762
|
-
}),
|
|
29765
|
+
}), ButtonGroup_vue_vue_type_style_index_0_scoped_67d1b0c0_lang = "", ButtonGroup_vue_vue_type_style_index_1_lang = "", _hoisted_1$f = ["onClick"];
|
|
29763
29766
|
function _sfc_render$f(k, L, ie, ae, pe, _e) {
|
|
29764
29767
|
const xe = Upload, Oe = ElIcon, Ie = ElButton;
|
|
29765
29768
|
return openBlock(), createElementBlock("div", {
|
|
@@ -29775,11 +29778,12 @@ function _sfc_render$f(k, L, ie, ae, pe, _e) {
|
|
|
29775
29778
|
url: Ne.url,
|
|
29776
29779
|
text: Ne.text,
|
|
29777
29780
|
onOnSuccess: ($e) => k.uploadSuccess($e, Ne),
|
|
29781
|
+
onOnError: ($e) => Ne.onError && Ne.onError($e),
|
|
29778
29782
|
buttonType: Ne.buttonType,
|
|
29779
29783
|
type: Ne.type,
|
|
29780
29784
|
style: normalizeStyle(Ne.style),
|
|
29781
29785
|
size: k.size
|
|
29782
|
-
}, null, 8, ["url", "text", "onOnSuccess", "buttonType", "type", "style", "size"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
29786
|
+
}, null, 8, ["url", "text", "onOnSuccess", "onOnError", "buttonType", "type", "style", "size"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
29783
29787
|
Ne.type === "text" ? (openBlock(), createElementBlock("span", {
|
|
29784
29788
|
key: 0,
|
|
29785
29789
|
class: "dfs-text-btn",
|
|
@@ -29814,7 +29818,7 @@ function _sfc_render$f(k, L, ie, ae, pe, _e) {
|
|
|
29814
29818
|
renderSlot(k.$slots, "default", {}, void 0, !0)
|
|
29815
29819
|
], 4);
|
|
29816
29820
|
}
|
|
29817
|
-
const ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__scopeId", "data-v-
|
|
29821
|
+
const ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__scopeId", "data-v-67d1b0c0"]]), _sfc_main$f = defineComponent({
|
|
29818
29822
|
props: {
|
|
29819
29823
|
gridApi: {
|
|
29820
29824
|
type: Object,
|
|
@@ -101427,7 +101431,7 @@ const CellItemEdit = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_r
|
|
|
101427
101431
|
Ue.prop && (Ie[Ue.prop] = Ue.value ?? null);
|
|
101428
101432
|
});
|
|
101429
101433
|
}
|
|
101430
|
-
}), setTimeout(() => {
|
|
101434
|
+
}), Oe && setTimeout(() => {
|
|
101431
101435
|
Object.keys(Oe).forEach((Et) => {
|
|
101432
101436
|
Ie[Et] = Oe[Et];
|
|
101433
101437
|
}), Oe = null;
|
|
@@ -101648,10 +101652,25 @@ const __unplugin_components_0 = { name: "ep-warning-filled", render: render$1 },
|
|
|
101648
101652
|
});
|
|
101649
101653
|
let ae = {};
|
|
101650
101654
|
function pe(xe) {
|
|
101655
|
+
ae = {};
|
|
101651
101656
|
const Oe = getTargetComp(L, k.pageKey, ie.option.target);
|
|
101652
|
-
Oe.currentRow = xe,
|
|
101653
|
-
|
|
101654
|
-
|
|
101657
|
+
if (Oe.currentRow = xe, Oe.beforeOpen && Oe.beforeOpen({ component: Oe }) === !1)
|
|
101658
|
+
return;
|
|
101659
|
+
let Ie = null;
|
|
101660
|
+
Oe.children && Oe.children.forEach((Ne) => {
|
|
101661
|
+
if (Ne.type === "Form" && (xe && (Ne.row = xe), ae = Ne, Oe.beforeOpen)) {
|
|
101662
|
+
const $e = Ne.formData;
|
|
101663
|
+
Ie = JSON.parse(JSON.stringify($e));
|
|
101664
|
+
const Et = Ne.elementGroup;
|
|
101665
|
+
Et && Et.length && Et.forEach((qe) => {
|
|
101666
|
+
qe.prop && ($e[qe.prop] = qe.value ?? null);
|
|
101667
|
+
}), Ie && setTimeout(() => {
|
|
101668
|
+
Object.keys(Ie).forEach((qe) => {
|
|
101669
|
+
$e[qe] = Ie[qe];
|
|
101670
|
+
}), Ie = null;
|
|
101671
|
+
});
|
|
101672
|
+
}
|
|
101673
|
+
}), ie.component = Oe, ie.dialog = !0;
|
|
101655
101674
|
}
|
|
101656
101675
|
function _e() {
|
|
101657
101676
|
ie.component.beforeClose && ie.component.beforeClose({ component: ie.component }) === !1 || (ie.dialog = !1, ae.reset && ae.reset());
|