form-custom-test 3.0.100 → 3.0.102
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/designer.es.js +59 -13
- package/dist/designer.style.css +1 -1
- package/dist/designer.umd.js +13 -13
- package/dist/render.es.js +59 -13
- package/dist/render.style.css +1 -1
- package/dist/render.umd.js +61 -61
- package/package.json +1 -1
package/dist/render.es.js
CHANGED
|
@@ -26102,13 +26102,13 @@ function registerIcon(app) {
|
|
|
26102
26102
|
if (typeof window !== "undefined") {
|
|
26103
26103
|
let loadSvg = function() {
|
|
26104
26104
|
var body = document.body;
|
|
26105
|
-
var svgDom = document.getElementById("
|
|
26105
|
+
var svgDom = document.getElementById("__svg__icons__dom__1777272744315__");
|
|
26106
26106
|
if (!svgDom) {
|
|
26107
26107
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
26108
26108
|
svgDom.style.position = "absolute";
|
|
26109
26109
|
svgDom.style.width = "0";
|
|
26110
26110
|
svgDom.style.height = "0";
|
|
26111
|
-
svgDom.id = "
|
|
26111
|
+
svgDom.id = "__svg__icons__dom__1777272744315__";
|
|
26112
26112
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
26113
26113
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
26114
26114
|
}
|
|
@@ -61762,7 +61762,6 @@ const _sfc_main$3 = {
|
|
|
61762
61762
|
data: __spreadValues({ size: this.pageSize, current: this.currentPage }, this.form)
|
|
61763
61763
|
}).then(({ data: data2 }) => {
|
|
61764
61764
|
this.tableData = data2.records;
|
|
61765
|
-
console.log(this.tableData, "this.tableData");
|
|
61766
61765
|
});
|
|
61767
61766
|
},
|
|
61768
61767
|
handleSizeChange(size) {
|
|
@@ -61805,7 +61804,6 @@ const _sfc_main$3 = {
|
|
|
61805
61804
|
},
|
|
61806
61805
|
handleSearch() {
|
|
61807
61806
|
this.currentPage = 1;
|
|
61808
|
-
this.selectedRows = [];
|
|
61809
61807
|
this.getTableData();
|
|
61810
61808
|
}
|
|
61811
61809
|
},
|
|
@@ -62058,7 +62056,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
62058
62056
|
_: 1
|
|
62059
62057
|
}, 8, ["modelValue", "onClose"]);
|
|
62060
62058
|
}
|
|
62061
|
-
var AssetDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-
|
|
62059
|
+
var AssetDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-18da89e8"]]);
|
|
62062
62060
|
var index_vue_vue_type_style_index_0_lang$1 = "";
|
|
62063
62061
|
var index_vue_vue_type_style_index_1_scoped_true_lang = "";
|
|
62064
62062
|
const _sfc_main$2 = {
|
|
@@ -62293,6 +62291,10 @@ const _sfc_main$1 = {
|
|
|
62293
62291
|
typeJson: {
|
|
62294
62292
|
type: [String, Object],
|
|
62295
62293
|
default: () => ({})
|
|
62294
|
+
},
|
|
62295
|
+
disabled: {
|
|
62296
|
+
type: Boolean,
|
|
62297
|
+
default: false
|
|
62296
62298
|
}
|
|
62297
62299
|
},
|
|
62298
62300
|
data() {
|
|
@@ -62353,6 +62355,14 @@ const _sfc_main$1 = {
|
|
|
62353
62355
|
this.formData = {};
|
|
62354
62356
|
}
|
|
62355
62357
|
}
|
|
62358
|
+
},
|
|
62359
|
+
disabled: {
|
|
62360
|
+
immediate: true,
|
|
62361
|
+
handler() {
|
|
62362
|
+
this.$nextTick(() => {
|
|
62363
|
+
this.syncFormDisabledStatus();
|
|
62364
|
+
});
|
|
62365
|
+
}
|
|
62356
62366
|
}
|
|
62357
62367
|
},
|
|
62358
62368
|
methods: {
|
|
@@ -62373,13 +62383,29 @@ const _sfc_main$1 = {
|
|
|
62373
62383
|
}
|
|
62374
62384
|
return {};
|
|
62375
62385
|
},
|
|
62386
|
+
syncFormDisabledStatus() {
|
|
62387
|
+
const ref2 = this.$refs.detailFormRender;
|
|
62388
|
+
if (!ref2) {
|
|
62389
|
+
return;
|
|
62390
|
+
}
|
|
62391
|
+
if (this.disabled) {
|
|
62392
|
+
if (typeof ref2.disableForm === "function") {
|
|
62393
|
+
ref2.disableForm();
|
|
62394
|
+
}
|
|
62395
|
+
} else if (typeof ref2.enableForm === "function") {
|
|
62396
|
+
ref2.enableForm();
|
|
62397
|
+
}
|
|
62398
|
+
},
|
|
62376
62399
|
applyFormJsonToRender(parsed) {
|
|
62377
62400
|
this.formJson = parsed && parsed.widgetList && parsed.formConfig ? parsed : lodash.exports.cloneDeep(this.defaultFormJson);
|
|
62378
62401
|
this.$nextTick(() => {
|
|
62379
62402
|
const ref2 = this.$refs.detailFormRender;
|
|
62380
62403
|
if (ref2 && typeof ref2.setFormJson === "function") {
|
|
62381
62404
|
ref2.setFormJson(lodash.exports.cloneDeep(this.formJson));
|
|
62382
|
-
this
|
|
62405
|
+
this.$nextTick(() => {
|
|
62406
|
+
this.syncFormDisabledStatus();
|
|
62407
|
+
this.flushPendingColHiddenOps();
|
|
62408
|
+
});
|
|
62383
62409
|
}
|
|
62384
62410
|
});
|
|
62385
62411
|
},
|
|
@@ -62508,7 +62534,8 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
62508
62534
|
])]),
|
|
62509
62535
|
_: 1
|
|
62510
62536
|
}, 8, ["onClick"]),
|
|
62511
|
-
|
|
62537
|
+
!$props.disabled ? (openBlock(), createBlock(_component_el_button, {
|
|
62538
|
+
key: 0,
|
|
62512
62539
|
type: "primary",
|
|
62513
62540
|
onClick: $options.handleConfirm
|
|
62514
62541
|
}, {
|
|
@@ -62516,7 +62543,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
62516
62543
|
createTextVNode("\u786E\u5B9A", -1)
|
|
62517
62544
|
])]),
|
|
62518
62545
|
_: 1
|
|
62519
|
-
}, 8, ["onClick"])
|
|
62546
|
+
}, 8, ["onClick"])) : createCommentVNode("", true)
|
|
62520
62547
|
])
|
|
62521
62548
|
]),
|
|
62522
62549
|
default: withCtx(() => [
|
|
@@ -62533,7 +62560,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
62533
62560
|
_: 1
|
|
62534
62561
|
}, 8, ["modelValue", "onClose"]);
|
|
62535
62562
|
}
|
|
62536
|
-
var DetailDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
62563
|
+
var DetailDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-0f9f38bd"]]);
|
|
62537
62564
|
var index_vue_vue_type_style_index_0_lang = "";
|
|
62538
62565
|
const _sfc_main = {
|
|
62539
62566
|
name: "asset-table-widget",
|
|
@@ -62621,6 +62648,13 @@ const _sfc_main = {
|
|
|
62621
62648
|
this.triggerEvent("onClose");
|
|
62622
62649
|
this.dispatch("VFormRender", "fieldValidation", [this.getPropName()]);
|
|
62623
62650
|
},
|
|
62651
|
+
updateRowData(row) {
|
|
62652
|
+
const index2 = this.fieldModel.findIndex((item) => item.id === row.id);
|
|
62653
|
+
if (index2 === -1)
|
|
62654
|
+
return;
|
|
62655
|
+
this.fieldModel[index2] = __spreadValues(__spreadValues({}, this.fieldModel[index2]), row);
|
|
62656
|
+
console.log(this.fieldModel, "this.fieldModel");
|
|
62657
|
+
},
|
|
62624
62658
|
triggerEvent(eventName, ...args) {
|
|
62625
62659
|
var _a, _b;
|
|
62626
62660
|
const handler = (_b = (_a = this.field) == null ? void 0 : _a.options) == null ? void 0 : _b[eventName];
|
|
@@ -62630,6 +62664,14 @@ const _sfc_main = {
|
|
|
62630
62664
|
const rowData = args[0];
|
|
62631
62665
|
const fn = new Function("rowData", handler);
|
|
62632
62666
|
fn.call(this, rowData);
|
|
62667
|
+
``;
|
|
62668
|
+
} else if (args.length > 0) {
|
|
62669
|
+
const paramNames = args.map((_, index2) => `arg${index2}`).join(", ");
|
|
62670
|
+
const fn = new Function(paramNames, handler);
|
|
62671
|
+
fn.apply(this, args);
|
|
62672
|
+
} else {
|
|
62673
|
+
const fn = new Function(handler);
|
|
62674
|
+
fn.call(this);
|
|
62633
62675
|
}
|
|
62634
62676
|
} catch (error) {
|
|
62635
62677
|
console.error(`Error executing ${eventName} handler:`, error);
|
|
@@ -62639,9 +62681,12 @@ const _sfc_main = {
|
|
|
62639
62681
|
}
|
|
62640
62682
|
},
|
|
62641
62683
|
handleRow(row) {
|
|
62684
|
+
const index2 = this.fieldModel.findIndex((item) => item.id === row.id);
|
|
62685
|
+
if (index2 === -1)
|
|
62686
|
+
return;
|
|
62687
|
+
this.triggerEvent("onOpen", this.fieldModel[index2]);
|
|
62642
62688
|
this.detailDialogVisible = true;
|
|
62643
|
-
this.detailDialogData = lodash.exports.cloneDeep(
|
|
62644
|
-
this.triggerEvent("onOpen", row);
|
|
62689
|
+
this.detailDialogData = lodash.exports.cloneDeep(this.fieldModel[index2]);
|
|
62645
62690
|
},
|
|
62646
62691
|
setDetailColHidden(colNames, hidden) {
|
|
62647
62692
|
this.$nextTick(() => {
|
|
@@ -62762,8 +62807,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
62762
62807
|
typeJson: $props.field.options.typeJson,
|
|
62763
62808
|
data: $data.detailDialogData,
|
|
62764
62809
|
onClose: $options.handleCloseDetailDialog,
|
|
62765
|
-
onConfirm: $options.handleConfirm
|
|
62766
|
-
|
|
62810
|
+
onConfirm: $options.handleConfirm,
|
|
62811
|
+
disabled: $props.field.options.disabled
|
|
62812
|
+
}, null, 8, ["visible", "typeJson", "data", "onClose", "onConfirm", "disabled"])
|
|
62767
62813
|
]),
|
|
62768
62814
|
_: 1
|
|
62769
62815
|
}, 8, ["designer", "field", "rules", "design-state", "parent-widget", "parent-list", "index-of-parent-list", "sub-form-row-index", "sub-form-col-index", "sub-form-row-id"]);
|