form-custom-test 3.0.235 → 3.0.237
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 +347 -233
- package/dist/designer.style.css +1 -1
- package/dist/designer.umd.js +2 -2
- package/dist/render.es.js +347 -233
- package/dist/render.style.css +1 -1
- package/dist/render.umd.js +2 -2
- package/package.json +1 -1
package/dist/designer.es.js
CHANGED
|
@@ -69322,13 +69322,13 @@ function registerIcon(app) {
|
|
|
69322
69322
|
if (typeof window !== "undefined") {
|
|
69323
69323
|
let loadSvg = function() {
|
|
69324
69324
|
var body = document.body;
|
|
69325
|
-
var svgDom = document.getElementById("
|
|
69325
|
+
var svgDom = document.getElementById("__svg__icons__dom__1784265155149__");
|
|
69326
69326
|
if (!svgDom) {
|
|
69327
69327
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
69328
69328
|
svgDom.style.position = "absolute";
|
|
69329
69329
|
svgDom.style.width = "0";
|
|
69330
69330
|
svgDom.style.height = "0";
|
|
69331
|
-
svgDom.id = "
|
|
69331
|
+
svgDom.id = "__svg__icons__dom__1784265155149__";
|
|
69332
69332
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
69333
69333
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
69334
69334
|
}
|
|
@@ -78069,7 +78069,8 @@ const _sfc_main$l = {
|
|
|
78069
78069
|
dialogFormData: {},
|
|
78070
78070
|
dialogFormRules: {},
|
|
78071
78071
|
editingIndex: -1,
|
|
78072
|
-
syncFromFormModel: false
|
|
78072
|
+
syncFromFormModel: false,
|
|
78073
|
+
rules: []
|
|
78073
78074
|
};
|
|
78074
78075
|
},
|
|
78075
78076
|
computed: {
|
|
@@ -78095,6 +78096,22 @@ const _sfc_main$l = {
|
|
|
78095
78096
|
}
|
|
78096
78097
|
},
|
|
78097
78098
|
watch: {
|
|
78099
|
+
"widget.options.required"() {
|
|
78100
|
+
this.buildFieldRules();
|
|
78101
|
+
},
|
|
78102
|
+
"widget.options.validation"() {
|
|
78103
|
+
this.buildFieldRules();
|
|
78104
|
+
},
|
|
78105
|
+
"widget.options.onValidate"() {
|
|
78106
|
+
this.buildFieldRules();
|
|
78107
|
+
},
|
|
78108
|
+
"widget.options.hidden"(val) {
|
|
78109
|
+
if (val) {
|
|
78110
|
+
this.clearFieldRules();
|
|
78111
|
+
} else {
|
|
78112
|
+
this.buildFieldRules();
|
|
78113
|
+
}
|
|
78114
|
+
},
|
|
78098
78115
|
formModel: {
|
|
78099
78116
|
handler(newVal) {
|
|
78100
78117
|
this.syncFromFormModel = true;
|
|
@@ -78124,11 +78141,96 @@ const _sfc_main$l = {
|
|
|
78124
78141
|
created() {
|
|
78125
78142
|
this.initRefList();
|
|
78126
78143
|
this.initEventHandler();
|
|
78144
|
+
this.buildFieldRules();
|
|
78127
78145
|
},
|
|
78128
78146
|
beforeUnmount() {
|
|
78129
78147
|
this.unregisterFromRefList();
|
|
78130
78148
|
},
|
|
78131
78149
|
methods: {
|
|
78150
|
+
getPropName() {
|
|
78151
|
+
var _a2, _b2;
|
|
78152
|
+
return ((_b2 = (_a2 = this.widget) == null ? void 0 : _a2.options) == null ? void 0 : _b2.name) || "";
|
|
78153
|
+
},
|
|
78154
|
+
clearFieldRules() {
|
|
78155
|
+
var _a2;
|
|
78156
|
+
if (!((_a2 = this.widget) == null ? void 0 : _a2.formItemFlag)) {
|
|
78157
|
+
return;
|
|
78158
|
+
}
|
|
78159
|
+
this.rules.splice(0, this.rules.length);
|
|
78160
|
+
},
|
|
78161
|
+
buildFieldRules() {
|
|
78162
|
+
var _a2;
|
|
78163
|
+
if (!((_a2 = this.widget) == null ? void 0 : _a2.formItemFlag)) {
|
|
78164
|
+
return;
|
|
78165
|
+
}
|
|
78166
|
+
this.rules.splice(0, this.rules.length);
|
|
78167
|
+
if (this.widget.options.hidden) {
|
|
78168
|
+
return;
|
|
78169
|
+
}
|
|
78170
|
+
if (this.widget.options.required) {
|
|
78171
|
+
const message = this.widget.options.requiredHint || this.i18nt("render.hint.fieldRequired") || `\u8BF7\u6DFB\u52A0${this.widget.options.label || "\u5B50\u8868\u683C"}\u6570\u636E`;
|
|
78172
|
+
this.rules.push({
|
|
78173
|
+
type: "array",
|
|
78174
|
+
required: true,
|
|
78175
|
+
min: 1,
|
|
78176
|
+
message,
|
|
78177
|
+
trigger: "change"
|
|
78178
|
+
});
|
|
78179
|
+
}
|
|
78180
|
+
if (this.widget.options.validation) {
|
|
78181
|
+
const vldName2 = this.widget.options.validation;
|
|
78182
|
+
if (FormValidators[vldName2]) {
|
|
78183
|
+
this.rules.push({
|
|
78184
|
+
validator: FormValidators[vldName2],
|
|
78185
|
+
trigger: ["blur", "change"],
|
|
78186
|
+
label: this.widget.options.label,
|
|
78187
|
+
errorMsg: this.widget.options.validationHint
|
|
78188
|
+
});
|
|
78189
|
+
} else {
|
|
78190
|
+
this.rules.push({
|
|
78191
|
+
validator: FormValidators.regExp,
|
|
78192
|
+
trigger: ["blur", "change"],
|
|
78193
|
+
regExp: vldName2,
|
|
78194
|
+
label: this.widget.options.label,
|
|
78195
|
+
errorMsg: this.widget.options.validationHint
|
|
78196
|
+
});
|
|
78197
|
+
}
|
|
78198
|
+
}
|
|
78199
|
+
if (this.widget.options.onValidate) {
|
|
78200
|
+
const customFn = (rule2, value2, callback2) => {
|
|
78201
|
+
const tmpFunc = new Function("rule", "value", "callback", this.widget.options.onValidate);
|
|
78202
|
+
return tmpFunc.call(this, rule2, value2, callback2);
|
|
78203
|
+
};
|
|
78204
|
+
this.rules.push({
|
|
78205
|
+
validator: customFn,
|
|
78206
|
+
trigger: ["blur", "change"],
|
|
78207
|
+
label: this.widget.options.label
|
|
78208
|
+
});
|
|
78209
|
+
}
|
|
78210
|
+
},
|
|
78211
|
+
setRequired(flag) {
|
|
78212
|
+
this.widget.options.required = !!flag;
|
|
78213
|
+
this.buildFieldRules();
|
|
78214
|
+
},
|
|
78215
|
+
setHidden(flag) {
|
|
78216
|
+
if (!this.widget || !this.widget.options) {
|
|
78217
|
+
return;
|
|
78218
|
+
}
|
|
78219
|
+
this.widget.options.hidden = !!flag;
|
|
78220
|
+
if (flag) {
|
|
78221
|
+
this.clearFieldRules();
|
|
78222
|
+
} else {
|
|
78223
|
+
this.buildFieldRules();
|
|
78224
|
+
}
|
|
78225
|
+
},
|
|
78226
|
+
triggerFieldValidation() {
|
|
78227
|
+
const propName = this.getPropName();
|
|
78228
|
+
if (!propName)
|
|
78229
|
+
return;
|
|
78230
|
+
this.$nextTick(() => {
|
|
78231
|
+
this.dispatch("VFormRender", "fieldValidation", [propName]);
|
|
78232
|
+
});
|
|
78233
|
+
},
|
|
78132
78234
|
initEventHandler() {
|
|
78133
78235
|
this.on$("setFormData", (newFormData) => {
|
|
78134
78236
|
var _a2, _b2;
|
|
@@ -78212,6 +78314,7 @@ const _sfc_main$l = {
|
|
|
78212
78314
|
this.updateFormModel(this.tableData);
|
|
78213
78315
|
this.handleWidgetOnChange(deepClone(this.tableData), oldTableData);
|
|
78214
78316
|
this.$message.success("\u5220\u9664\u6210\u529F");
|
|
78317
|
+
this.triggerFieldValidation();
|
|
78215
78318
|
if (this.widget.options.onRowDelete) {
|
|
78216
78319
|
try {
|
|
78217
78320
|
new Function("rowIndex", "rowData", this.widget.options.onRowDelete)(index2, this.tableData[index2]);
|
|
@@ -78339,6 +78442,7 @@ const _sfc_main$l = {
|
|
|
78339
78442
|
}
|
|
78340
78443
|
this.updateFormModel(this.tableData);
|
|
78341
78444
|
this.handleWidgetOnChange(deepClone(this.tableData), oldTableData);
|
|
78445
|
+
this.triggerFieldValidation();
|
|
78342
78446
|
this.dialogVisible = false;
|
|
78343
78447
|
} else {
|
|
78344
78448
|
this.$message.warning("\u8BF7\u586B\u5199\u5B8C\u6574\u4FE1\u606F");
|
|
@@ -78499,259 +78603,269 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
78499
78603
|
const _component_container_item_wrapper = resolveComponent("container-item-wrapper");
|
|
78500
78604
|
return openBlock(), createBlock(_component_container_item_wrapper, { widget: $props.widget }, {
|
|
78501
78605
|
default: withCtx(() => [
|
|
78502
|
-
$props.widget ? withDirectives((openBlock(),
|
|
78606
|
+
$props.widget ? withDirectives((openBlock(), createBlock(_component_el_form_item, {
|
|
78503
78607
|
key: $props.widget.id,
|
|
78504
|
-
|
|
78505
|
-
|
|
78506
|
-
|
|
78507
|
-
|
|
78508
|
-
|
|
78509
|
-
|
|
78510
|
-
|
|
78511
|
-
|
|
78512
|
-
|
|
78513
|
-
|
|
78514
|
-
|
|
78515
|
-
|
|
78516
|
-
|
|
78517
|
-
|
|
78518
|
-
|
|
78519
|
-
|
|
78520
|
-
|
|
78521
|
-
|
|
78522
|
-
createTextVNode(" \u65B0\u589E ", -1)
|
|
78523
|
-
])]),
|
|
78524
|
-
_: 1
|
|
78525
|
-
}, 8, ["disabled", "onClick"])) : createCommentVNode("", true)
|
|
78526
|
-
]),
|
|
78527
|
-
createVNode(_component_el_table, {
|
|
78528
|
-
data: $data.tableData,
|
|
78529
|
-
border: $props.widget.options.border,
|
|
78530
|
-
stripe: $props.widget.options.stripe,
|
|
78531
|
-
size: $props.widget.options.size,
|
|
78532
|
-
"max-height": $options.tableMaxHeight,
|
|
78533
|
-
style: { "width": "100%" },
|
|
78534
|
-
disabled: $props.widget.options.disabled
|
|
78535
|
-
}, {
|
|
78536
|
-
empty: withCtx(() => [..._cache[5] || (_cache[5] = [
|
|
78537
|
-
createElementVNode("div", { class: "empty-hint" }, [
|
|
78538
|
-
createElementVNode("span", null, "\u6682\u65E0\u6570\u636E")
|
|
78539
|
-
], -1)
|
|
78540
|
-
])]),
|
|
78541
|
-
default: withCtx(() => [
|
|
78542
|
-
$props.widget.options.showIndex ? (openBlock(), createBlock(_component_el_table_column, {
|
|
78543
|
-
key: 0,
|
|
78544
|
-
type: "index",
|
|
78545
|
-
label: "\u5E8F\u53F7",
|
|
78546
|
-
width: "60",
|
|
78547
|
-
align: "center"
|
|
78548
|
-
})) : createCommentVNode("", true),
|
|
78549
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList($props.widget.options.columns, (col, colIdx) => {
|
|
78550
|
-
return openBlock(), createBlock(_component_el_table_column, {
|
|
78551
|
-
key: colIdx,
|
|
78552
|
-
prop: col.prop,
|
|
78553
|
-
label: col.label,
|
|
78554
|
-
width: col.width,
|
|
78555
|
-
"min-width": col.minWidth,
|
|
78556
|
-
align: "left",
|
|
78557
|
-
"show-overflow-tooltip": ""
|
|
78558
|
-
}, {
|
|
78559
|
-
default: withCtx(({ row, $index }) => [
|
|
78560
|
-
createTextVNode(toDisplayString($options.getTableValue(row, col, $index)), 1)
|
|
78561
|
-
]),
|
|
78562
|
-
_: 2
|
|
78563
|
-
}, 1032, ["prop", "label", "width", "min-width"]);
|
|
78564
|
-
}), 128)),
|
|
78565
|
-
$props.widget.options.showOperation && !$props.widget.options.disabled ? (openBlock(), createBlock(_component_el_table_column, {
|
|
78566
|
-
key: 1,
|
|
78567
|
-
label: "\u64CD\u4F5C",
|
|
78568
|
-
width: $props.widget.options.operationColumnWidth,
|
|
78569
|
-
align: "center",
|
|
78570
|
-
fixed: "right"
|
|
78571
|
-
}, {
|
|
78572
|
-
default: withCtx(({ row, $index }) => [
|
|
78573
|
-
createVNode(_component_el_button, {
|
|
78574
|
-
size: "small",
|
|
78575
|
-
type: "primary",
|
|
78576
|
-
link: "",
|
|
78577
|
-
disabled: $props.widget.options.disabled,
|
|
78578
|
-
onClick: ($event) => $options.handleEditRow($index, row)
|
|
78579
|
-
}, {
|
|
78580
|
-
default: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
78581
|
-
createTextVNode(" \u7F16\u8F91 ", -1)
|
|
78582
|
-
])]),
|
|
78583
|
-
_: 1
|
|
78584
|
-
}, 8, ["disabled", "onClick"]),
|
|
78585
|
-
createVNode(_component_el_button, {
|
|
78586
|
-
size: "small",
|
|
78587
|
-
type: "danger",
|
|
78588
|
-
link: "",
|
|
78589
|
-
disabled: $props.widget.options.disabled,
|
|
78590
|
-
onClick: ($event) => $options.handleDeleteRow($index)
|
|
78591
|
-
}, {
|
|
78592
|
-
default: withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
78593
|
-
createTextVNode(" \u5220\u9664 ", -1)
|
|
78594
|
-
])]),
|
|
78595
|
-
_: 1
|
|
78596
|
-
}, 8, ["disabled", "onClick"])
|
|
78597
|
-
]),
|
|
78598
|
-
_: 1
|
|
78599
|
-
}, 8, ["width"])) : createCommentVNode("", true)
|
|
78600
|
-
]),
|
|
78601
|
-
_: 1
|
|
78602
|
-
}, 8, ["data", "border", "stripe", "size", "max-height", "disabled"]),
|
|
78603
|
-
createVNode(_component_el_dialog, {
|
|
78604
|
-
modelValue: $data.dialogVisible,
|
|
78605
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.dialogVisible = $event),
|
|
78606
|
-
title: $data.dialogTitle,
|
|
78607
|
-
width: "800px",
|
|
78608
|
-
"close-on-click-modal": false,
|
|
78609
|
-
onClose: $options.handleDialogClose,
|
|
78610
|
-
onOpened: $options.handleDialogOpened
|
|
78611
|
-
}, {
|
|
78612
|
-
footer: withCtx(() => [
|
|
78613
|
-
createElementVNode("span", _hoisted_4$8, [
|
|
78614
|
-
createVNode(_component_el_button, {
|
|
78615
|
-
size: "default",
|
|
78616
|
-
onClick: _cache[0] || (_cache[0] = ($event) => $data.dialogVisible = false)
|
|
78617
|
-
}, {
|
|
78618
|
-
default: withCtx(() => [..._cache[6] || (_cache[6] = [
|
|
78619
|
-
createTextVNode("\u53D6\u6D88", -1)
|
|
78620
|
-
])]),
|
|
78621
|
-
_: 1
|
|
78622
|
-
}),
|
|
78623
|
-
createVNode(_component_el_button, {
|
|
78624
|
-
size: "default",
|
|
78608
|
+
prop: $options.getPropName(),
|
|
78609
|
+
rules: $data.rules,
|
|
78610
|
+
class: "sub-table-form-item",
|
|
78611
|
+
"label-width": "0"
|
|
78612
|
+
}, {
|
|
78613
|
+
default: withCtx(() => [
|
|
78614
|
+
createElementVNode("div", {
|
|
78615
|
+
class: normalizeClass(["sub-table-container", $options.customClass])
|
|
78616
|
+
}, [
|
|
78617
|
+
$props.widget.options.label ? (openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
78618
|
+
createElementVNode("span", {
|
|
78619
|
+
class: normalizeClass($options.labelClass)
|
|
78620
|
+
}, toDisplayString($props.widget.options.label), 3),
|
|
78621
|
+
$props.widget.options.required ? (openBlock(), createElementBlock("span", _hoisted_2$b, "*")) : createCommentVNode("", true)
|
|
78622
|
+
])) : createCommentVNode("", true),
|
|
78623
|
+
createElementVNode("div", _hoisted_3$9, [
|
|
78624
|
+
!$props.widget.options.disabled ? (openBlock(), createBlock(_component_el_button, {
|
|
78625
|
+
key: 0,
|
|
78625
78626
|
type: "primary",
|
|
78626
|
-
|
|
78627
|
+
size: "small",
|
|
78628
|
+
disabled: $props.widget.options.disabled,
|
|
78629
|
+
onClick: $options.handleAddRow,
|
|
78630
|
+
icon: "el-icon-plus"
|
|
78627
78631
|
}, {
|
|
78628
|
-
default: withCtx(() => [..._cache[
|
|
78629
|
-
createTextVNode("\
|
|
78632
|
+
default: withCtx(() => [..._cache[2] || (_cache[2] = [
|
|
78633
|
+
createTextVNode(" \u65B0\u589E ", -1)
|
|
78630
78634
|
])]),
|
|
78631
78635
|
_: 1
|
|
78632
|
-
}, 8, ["onClick"])
|
|
78633
|
-
])
|
|
78634
|
-
|
|
78635
|
-
|
|
78636
|
-
|
|
78637
|
-
|
|
78638
|
-
|
|
78639
|
-
|
|
78640
|
-
"
|
|
78641
|
-
|
|
78636
|
+
}, 8, ["disabled", "onClick"])) : createCommentVNode("", true)
|
|
78637
|
+
]),
|
|
78638
|
+
createVNode(_component_el_table, {
|
|
78639
|
+
data: $data.tableData,
|
|
78640
|
+
border: $props.widget.options.border,
|
|
78641
|
+
stripe: $props.widget.options.stripe,
|
|
78642
|
+
size: $props.widget.options.size,
|
|
78643
|
+
"max-height": $options.tableMaxHeight,
|
|
78644
|
+
style: { "width": "100%" },
|
|
78645
|
+
disabled: $props.widget.options.disabled
|
|
78642
78646
|
}, {
|
|
78647
|
+
empty: withCtx(() => [..._cache[5] || (_cache[5] = [
|
|
78648
|
+
createElementVNode("div", { class: "empty-hint" }, [
|
|
78649
|
+
createElementVNode("span", null, "\u6682\u65E0\u6570\u636E")
|
|
78650
|
+
], -1)
|
|
78651
|
+
])]),
|
|
78643
78652
|
default: withCtx(() => [
|
|
78653
|
+
$props.widget.options.showIndex ? (openBlock(), createBlock(_component_el_table_column, {
|
|
78654
|
+
key: 0,
|
|
78655
|
+
type: "index",
|
|
78656
|
+
label: "\u5E8F\u53F7",
|
|
78657
|
+
width: "60",
|
|
78658
|
+
align: "center"
|
|
78659
|
+
})) : createCommentVNode("", true),
|
|
78644
78660
|
(openBlock(true), createElementBlock(Fragment, null, renderList($props.widget.options.columns, (col, colIdx) => {
|
|
78645
|
-
return openBlock(), createBlock(
|
|
78661
|
+
return openBlock(), createBlock(_component_el_table_column, {
|
|
78646
78662
|
key: colIdx,
|
|
78647
|
-
label: col.label,
|
|
78648
78663
|
prop: col.prop,
|
|
78649
|
-
|
|
78664
|
+
label: col.label,
|
|
78665
|
+
width: col.width,
|
|
78666
|
+
"min-width": col.minWidth,
|
|
78667
|
+
align: "left",
|
|
78668
|
+
"show-overflow-tooltip": ""
|
|
78650
78669
|
}, {
|
|
78651
|
-
default: withCtx(() => [
|
|
78652
|
-
|
|
78653
|
-
|
|
78654
|
-
|
|
78655
|
-
|
|
78656
|
-
|
|
78657
|
-
|
|
78658
|
-
|
|
78659
|
-
|
|
78660
|
-
|
|
78661
|
-
|
|
78662
|
-
|
|
78663
|
-
|
|
78664
|
-
|
|
78665
|
-
|
|
78666
|
-
|
|
78667
|
-
|
|
78668
|
-
|
|
78669
|
-
|
|
78670
|
-
|
|
78671
|
-
|
|
78672
|
-
|
|
78673
|
-
|
|
78674
|
-
|
|
78675
|
-
|
|
78676
|
-
|
|
78677
|
-
|
|
78678
|
-
|
|
78679
|
-
|
|
78680
|
-
|
|
78681
|
-
|
|
78682
|
-
|
|
78683
|
-
|
|
78684
|
-
|
|
78685
|
-
"
|
|
78686
|
-
|
|
78687
|
-
|
|
78688
|
-
|
|
78689
|
-
|
|
78690
|
-
|
|
78691
|
-
|
|
78692
|
-
|
|
78693
|
-
|
|
78694
|
-
|
|
78695
|
-
|
|
78696
|
-
|
|
78697
|
-
|
|
78698
|
-
|
|
78699
|
-
|
|
78700
|
-
|
|
78701
|
-
|
|
78702
|
-
|
|
78703
|
-
|
|
78704
|
-
|
|
78705
|
-
|
|
78706
|
-
|
|
78707
|
-
|
|
78708
|
-
|
|
78709
|
-
|
|
78710
|
-
|
|
78711
|
-
|
|
78712
|
-
|
|
78713
|
-
|
|
78670
|
+
default: withCtx(({ row, $index }) => [
|
|
78671
|
+
createTextVNode(toDisplayString($options.getTableValue(row, col, $index)), 1)
|
|
78672
|
+
]),
|
|
78673
|
+
_: 2
|
|
78674
|
+
}, 1032, ["prop", "label", "width", "min-width"]);
|
|
78675
|
+
}), 128)),
|
|
78676
|
+
$props.widget.options.showOperation && !$props.widget.options.disabled ? (openBlock(), createBlock(_component_el_table_column, {
|
|
78677
|
+
key: 1,
|
|
78678
|
+
label: "\u64CD\u4F5C",
|
|
78679
|
+
width: $props.widget.options.operationColumnWidth,
|
|
78680
|
+
align: "center",
|
|
78681
|
+
fixed: "right"
|
|
78682
|
+
}, {
|
|
78683
|
+
default: withCtx(({ row, $index }) => [
|
|
78684
|
+
createVNode(_component_el_button, {
|
|
78685
|
+
size: "small",
|
|
78686
|
+
type: "primary",
|
|
78687
|
+
link: "",
|
|
78688
|
+
disabled: $props.widget.options.disabled,
|
|
78689
|
+
onClick: ($event) => $options.handleEditRow($index, row)
|
|
78690
|
+
}, {
|
|
78691
|
+
default: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
78692
|
+
createTextVNode(" \u7F16\u8F91 ", -1)
|
|
78693
|
+
])]),
|
|
78694
|
+
_: 1
|
|
78695
|
+
}, 8, ["disabled", "onClick"]),
|
|
78696
|
+
createVNode(_component_el_button, {
|
|
78697
|
+
size: "small",
|
|
78698
|
+
type: "danger",
|
|
78699
|
+
link: "",
|
|
78700
|
+
disabled: $props.widget.options.disabled,
|
|
78701
|
+
onClick: ($event) => $options.handleDeleteRow($index)
|
|
78702
|
+
}, {
|
|
78703
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
78704
|
+
createTextVNode(" \u5220\u9664 ", -1)
|
|
78705
|
+
])]),
|
|
78706
|
+
_: 1
|
|
78707
|
+
}, 8, ["disabled", "onClick"])
|
|
78708
|
+
]),
|
|
78709
|
+
_: 1
|
|
78710
|
+
}, 8, ["width"])) : createCommentVNode("", true)
|
|
78711
|
+
]),
|
|
78712
|
+
_: 1
|
|
78713
|
+
}, 8, ["data", "border", "stripe", "size", "max-height", "disabled"]),
|
|
78714
|
+
createVNode(_component_el_dialog, {
|
|
78715
|
+
modelValue: $data.dialogVisible,
|
|
78716
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.dialogVisible = $event),
|
|
78717
|
+
title: $data.dialogTitle,
|
|
78718
|
+
width: "800px",
|
|
78719
|
+
"close-on-click-modal": false,
|
|
78720
|
+
onClose: $options.handleDialogClose,
|
|
78721
|
+
onOpened: $options.handleDialogOpened
|
|
78722
|
+
}, {
|
|
78723
|
+
footer: withCtx(() => [
|
|
78724
|
+
createElementVNode("span", _hoisted_4$8, [
|
|
78725
|
+
createVNode(_component_el_button, {
|
|
78726
|
+
size: "default",
|
|
78727
|
+
onClick: _cache[0] || (_cache[0] = ($event) => $data.dialogVisible = false)
|
|
78728
|
+
}, {
|
|
78729
|
+
default: withCtx(() => [..._cache[6] || (_cache[6] = [
|
|
78730
|
+
createTextVNode("\u53D6\u6D88", -1)
|
|
78731
|
+
])]),
|
|
78732
|
+
_: 1
|
|
78733
|
+
}),
|
|
78734
|
+
createVNode(_component_el_button, {
|
|
78735
|
+
size: "default",
|
|
78736
|
+
type: "primary",
|
|
78737
|
+
onClick: $options.handleDialogConfirm
|
|
78738
|
+
}, {
|
|
78739
|
+
default: withCtx(() => [..._cache[7] || (_cache[7] = [
|
|
78740
|
+
createTextVNode("\u786E\u5B9A", -1)
|
|
78741
|
+
])]),
|
|
78742
|
+
_: 1
|
|
78743
|
+
}, 8, ["onClick"])
|
|
78744
|
+
])
|
|
78745
|
+
]),
|
|
78746
|
+
default: withCtx(() => [
|
|
78747
|
+
createVNode(_component_el_form, {
|
|
78748
|
+
ref: "dialogFormRef",
|
|
78749
|
+
model: $data.dialogFormData,
|
|
78750
|
+
rules: $data.dialogFormRules,
|
|
78751
|
+
"validate-on-rule-change": false,
|
|
78752
|
+
"label-width": "auto"
|
|
78753
|
+
}, {
|
|
78754
|
+
default: withCtx(() => [
|
|
78755
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($props.widget.options.columns, (col, colIdx) => {
|
|
78756
|
+
return openBlock(), createBlock(_component_el_form_item, {
|
|
78757
|
+
key: colIdx,
|
|
78758
|
+
label: col.label,
|
|
78759
|
+
prop: col.prop,
|
|
78760
|
+
required: col.required
|
|
78714
78761
|
}, {
|
|
78715
78762
|
default: withCtx(() => [
|
|
78716
|
-
|
|
78717
|
-
|
|
78718
|
-
|
|
78719
|
-
|
|
78720
|
-
|
|
78721
|
-
|
|
78722
|
-
|
|
78763
|
+
!col.type || col.type === "input" ? (openBlock(), createBlock(_component_el_input, {
|
|
78764
|
+
key: 0,
|
|
78765
|
+
modelValue: $data.dialogFormData[col.prop],
|
|
78766
|
+
"onUpdate:modelValue": ($event) => $data.dialogFormData[col.prop] = $event,
|
|
78767
|
+
placeholder: col.placeholder || `\u8BF7\u8F93\u5165${col.label}`,
|
|
78768
|
+
disabled: !col.editable,
|
|
78769
|
+
maxlength: $options.getColMaxLength(col),
|
|
78770
|
+
"show-word-limit": !!col.showWordLimit && !!col.maxLength,
|
|
78771
|
+
onChange: ($event) => $options.handleInputChange(col),
|
|
78772
|
+
clearable: ""
|
|
78773
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled", "maxlength", "show-word-limit", "onChange"])) : col.type === "number" ? (openBlock(), createBlock(_component_el_input_number, {
|
|
78774
|
+
key: 1,
|
|
78775
|
+
modelValue: $data.dialogFormData[col.prop],
|
|
78776
|
+
"onUpdate:modelValue": ($event) => $data.dialogFormData[col.prop] = $event,
|
|
78777
|
+
placeholder: col.placeholder || `\u8BF7\u8F93\u5165${col.label}`,
|
|
78778
|
+
disabled: !col.editable,
|
|
78779
|
+
style: { "width": "100%" },
|
|
78780
|
+
onChange: ($event) => $options.handleInputChange(col),
|
|
78781
|
+
clearable: ""
|
|
78782
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled", "onChange"])) : col.type === "date" ? (openBlock(), createBlock(_component_el_date_picker, {
|
|
78783
|
+
key: 2,
|
|
78784
|
+
modelValue: $data.dialogFormData[col.prop],
|
|
78785
|
+
"onUpdate:modelValue": ($event) => $data.dialogFormData[col.prop] = $event,
|
|
78786
|
+
type: "date",
|
|
78787
|
+
placeholder: col.placeholder || `\u8BF7\u9009\u62E9${col.label}`,
|
|
78788
|
+
style: { "width": "100%" },
|
|
78789
|
+
"value-format": "YYYY-MM-DD",
|
|
78790
|
+
onChange: ($event) => $options.handleInputChange(col),
|
|
78791
|
+
clearable: "",
|
|
78792
|
+
disabled: !col.editable
|
|
78793
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "onChange", "disabled"])) : col.type === "datetime" ? (openBlock(), createBlock(_component_el_date_picker, {
|
|
78794
|
+
key: 3,
|
|
78795
|
+
modelValue: $data.dialogFormData[col.prop],
|
|
78796
|
+
"onUpdate:modelValue": ($event) => $data.dialogFormData[col.prop] = $event,
|
|
78797
|
+
type: "datetime",
|
|
78798
|
+
placeholder: col.placeholder || `\u8BF7\u9009\u62E9${col.label}`,
|
|
78799
|
+
clearable: "",
|
|
78800
|
+
style: { "width": "100%" },
|
|
78801
|
+
"value-format": "YYYY-MM-DD HH:mm:ss",
|
|
78802
|
+
disabled: !col.editable
|
|
78803
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : col.type === "month" ? (openBlock(), createBlock(_component_el_date_picker, {
|
|
78804
|
+
key: 4,
|
|
78805
|
+
modelValue: $data.dialogFormData[col.prop],
|
|
78806
|
+
"onUpdate:modelValue": ($event) => $data.dialogFormData[col.prop] = $event,
|
|
78807
|
+
type: "month",
|
|
78808
|
+
placeholder: col.placeholder || `\u8BF7\u9009\u62E9${col.label}`,
|
|
78809
|
+
style: { "width": "100%" },
|
|
78810
|
+
"value-format": "YYYY-MM",
|
|
78811
|
+
clearable: "",
|
|
78812
|
+
onChange: ($event) => $options.handleInputChange(col),
|
|
78813
|
+
disabled: !col.editable
|
|
78814
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "onChange", "disabled"])) : col.type === "select" ? (openBlock(), createBlock(_component_el_select, {
|
|
78815
|
+
modelValue: $data.dialogFormData[col.prop],
|
|
78816
|
+
"onUpdate:modelValue": ($event) => $data.dialogFormData[col.prop] = $event,
|
|
78817
|
+
placeholder: col.placeholder || `\u8BF7\u9009\u62E9${col.label}`,
|
|
78818
|
+
clearable: "",
|
|
78819
|
+
style: { "width": "100%" },
|
|
78820
|
+
ref_for: true,
|
|
78821
|
+
ref: (el) => $options.handleSelectMounted(el, col),
|
|
78822
|
+
onChange: ($event) => $options.handleInputChange(col),
|
|
78823
|
+
key: `select-${col.prop}-${$data.dialogFormData._columnOptions ? Object.keys($data.dialogFormData._columnOptions).length : 0}`,
|
|
78824
|
+
disabled: !col.editable
|
|
78825
|
+
}, {
|
|
78826
|
+
default: withCtx(() => [
|
|
78827
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($options.getColumnOptions(col), (option, optIdx) => {
|
|
78828
|
+
return openBlock(), createBlock(_component_el_option, {
|
|
78829
|
+
key: `${col.prop}-${optIdx}-${option.value}`,
|
|
78830
|
+
label: option.label,
|
|
78831
|
+
value: option.value
|
|
78832
|
+
}, null, 8, ["label", "value"]);
|
|
78833
|
+
}), 128))
|
|
78834
|
+
]),
|
|
78835
|
+
_: 2
|
|
78836
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "onChange", "disabled"])) : col.type === "textarea" ? (openBlock(), createBlock(_component_el_textarea, {
|
|
78837
|
+
key: 6,
|
|
78838
|
+
modelValue: $data.dialogFormData[col.prop],
|
|
78839
|
+
"onUpdate:modelValue": ($event) => $data.dialogFormData[col.prop] = $event,
|
|
78840
|
+
placeholder: col.placeholder || `\u8BF7\u8F93\u5165${col.label}`,
|
|
78841
|
+
rows: col.rows || 3,
|
|
78842
|
+
maxlength: $options.getColMaxLength(col),
|
|
78843
|
+
"show-word-limit": !!col.showWordLimit && !!col.maxLength,
|
|
78844
|
+
clearable: "",
|
|
78845
|
+
onChange: ($event) => $options.handleInputChange(col),
|
|
78846
|
+
disabled: !col.editable
|
|
78847
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "rows", "maxlength", "show-word-limit", "onChange", "disabled"])) : createCommentVNode("", true)
|
|
78723
78848
|
]),
|
|
78724
78849
|
_: 2
|
|
78725
|
-
}, 1032, ["
|
|
78726
|
-
|
|
78727
|
-
|
|
78728
|
-
|
|
78729
|
-
|
|
78730
|
-
disabled: $props.widget.options.disabled,
|
|
78731
|
-
rows: col.rows || 3,
|
|
78732
|
-
maxlength: $options.getColMaxLength(col),
|
|
78733
|
-
"show-word-limit": !!col.showWordLimit && !!col.maxLength,
|
|
78734
|
-
clearable: "",
|
|
78735
|
-
onChange: ($event) => $options.handleInputChange(col)
|
|
78736
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled", "rows", "maxlength", "show-word-limit", "onChange"])) : createCommentVNode("", true)
|
|
78737
|
-
]),
|
|
78738
|
-
_: 2
|
|
78739
|
-
}, 1032, ["label", "prop", "required"]);
|
|
78740
|
-
}), 128))
|
|
78850
|
+
}, 1032, ["label", "prop", "required"]);
|
|
78851
|
+
}), 128))
|
|
78852
|
+
]),
|
|
78853
|
+
_: 1
|
|
78854
|
+
}, 8, ["model", "rules"])
|
|
78741
78855
|
]),
|
|
78742
78856
|
_: 1
|
|
78743
|
-
}, 8, ["
|
|
78744
|
-
])
|
|
78745
|
-
|
|
78746
|
-
|
|
78747
|
-
|
|
78857
|
+
}, 8, ["modelValue", "title", "onClose", "onOpened"])
|
|
78858
|
+
], 2)
|
|
78859
|
+
]),
|
|
78860
|
+
_: 1
|
|
78861
|
+
}, 8, ["prop", "rules"])), [
|
|
78748
78862
|
[vShow, $props.widget && $props.widget.options && !$props.widget.options.hidden]
|
|
78749
78863
|
]) : createCommentVNode("", true)
|
|
78750
78864
|
]),
|
|
78751
78865
|
_: 1
|
|
78752
78866
|
}, 8, ["widget"]);
|
|
78753
78867
|
}
|
|
78754
|
-
var SubTableItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-
|
|
78868
|
+
var SubTableItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-6f23dc7e"]]);
|
|
78755
78869
|
var subTableColumnsEditor_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
78756
78870
|
const _sfc_main$k = {
|
|
78757
78871
|
name: "sub-table-columns-editor",
|