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/designer.es.js
CHANGED
|
@@ -68340,13 +68340,13 @@ function registerIcon(app) {
|
|
|
68340
68340
|
if (typeof window !== "undefined") {
|
|
68341
68341
|
let loadSvg = function() {
|
|
68342
68342
|
var body = document.body;
|
|
68343
|
-
var svgDom = document.getElementById("
|
|
68343
|
+
var svgDom = document.getElementById("__svg__icons__dom__1777272735982__");
|
|
68344
68344
|
if (!svgDom) {
|
|
68345
68345
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
68346
68346
|
svgDom.style.position = "absolute";
|
|
68347
68347
|
svgDom.style.width = "0";
|
|
68348
68348
|
svgDom.style.height = "0";
|
|
68349
|
-
svgDom.id = "
|
|
68349
|
+
svgDom.id = "__svg__icons__dom__1777272735982__";
|
|
68350
68350
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
68351
68351
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
68352
68352
|
}
|
|
@@ -78453,7 +78453,6 @@ const _sfc_main$3 = {
|
|
|
78453
78453
|
data: __spreadValues({ size: this.pageSize, current: this.currentPage }, this.form)
|
|
78454
78454
|
}).then(({ data: data2 }) => {
|
|
78455
78455
|
this.tableData = data2.records;
|
|
78456
|
-
console.log(this.tableData, "this.tableData");
|
|
78457
78456
|
});
|
|
78458
78457
|
},
|
|
78459
78458
|
handleSizeChange(size) {
|
|
@@ -78496,7 +78495,6 @@ const _sfc_main$3 = {
|
|
|
78496
78495
|
},
|
|
78497
78496
|
handleSearch() {
|
|
78498
78497
|
this.currentPage = 1;
|
|
78499
|
-
this.selectedRows = [];
|
|
78500
78498
|
this.getTableData();
|
|
78501
78499
|
}
|
|
78502
78500
|
},
|
|
@@ -78749,7 +78747,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
78749
78747
|
_: 1
|
|
78750
78748
|
}, 8, ["modelValue", "onClose"]);
|
|
78751
78749
|
}
|
|
78752
|
-
var AssetDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-
|
|
78750
|
+
var AssetDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-18da89e8"]]);
|
|
78753
78751
|
var index_vue_vue_type_style_index_0_lang$1 = "";
|
|
78754
78752
|
var index_vue_vue_type_style_index_1_scoped_true_lang = "";
|
|
78755
78753
|
const _sfc_main$2 = {
|
|
@@ -78984,6 +78982,10 @@ const _sfc_main$1 = {
|
|
|
78984
78982
|
typeJson: {
|
|
78985
78983
|
type: [String, Object],
|
|
78986
78984
|
default: () => ({})
|
|
78985
|
+
},
|
|
78986
|
+
disabled: {
|
|
78987
|
+
type: Boolean,
|
|
78988
|
+
default: false
|
|
78987
78989
|
}
|
|
78988
78990
|
},
|
|
78989
78991
|
data() {
|
|
@@ -79044,6 +79046,14 @@ const _sfc_main$1 = {
|
|
|
79044
79046
|
this.formData = {};
|
|
79045
79047
|
}
|
|
79046
79048
|
}
|
|
79049
|
+
},
|
|
79050
|
+
disabled: {
|
|
79051
|
+
immediate: true,
|
|
79052
|
+
handler() {
|
|
79053
|
+
this.$nextTick(() => {
|
|
79054
|
+
this.syncFormDisabledStatus();
|
|
79055
|
+
});
|
|
79056
|
+
}
|
|
79047
79057
|
}
|
|
79048
79058
|
},
|
|
79049
79059
|
methods: {
|
|
@@ -79064,13 +79074,29 @@ const _sfc_main$1 = {
|
|
|
79064
79074
|
}
|
|
79065
79075
|
return {};
|
|
79066
79076
|
},
|
|
79077
|
+
syncFormDisabledStatus() {
|
|
79078
|
+
const ref2 = this.$refs.detailFormRender;
|
|
79079
|
+
if (!ref2) {
|
|
79080
|
+
return;
|
|
79081
|
+
}
|
|
79082
|
+
if (this.disabled) {
|
|
79083
|
+
if (typeof ref2.disableForm === "function") {
|
|
79084
|
+
ref2.disableForm();
|
|
79085
|
+
}
|
|
79086
|
+
} else if (typeof ref2.enableForm === "function") {
|
|
79087
|
+
ref2.enableForm();
|
|
79088
|
+
}
|
|
79089
|
+
},
|
|
79067
79090
|
applyFormJsonToRender(parsed) {
|
|
79068
79091
|
this.formJson = parsed && parsed.widgetList && parsed.formConfig ? parsed : lodash.exports.cloneDeep(this.defaultFormJson);
|
|
79069
79092
|
this.$nextTick(() => {
|
|
79070
79093
|
const ref2 = this.$refs.detailFormRender;
|
|
79071
79094
|
if (ref2 && typeof ref2.setFormJson === "function") {
|
|
79072
79095
|
ref2.setFormJson(lodash.exports.cloneDeep(this.formJson));
|
|
79073
|
-
this
|
|
79096
|
+
this.$nextTick(() => {
|
|
79097
|
+
this.syncFormDisabledStatus();
|
|
79098
|
+
this.flushPendingColHiddenOps();
|
|
79099
|
+
});
|
|
79074
79100
|
}
|
|
79075
79101
|
});
|
|
79076
79102
|
},
|
|
@@ -79199,7 +79225,8 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
79199
79225
|
])]),
|
|
79200
79226
|
_: 1
|
|
79201
79227
|
}, 8, ["onClick"]),
|
|
79202
|
-
|
|
79228
|
+
!$props.disabled ? (openBlock(), createBlock(_component_el_button, {
|
|
79229
|
+
key: 0,
|
|
79203
79230
|
type: "primary",
|
|
79204
79231
|
onClick: $options.handleConfirm
|
|
79205
79232
|
}, {
|
|
@@ -79207,7 +79234,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
79207
79234
|
createTextVNode("\u786E\u5B9A", -1)
|
|
79208
79235
|
])]),
|
|
79209
79236
|
_: 1
|
|
79210
|
-
}, 8, ["onClick"])
|
|
79237
|
+
}, 8, ["onClick"])) : createCommentVNode("", true)
|
|
79211
79238
|
])
|
|
79212
79239
|
]),
|
|
79213
79240
|
default: withCtx(() => [
|
|
@@ -79224,7 +79251,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
79224
79251
|
_: 1
|
|
79225
79252
|
}, 8, ["modelValue", "onClose"]);
|
|
79226
79253
|
}
|
|
79227
|
-
var DetailDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
79254
|
+
var DetailDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-0f9f38bd"]]);
|
|
79228
79255
|
var index_vue_vue_type_style_index_0_lang = "";
|
|
79229
79256
|
const _sfc_main = {
|
|
79230
79257
|
name: "asset-table-widget",
|
|
@@ -79312,6 +79339,13 @@ const _sfc_main = {
|
|
|
79312
79339
|
this.triggerEvent("onClose");
|
|
79313
79340
|
this.dispatch("VFormRender", "fieldValidation", [this.getPropName()]);
|
|
79314
79341
|
},
|
|
79342
|
+
updateRowData(row) {
|
|
79343
|
+
const index2 = this.fieldModel.findIndex((item) => item.id === row.id);
|
|
79344
|
+
if (index2 === -1)
|
|
79345
|
+
return;
|
|
79346
|
+
this.fieldModel[index2] = __spreadValues(__spreadValues({}, this.fieldModel[index2]), row);
|
|
79347
|
+
console.log(this.fieldModel, "this.fieldModel");
|
|
79348
|
+
},
|
|
79315
79349
|
triggerEvent(eventName, ...args) {
|
|
79316
79350
|
var _a2, _b2;
|
|
79317
79351
|
const handler = (_b2 = (_a2 = this.field) == null ? void 0 : _a2.options) == null ? void 0 : _b2[eventName];
|
|
@@ -79321,6 +79355,14 @@ const _sfc_main = {
|
|
|
79321
79355
|
const rowData = args[0];
|
|
79322
79356
|
const fn = new Function("rowData", handler);
|
|
79323
79357
|
fn.call(this, rowData);
|
|
79358
|
+
``;
|
|
79359
|
+
} else if (args.length > 0) {
|
|
79360
|
+
const paramNames = args.map((_, index2) => `arg${index2}`).join(", ");
|
|
79361
|
+
const fn = new Function(paramNames, handler);
|
|
79362
|
+
fn.apply(this, args);
|
|
79363
|
+
} else {
|
|
79364
|
+
const fn = new Function(handler);
|
|
79365
|
+
fn.call(this);
|
|
79324
79366
|
}
|
|
79325
79367
|
} catch (error) {
|
|
79326
79368
|
console.error(`Error executing ${eventName} handler:`, error);
|
|
@@ -79330,9 +79372,12 @@ const _sfc_main = {
|
|
|
79330
79372
|
}
|
|
79331
79373
|
},
|
|
79332
79374
|
handleRow(row) {
|
|
79375
|
+
const index2 = this.fieldModel.findIndex((item) => item.id === row.id);
|
|
79376
|
+
if (index2 === -1)
|
|
79377
|
+
return;
|
|
79378
|
+
this.triggerEvent("onOpen", this.fieldModel[index2]);
|
|
79333
79379
|
this.detailDialogVisible = true;
|
|
79334
|
-
this.detailDialogData = lodash.exports.cloneDeep(
|
|
79335
|
-
this.triggerEvent("onOpen", row);
|
|
79380
|
+
this.detailDialogData = lodash.exports.cloneDeep(this.fieldModel[index2]);
|
|
79336
79381
|
},
|
|
79337
79382
|
setDetailColHidden(colNames, hidden) {
|
|
79338
79383
|
this.$nextTick(() => {
|
|
@@ -79453,8 +79498,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
79453
79498
|
typeJson: $props.field.options.typeJson,
|
|
79454
79499
|
data: $data.detailDialogData,
|
|
79455
79500
|
onClose: $options.handleCloseDetailDialog,
|
|
79456
|
-
onConfirm: $options.handleConfirm
|
|
79457
|
-
|
|
79501
|
+
onConfirm: $options.handleConfirm,
|
|
79502
|
+
disabled: $props.field.options.disabled
|
|
79503
|
+
}, null, 8, ["visible", "typeJson", "data", "onClose", "onConfirm", "disabled"])
|
|
79458
79504
|
]),
|
|
79459
79505
|
_: 1
|
|
79460
79506
|
}, 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"]);
|