form-custom-test 3.0.83 → 3.0.85
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 +37 -30
- package/dist/designer.umd.js +3 -3
- package/dist/render.es.js +36 -29
- package/dist/render.umd.js +65 -65
- package/package.json +1 -1
package/dist/designer.es.js
CHANGED
|
@@ -3674,7 +3674,7 @@ const personTreeSchema = {
|
|
|
3674
3674
|
buttonText: "\u9009\u62E9\u4EBA\u5458",
|
|
3675
3675
|
confirmText: "\u786E\u5B9A",
|
|
3676
3676
|
cancelText: "\u53D6\u6D88",
|
|
3677
|
-
dialogTitle: "\u4EBA\u5458
|
|
3677
|
+
dialogTitle: "\u9009\u62E9\u4EBA\u5458",
|
|
3678
3678
|
dialogWidth: "50%",
|
|
3679
3679
|
hideFooter: false,
|
|
3680
3680
|
multiple: true,
|
|
@@ -68175,13 +68175,13 @@ function registerIcon(app) {
|
|
|
68175
68175
|
if (typeof window !== "undefined") {
|
|
68176
68176
|
let loadSvg = function() {
|
|
68177
68177
|
var body = document.body;
|
|
68178
|
-
var svgDom = document.getElementById("
|
|
68178
|
+
var svgDom = document.getElementById("__svg__icons__dom__1775622333451__");
|
|
68179
68179
|
if (!svgDom) {
|
|
68180
68180
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
68181
68181
|
svgDom.style.position = "absolute";
|
|
68182
68182
|
svgDom.style.width = "0";
|
|
68183
68183
|
svgDom.style.height = "0";
|
|
68184
|
-
svgDom.id = "
|
|
68184
|
+
svgDom.id = "__svg__icons__dom__1775622333451__";
|
|
68185
68185
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
68186
68186
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
68187
68187
|
}
|
|
@@ -74535,7 +74535,6 @@ const _sfc_main$c = {
|
|
|
74535
74535
|
return {
|
|
74536
74536
|
fieldModel: null,
|
|
74537
74537
|
oldFieldValue: null,
|
|
74538
|
-
radioValue: null,
|
|
74539
74538
|
rules: [],
|
|
74540
74539
|
inputValue: ""
|
|
74541
74540
|
};
|
|
@@ -74555,6 +74554,21 @@ const _sfc_main$c = {
|
|
|
74555
74554
|
];
|
|
74556
74555
|
}
|
|
74557
74556
|
},
|
|
74557
|
+
watch: {
|
|
74558
|
+
fieldModel: {
|
|
74559
|
+
handler(newVal) {
|
|
74560
|
+
if (typeof newVal === "string" && newVal.includes("_RADIO_OTHER_")) {
|
|
74561
|
+
this.radioValue = "_RADIO_OTHER_";
|
|
74562
|
+
this.inputValue = newVal.split("_RADIO_OTHER_")[1];
|
|
74563
|
+
} else {
|
|
74564
|
+
this.radioValue = newVal;
|
|
74565
|
+
this.inputValue = "";
|
|
74566
|
+
}
|
|
74567
|
+
}
|
|
74568
|
+
},
|
|
74569
|
+
immediate: true,
|
|
74570
|
+
deep: true
|
|
74571
|
+
},
|
|
74558
74572
|
created() {
|
|
74559
74573
|
this.initOptionItems();
|
|
74560
74574
|
this.initFieldModel();
|
|
@@ -74576,8 +74590,8 @@ const _sfc_main$c = {
|
|
|
74576
74590
|
this.inputValue = "";
|
|
74577
74591
|
if (value2 === "_RADIO_OTHER_") {
|
|
74578
74592
|
this.fieldModel = value2;
|
|
74579
|
-
if (this.
|
|
74580
|
-
this.syncUpdateFormModel(`${value2}
|
|
74593
|
+
if (this.inputValue) {
|
|
74594
|
+
this.syncUpdateFormModel(`${value2}&${this.inputValue}`);
|
|
74581
74595
|
} else {
|
|
74582
74596
|
this.syncUpdateFormModel(value2);
|
|
74583
74597
|
}
|
|
@@ -74591,8 +74605,9 @@ const _sfc_main$c = {
|
|
|
74591
74605
|
this.dispatch("VFormRender", "fieldValidation", [this.getPropName()]);
|
|
74592
74606
|
},
|
|
74593
74607
|
handleOtherValueChange() {
|
|
74594
|
-
if (this.
|
|
74595
|
-
const newValue = this.
|
|
74608
|
+
if (this.radioValue === "_RADIO_OTHER_") {
|
|
74609
|
+
const newValue = this.inputValue ? `${this.radioValue}&${this.inputValue}` : this.radioValue;
|
|
74610
|
+
console.log(newValue, "newValue");
|
|
74596
74611
|
this.oldFieldValue = this.fieldModel;
|
|
74597
74612
|
this.syncUpdateFormModel(newValue);
|
|
74598
74613
|
this.emitFieldDataChange(newValue, this.oldFieldValue);
|
|
@@ -74602,9 +74617,9 @@ const _sfc_main$c = {
|
|
|
74602
74617
|
}
|
|
74603
74618
|
};
|
|
74604
74619
|
function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
74605
|
-
const _component_el_input = resolveComponent("el-input");
|
|
74606
74620
|
const _component_el_radio = resolveComponent("el-radio");
|
|
74607
74621
|
const _component_el_radio_group = resolveComponent("el-radio-group");
|
|
74622
|
+
const _component_el_input = resolveComponent("el-input");
|
|
74608
74623
|
const _component_form_item_wrapper = resolveComponent("form-item-wrapper");
|
|
74609
74624
|
return openBlock(), createBlock(_component_form_item_wrapper, {
|
|
74610
74625
|
designer: $props.designer,
|
|
@@ -74620,8 +74635,8 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
74620
74635
|
}, {
|
|
74621
74636
|
default: withCtx(() => [
|
|
74622
74637
|
createVNode(_component_el_radio_group, {
|
|
74623
|
-
modelValue:
|
|
74624
|
-
"onUpdate:modelValue": _cache[
|
|
74638
|
+
modelValue: _ctx.radioValue,
|
|
74639
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.radioValue = $event),
|
|
74625
74640
|
class: normalizeClass({ "radio-group-block": $props.field.options.displayStyle === "block" }),
|
|
74626
74641
|
disabled: $props.field.options.disabled,
|
|
74627
74642
|
size: $options.widgetSize,
|
|
@@ -74637,22 +74652,22 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
74637
74652
|
style: normalizeStyle({ display: $props.field.options.displayStyle })
|
|
74638
74653
|
}, {
|
|
74639
74654
|
default: withCtx(() => [
|
|
74640
|
-
createElementVNode("span", null, toDisplayString(item.label), 1)
|
|
74641
|
-
$data.radioValue === "_RADIO_OTHER_" && item.value === "_RADIO_OTHER_" ? (openBlock(), createBlock(_component_el_input, {
|
|
74642
|
-
key: 0,
|
|
74643
|
-
class: "w-[200px] ml-10px",
|
|
74644
|
-
modelValue: $data.inputValue,
|
|
74645
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.inputValue = $event),
|
|
74646
|
-
onChange: ($event) => $options.handleOtherValueChange(item.value),
|
|
74647
|
-
placeholder: "\u8BF7\u8F93\u5165\u5176\u4ED6\u9009\u9879"
|
|
74648
|
-
}, null, 8, ["modelValue", "onChange"])) : createCommentVNode("", true)
|
|
74655
|
+
createElementVNode("span", null, toDisplayString(item.label), 1)
|
|
74649
74656
|
]),
|
|
74650
74657
|
_: 2
|
|
74651
74658
|
}, 1032, ["label", "disabled", "border", "style"]);
|
|
74652
74659
|
}), 128))
|
|
74653
74660
|
]),
|
|
74654
74661
|
_: 1
|
|
74655
|
-
}, 8, ["modelValue", "class", "disabled", "size", "onChange"])
|
|
74662
|
+
}, 8, ["modelValue", "class", "disabled", "size", "onChange"]),
|
|
74663
|
+
_ctx.radioValue === "_RADIO_OTHER_" ? (openBlock(), createBlock(_component_el_input, {
|
|
74664
|
+
key: 0,
|
|
74665
|
+
class: "w-[200px] ml-10px",
|
|
74666
|
+
modelValue: $data.inputValue,
|
|
74667
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.inputValue = $event),
|
|
74668
|
+
onInput: _cache[2] || (_cache[2] = ($event) => $options.handleOtherValueChange()),
|
|
74669
|
+
placeholder: "\u8BF7\u8F93\u5165"
|
|
74670
|
+
}, null, 8, ["modelValue"])) : createCommentVNode("", true)
|
|
74656
74671
|
]),
|
|
74657
74672
|
_: 1
|
|
74658
74673
|
}, 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"]);
|
|
@@ -78135,15 +78150,7 @@ const _sfc_main = {
|
|
|
78135
78150
|
method: "get",
|
|
78136
78151
|
url: "unified-system/employee/loginInfo?accessType=0"
|
|
78137
78152
|
});
|
|
78138
|
-
|
|
78139
|
-
method: "get",
|
|
78140
|
-
url: "/unified-system/employee/queryList",
|
|
78141
|
-
params: {
|
|
78142
|
-
userId: data2.id
|
|
78143
|
-
}
|
|
78144
|
-
});
|
|
78145
|
-
const userInfo = personList ? personList[0] : {};
|
|
78146
|
-
this.fieldModel = __spreadValues(__spreadValues({}, data2), userInfo);
|
|
78153
|
+
this.fieldModel = data2;
|
|
78147
78154
|
this.syncUpdateFormModel(this.fieldModel);
|
|
78148
78155
|
this.emitFieldDataChange(this.fieldModel, this.oldFieldValue);
|
|
78149
78156
|
}
|