form-custom-test 3.0.107 → 3.0.108
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 +55 -4
- package/dist/designer.style.css +1 -1
- package/dist/designer.umd.js +3 -3
- package/dist/render.es.js +55 -4
- package/dist/render.style.css +1 -1
- package/dist/render.umd.js +3 -3
- package/package.json +1 -1
package/dist/designer.es.js
CHANGED
|
@@ -10742,6 +10742,58 @@ var fieldMixin = {
|
|
|
10742
10742
|
setLabel(newLabel) {
|
|
10743
10743
|
this.field.options.label = newLabel;
|
|
10744
10744
|
},
|
|
10745
|
+
updateFieldLabel(fieldName, newLabel) {
|
|
10746
|
+
if (!fieldName)
|
|
10747
|
+
return false;
|
|
10748
|
+
const labelText = newLabel == null ? "" : String(newLabel);
|
|
10749
|
+
const widgetRef = this.getWidgetRef(fieldName, false);
|
|
10750
|
+
if (widgetRef && widgetRef.field && widgetRef.field.options) {
|
|
10751
|
+
widgetRef.field.options.label = labelText;
|
|
10752
|
+
const formRef2 = this.getFormRef();
|
|
10753
|
+
if (formRef2 && typeof formRef2.$forceUpdate === "function") {
|
|
10754
|
+
formRef2.$forceUpdate();
|
|
10755
|
+
}
|
|
10756
|
+
return true;
|
|
10757
|
+
}
|
|
10758
|
+
const formRef = this.getFormRef();
|
|
10759
|
+
if (!formRef || typeof formRef.getFormJson !== "function" || typeof formRef.setFormJson !== "function") {
|
|
10760
|
+
return false;
|
|
10761
|
+
}
|
|
10762
|
+
const formJson = formRef.getFormJson();
|
|
10763
|
+
let updated = false;
|
|
10764
|
+
const walk = (list) => {
|
|
10765
|
+
if (!Array.isArray(list) || updated)
|
|
10766
|
+
return;
|
|
10767
|
+
list.forEach((w) => {
|
|
10768
|
+
if (updated || !w)
|
|
10769
|
+
return;
|
|
10770
|
+
if (w.options && w.options.name === fieldName) {
|
|
10771
|
+
w.options.label = labelText;
|
|
10772
|
+
updated = true;
|
|
10773
|
+
return;
|
|
10774
|
+
}
|
|
10775
|
+
if (Array.isArray(w.widgetList))
|
|
10776
|
+
walk(w.widgetList);
|
|
10777
|
+
if (Array.isArray(w.cols)) {
|
|
10778
|
+
w.cols.forEach((c) => walk(c && c.widgetList));
|
|
10779
|
+
}
|
|
10780
|
+
if (Array.isArray(w.rows)) {
|
|
10781
|
+
w.rows.forEach((r) => Array.isArray(r && r.cols) && r.cols.forEach((c) => walk(c && c.widgetList)));
|
|
10782
|
+
}
|
|
10783
|
+
if (Array.isArray(w.tabs)) {
|
|
10784
|
+
w.tabs.forEach((t) => walk(t && t.widgetList));
|
|
10785
|
+
}
|
|
10786
|
+
});
|
|
10787
|
+
};
|
|
10788
|
+
walk(formJson && formJson.widgetList);
|
|
10789
|
+
if (!updated)
|
|
10790
|
+
return false;
|
|
10791
|
+
formRef.setFormJson(formJson);
|
|
10792
|
+
return true;
|
|
10793
|
+
},
|
|
10794
|
+
setFieldLabel(fieldName, newLabel) {
|
|
10795
|
+
return this.updateFieldLabel(fieldName, newLabel);
|
|
10796
|
+
},
|
|
10745
10797
|
focus() {
|
|
10746
10798
|
if (!!this.getFieldEditor() && !!this.getFieldEditor().focus) {
|
|
10747
10799
|
this.getFieldEditor().focus();
|
|
@@ -68368,13 +68420,13 @@ function registerIcon(app) {
|
|
|
68368
68420
|
if (typeof window !== "undefined") {
|
|
68369
68421
|
let loadSvg = function() {
|
|
68370
68422
|
var body = document.body;
|
|
68371
|
-
var svgDom = document.getElementById("
|
|
68423
|
+
var svgDom = document.getElementById("__svg__icons__dom__1777281634260__");
|
|
68372
68424
|
if (!svgDom) {
|
|
68373
68425
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
68374
68426
|
svgDom.style.position = "absolute";
|
|
68375
68427
|
svgDom.style.width = "0";
|
|
68376
68428
|
svgDom.style.height = "0";
|
|
68377
|
-
svgDom.id = "
|
|
68429
|
+
svgDom.id = "__svg__icons__dom__1777281634260__";
|
|
68378
68430
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
68379
68431
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
68380
68432
|
}
|
|
@@ -78863,7 +78915,6 @@ const _sfc_main$3 = {
|
|
|
78863
78915
|
methods: {
|
|
78864
78916
|
handleClick() {
|
|
78865
78917
|
this.dialogVisible = true;
|
|
78866
|
-
this.triggerEvent("onOpen");
|
|
78867
78918
|
},
|
|
78868
78919
|
handleConfirm(selectedRows) {
|
|
78869
78920
|
this.dialogVisible = false;
|
|
@@ -78971,7 +79022,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
78971
79022
|
_: 1
|
|
78972
79023
|
}, 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"]);
|
|
78973
79024
|
}
|
|
78974
|
-
var AssetSelectWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-
|
|
79025
|
+
var AssetSelectWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-1cb25748"]]);
|
|
78975
79026
|
var detailDialog_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
78976
79027
|
const _sfc_main$2 = {
|
|
78977
79028
|
name: "detail-dialog",
|