@fecp/designer 5.6.37 → 5.6.38
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/es/designer/package.json.mjs +1 -1
- package/es/designer/src/components/DataSourceSelect.vue.mjs +10 -4
- package/es/designer/src/packages/dialog/index.vue.mjs +28 -11
- package/es/designer/src/packages/dialog/index.vue2.mjs +28 -11
- package/es/designer/src/packages/dialog/useDialogDialog.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/index.vue.mjs +28 -11
- package/es/designer/src/packages/dialogGlobal/index.vue2.mjs +28 -11
- package/es/designer/src/packages/dialogGlobal/useDialogGlobalDialog.mjs +1 -1
- package/es/designer/src/packages/form/property/widgets.vue.mjs +2 -2
- package/es/designer/src/packages/utils/common.mjs +17 -0
- package/es/designer.css +122 -121
- package/es/packages/vue/src/components/forms/formItem/FormItem.vue.mjs +1 -1
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/components/DataSourceSelect.vue.js +9 -3
- package/lib/designer/src/packages/dialog/index.vue.js +26 -9
- package/lib/designer/src/packages/dialog/index.vue2.js +351 -334
- package/lib/designer/src/packages/dialog/useDialogDialog.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/index.vue.js +26 -9
- package/lib/designer/src/packages/dialogGlobal/index.vue2.js +321 -304
- package/lib/designer/src/packages/dialogGlobal/useDialogGlobalDialog.js +1 -1
- package/lib/designer/src/packages/form/property/widgets.vue.js +2 -2
- package/lib/designer/src/packages/utils/common.js +17 -0
- package/lib/designer.css +122 -121
- package/lib/packages/vue/src/components/forms/formItem/FormItem.vue.js +1 -1
- package/package.json +23 -23
|
@@ -314,7 +314,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
314
314
|
};
|
|
315
315
|
}
|
|
316
316
|
});
|
|
317
|
-
const _FormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
317
|
+
const _FormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-45b25958"]]);
|
|
318
318
|
export {
|
|
319
319
|
_FormItem as default
|
|
320
320
|
};
|
|
@@ -25,6 +25,12 @@ const _sfc_main = {
|
|
|
25
25
|
teleported: {
|
|
26
26
|
type: Boolean,
|
|
27
27
|
default: false
|
|
28
|
+
},
|
|
29
|
+
// 可选的局部数据源(如弹层自定义列表自己的 dataSources)。
|
|
30
|
+
// 传入后与页面头部数据源合并展示,避免 dataSourceId 找不到选项时回显原始值。
|
|
31
|
+
dataSources: {
|
|
32
|
+
type: Array,
|
|
33
|
+
default: null
|
|
28
34
|
}
|
|
29
35
|
},
|
|
30
36
|
emits: ["update:modelValue"],
|
|
@@ -36,8 +42,8 @@ const _sfc_main = {
|
|
|
36
42
|
set: (val) => emit("update:modelValue", val)
|
|
37
43
|
});
|
|
38
44
|
const { dataSourceDialogVisible, openDataSourceDialog, DataSourceDialog } = useDataSourceDialog.useDataSourceDialog();
|
|
39
|
-
const
|
|
40
|
-
return common.getEditConfigDataSources();
|
|
45
|
+
const dataSourceOptions = vue.computed(() => {
|
|
46
|
+
return common.mergeDataSources(common.getEditConfigDataSources(), props.dataSources);
|
|
41
47
|
});
|
|
42
48
|
const selectRef = vue.ref(null);
|
|
43
49
|
const handleAddDataSource = () => {
|
|
@@ -75,7 +81,7 @@ const _sfc_main = {
|
|
|
75
81
|
}, 8, ["icon"])
|
|
76
82
|
]),
|
|
77
83
|
default: vue.withCtx(() => [
|
|
78
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(
|
|
84
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(dataSourceOptions), (dataSource) => {
|
|
79
85
|
return vue.openBlock(), vue.createBlock(_component_el_option, {
|
|
80
86
|
key: dataSource.id,
|
|
81
87
|
label: dataSource.name,
|
|
@@ -96,17 +96,31 @@ const _sfc_main = {
|
|
|
96
96
|
setup(__props) {
|
|
97
97
|
const currentInstance = vue.getCurrentInstance();
|
|
98
98
|
const ctx = currentInstance.proxy;
|
|
99
|
-
const editConfigData = vue.computed(() => {
|
|
100
|
-
return common.getEditConfigData();
|
|
101
|
-
});
|
|
102
99
|
const dialogVisible = vue.useModel(__props, "modelValue");
|
|
103
100
|
const selectedDialogs = vue.ref([]);
|
|
104
101
|
const activeDialogIndex = vue.ref(-1);
|
|
102
|
+
function normalizeDataSourceConfigs(dialogs) {
|
|
103
|
+
const globalDataSources = common.getEditConfigDataSources() || [];
|
|
104
|
+
(dialogs || []).forEach((dialog) => {
|
|
105
|
+
if (dialog.contentSource !== "table" || dialog.tableContent !== "custom") {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (!dialog.customTableConfig) {
|
|
109
|
+
dialog.customTableConfig = common.cloneDeep(_default.defaultTableConfig);
|
|
110
|
+
dialog.customTableConfig.fieldsData = [];
|
|
111
|
+
}
|
|
112
|
+
dialog.customTableConfig.dataSources = common.mergeDataSources(
|
|
113
|
+
globalDataSources,
|
|
114
|
+
dialog.customTableConfig.dataSources
|
|
115
|
+
);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
105
118
|
vue.watch(dialogVisible, (val) => {
|
|
106
119
|
if (val) {
|
|
107
120
|
isEditingNew.value = false;
|
|
108
121
|
editingDialogIndex.value = -1;
|
|
109
122
|
selectedDialogs.value = common.cloneDeep(common.getEditConfigDialogs());
|
|
123
|
+
normalizeDataSourceConfigs(selectedDialogs.value);
|
|
110
124
|
if (selectedDialogs.value.length > 0 && activeDialogIndex.value === -1) {
|
|
111
125
|
activeDialogIndex.value = 0;
|
|
112
126
|
}
|
|
@@ -178,6 +192,7 @@ const _sfc_main = {
|
|
|
178
192
|
}
|
|
179
193
|
};
|
|
180
194
|
const onConfirm = () => {
|
|
195
|
+
normalizeDataSourceConfigs(selectedDialogs.value);
|
|
181
196
|
common.setEditConfigDialogs(selectedDialogs.value);
|
|
182
197
|
dialogVisible.value = false;
|
|
183
198
|
};
|
|
@@ -191,10 +206,11 @@ const _sfc_main = {
|
|
|
191
206
|
if (!data.customTableConfig) {
|
|
192
207
|
data.customTableConfig = common.cloneDeep(_default.defaultTableConfig);
|
|
193
208
|
data.customTableConfig.fieldsData = [];
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
data.customTableConfig.dataSources = editConfigData.value.dataSources;
|
|
209
|
+
}
|
|
210
|
+
if (data.customTableConfig.queryConfig) {
|
|
197
211
|
data.customTableConfig.queryConfig.enabled = false;
|
|
212
|
+
} else {
|
|
213
|
+
data.customTableConfig.queryConfig = { enabled: false };
|
|
198
214
|
}
|
|
199
215
|
if ((data == null ? void 0 : data.contentSource) == "table") {
|
|
200
216
|
const pkId = data == null ? void 0 : data.subTableId;
|
|
@@ -761,8 +777,9 @@ const _sfc_main = {
|
|
|
761
777
|
default: vue.withCtx(() => [
|
|
762
778
|
vue.createVNode(DataSourceSelect.default, {
|
|
763
779
|
modelValue: vue.unref(currentDialog).customTableConfig.dataSourceId,
|
|
764
|
-
"onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => vue.unref(currentDialog).customTableConfig.dataSourceId = $event)
|
|
765
|
-
|
|
780
|
+
"onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => vue.unref(currentDialog).customTableConfig.dataSourceId = $event),
|
|
781
|
+
"data-sources": vue.unref(currentDialog).customTableConfig.dataSources
|
|
782
|
+
}, null, 8, ["modelValue", "data-sources"])
|
|
766
783
|
]),
|
|
767
784
|
_: 1
|
|
768
785
|
})
|
|
@@ -986,5 +1003,5 @@ const _sfc_main = {
|
|
|
986
1003
|
};
|
|
987
1004
|
}
|
|
988
1005
|
};
|
|
989
|
-
const DialogDialog = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
1006
|
+
const DialogDialog = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-1c16c4fd"]]);
|
|
990
1007
|
exports.default = DialogDialog;
|