@epxing/designer 5.3.0-beta.2 → 5.3.0-beta.4
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/API.md +160 -160
- package/README.md +46 -46
- package/dist/src/page-designer/PageDesigner.js +11 -0
- package/dist/src/page-designer/designer.js +21 -0
- package/dist/src/page-designer/previews/add-form/Preview.js +1 -1
- package/dist/src/page-designer/previews/add-form/Preview.vue.js +19 -8
- package/dist/src/page-designer/setting-panel/Setting.js +46 -10
- package/dist/src/visual/config-page/ComponentLibraryDialog.js +8 -2
- package/dist/src/visual/config-page/DashboardMobile.js +1 -1
- package/dist/style.css +116 -112
- package/package.json +8 -8
- package/src/index.js +27 -27
- package/src/page-designer/PageDesigner.vue +11 -0
- package/src/page-designer/designer.js +1322 -1299
- package/src/page-designer/previews/add-form/Preview.vue +43 -44
- package/src/page-designer/setting-panel/Setting.vue +24 -2
- package/src/page-designer/widget-preview/Mixin.js +285 -285
- package/src/page-designer/widget-preview/Preview.vue +322 -322
- package/src/page-designer/widget-preview/WidgetWrapper.vue +197 -197
- package/src/page-designer/widget-preview/directive.js +258 -258
- package/src/visual/CategoryList.vue +563 -563
- package/src/visual/ComponentList.vue +280 -280
- package/src/visual/CreatePage.vue +389 -389
- package/src/visual/EntityCardList.vue +449 -449
- package/src/visual/EntityList.vue +838 -838
- package/src/visual/config-page/ComponentLibraryDialog.vue +7 -1
- package/src/visual/config-page/DashboardMobile.vue +934 -934
- package/src/visual/widgets/ProcessFormItemVisual.vue +58 -58
- package/types/index.d.ts +22 -22
- package/types/page-designer.d.ts +3 -3
- package/types/visual-component.d.ts +1 -1
- package/types/visual-entity-list.d.ts +1 -1
- package/types/visual-entity-sub-list.d.ts +1 -1
|
@@ -19,7 +19,9 @@ const _sfc_main = {
|
|
|
19
19
|
data() {
|
|
20
20
|
return {
|
|
21
21
|
activeTab: "property",
|
|
22
|
-
showCodeEditor: false
|
|
22
|
+
showCodeEditor: false,
|
|
23
|
+
showPropertyPanel: true,
|
|
24
|
+
showSwitchDialog: false
|
|
23
25
|
};
|
|
24
26
|
},
|
|
25
27
|
computed: {
|
|
@@ -33,6 +35,11 @@ const _sfc_main = {
|
|
|
33
35
|
if (!this.designer.selectedWidget) return this.designer.page.pageId;
|
|
34
36
|
return this.designer.selectedWidget.id;
|
|
35
37
|
},
|
|
38
|
+
// 切换组件后 id 不变,属性面板需按组件类型重建,才能加载新组件的配置面板
|
|
39
|
+
propertyKey() {
|
|
40
|
+
var _a;
|
|
41
|
+
return this.widgetId + "_" + (((_a = this.designer.selectedWidget) == null ? void 0 : _a.contentType) || "");
|
|
42
|
+
},
|
|
36
43
|
widgetConfig() {
|
|
37
44
|
const { configs = {}, id } = this.designer.selectedWidget;
|
|
38
45
|
const widgetConfig = this.designer.widgetConfig[id] || {};
|
|
@@ -86,6 +93,13 @@ const _sfc_main = {
|
|
|
86
93
|
}
|
|
87
94
|
});
|
|
88
95
|
},
|
|
96
|
+
// 换成弹窗中选择的组件,组件 id 不变,原配置保留
|
|
97
|
+
switchComponent(widgetInfo) {
|
|
98
|
+
this.showSwitchDialog = false;
|
|
99
|
+
const widget = this.designer.selectedWidget;
|
|
100
|
+
if (!widget || widget.contentType === widgetInfo.CODE) return;
|
|
101
|
+
this.designer.switchWidget(widget, widgetInfo);
|
|
102
|
+
},
|
|
89
103
|
updateWidgetConfig(v) {
|
|
90
104
|
this.designer.updateWidgetConfig(this.designer.selectedWidget.id, v);
|
|
91
105
|
},
|
|
@@ -175,6 +189,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
175
189
|
const _component_epx_page_designer_setting_style = resolveComponent("epx-page-designer-setting-style");
|
|
176
190
|
const _component_epx_page_designer_setting_advance = resolveComponent("epx-page-designer-setting-advance");
|
|
177
191
|
const _component_el_tabs = resolveComponent("el-tabs");
|
|
192
|
+
const _component_epx_visual_component_library_dialog = resolveComponent("epx-visual-component-library-dialog");
|
|
193
|
+
const _component_el_dialog = resolveComponent("el-dialog");
|
|
178
194
|
const _component_el_container = resolveComponent("el-container");
|
|
179
195
|
return $props.designer.selectedWidget || $props.designer.mode !== "template" && $props.designer.mode !== "component" ? (openBlock(), createBlock(_component_el_container, {
|
|
180
196
|
key: 0,
|
|
@@ -184,7 +200,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
184
200
|
createVNode(_component_el_tabs, {
|
|
185
201
|
class: "epx-page-designer-setting__tabs",
|
|
186
202
|
modelValue: $data.activeTab,
|
|
187
|
-
"onUpdate:modelValue": _cache[
|
|
203
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.activeTab = $event),
|
|
188
204
|
stretch: true
|
|
189
205
|
}, {
|
|
190
206
|
default: withCtx(() => [
|
|
@@ -194,7 +210,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
194
210
|
}, {
|
|
195
211
|
default: withCtx(() => [
|
|
196
212
|
!$props.designer.selectedWidget ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
197
|
-
_cache[
|
|
213
|
+
_cache[8] || (_cache[8] = createElementVNode("label", { class: "epx-page-designer-setting__widget-title-label" }, "页面", -1)),
|
|
198
214
|
createTextVNode(toDisplayString($props.designer.page.title) + " ", 1),
|
|
199
215
|
createElementVNode("i", {
|
|
200
216
|
class: "el-icon-copy-document",
|
|
@@ -202,7 +218,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
202
218
|
onClick: _cache[0] || (_cache[0] = (...args) => $options.copyPageId && $options.copyPageId(...args))
|
|
203
219
|
})
|
|
204
220
|
])) : (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
205
|
-
_cache[
|
|
221
|
+
_cache[11] || (_cache[11] = createElementVNode("label", { class: "epx-page-designer-setting__widget-title-label" }, "组件类型", -1)),
|
|
206
222
|
createTextVNode(toDisplayString($options.widgetInfo.TITLE || $options.widgetInfo.NAME) + " ", 1),
|
|
207
223
|
$options.widgetInfo.HELP ? (openBlock(), createElementBlock("i", {
|
|
208
224
|
key: 0,
|
|
@@ -214,20 +230,25 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
214
230
|
key: 1,
|
|
215
231
|
class: "epx-page-designer-setting__widget-split",
|
|
216
232
|
onClick: _cache[2] || (_cache[2] = (...args) => $options.splitTemplate && $options.splitTemplate(...args))
|
|
217
|
-
}, [..._cache[
|
|
233
|
+
}, [..._cache[9] || (_cache[9] = [
|
|
218
234
|
createElementVNode("i", {
|
|
219
235
|
class: "epx-icon-quxiaofenzu",
|
|
220
236
|
title: "拆分模板"
|
|
221
237
|
}, null, -1),
|
|
222
238
|
createElementVNode("span", null, "拆分", -1)
|
|
223
|
-
])])) :
|
|
239
|
+
])])) : (openBlock(), createElementBlock("i", {
|
|
240
|
+
key: 2,
|
|
241
|
+
class: "epx-page-designer-setting__widget-switch el-icon-sort",
|
|
242
|
+
title: "切换组件",
|
|
243
|
+
onClick: _cache[3] || (_cache[3] = ($event) => $data.showSwitchDialog = true)
|
|
244
|
+
})),
|
|
224
245
|
createVNode(_component_el_popover, {
|
|
225
246
|
ref: "codeEditorPopover",
|
|
226
247
|
placement: "bottom",
|
|
227
248
|
width: "400",
|
|
228
249
|
trigger: "click",
|
|
229
|
-
onBeforeEnter: _cache[
|
|
230
|
-
onAfterLeave: _cache[
|
|
250
|
+
onBeforeEnter: _cache[4] || (_cache[4] = ($event) => $data.showCodeEditor = true),
|
|
251
|
+
onAfterLeave: _cache[5] || (_cache[5] = ($event) => $data.showCodeEditor = false)
|
|
231
252
|
}, {
|
|
232
253
|
reference: withCtx(() => [
|
|
233
254
|
createVNode(_component_el_button, {
|
|
@@ -235,7 +256,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
235
256
|
round: "",
|
|
236
257
|
size: "small"
|
|
237
258
|
}, {
|
|
238
|
-
default: withCtx(() => [..._cache[
|
|
259
|
+
default: withCtx(() => [..._cache[10] || (_cache[10] = [
|
|
239
260
|
createElementVNode("i", { class: "epx-icon-code" }, null, -1)
|
|
240
261
|
])]),
|
|
241
262
|
_: 1
|
|
@@ -252,7 +273,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
252
273
|
}, 512)
|
|
253
274
|
])),
|
|
254
275
|
(openBlock(), createBlock(_component_epx_page_designer_setting_property, {
|
|
255
|
-
key: $options.
|
|
276
|
+
key: $options.propertyKey,
|
|
256
277
|
designer: $props.designer,
|
|
257
278
|
relationList: $props.relationList
|
|
258
279
|
}, null, 8, ["designer", "relationList"]))
|
|
@@ -285,6 +306,21 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
285
306
|
})) : createCommentVNode("", true)
|
|
286
307
|
]),
|
|
287
308
|
_: 1
|
|
309
|
+
}, 8, ["modelValue"]),
|
|
310
|
+
createVNode(_component_el_dialog, {
|
|
311
|
+
title: "切换组件",
|
|
312
|
+
modelValue: $data.showSwitchDialog,
|
|
313
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.showSwitchDialog = $event),
|
|
314
|
+
width: "960px",
|
|
315
|
+
"append-to-body": ""
|
|
316
|
+
}, {
|
|
317
|
+
default: withCtx(() => [
|
|
318
|
+
createVNode(_component_epx_visual_component_library_dialog, {
|
|
319
|
+
"hide-template": "",
|
|
320
|
+
onClick: $options.switchComponent
|
|
321
|
+
}, null, 8, ["onClick"])
|
|
322
|
+
]),
|
|
323
|
+
_: 1
|
|
288
324
|
}, 8, ["modelValue"])
|
|
289
325
|
]),
|
|
290
326
|
_: 1
|
|
@@ -6,7 +6,12 @@ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
|
6
6
|
const _sfc_main = {
|
|
7
7
|
name: "epx-visual-component-library-dialog",
|
|
8
8
|
props: {
|
|
9
|
-
initialTerminal: { type: String, default: "pc" }
|
|
9
|
+
initialTerminal: { type: String, default: "pc" },
|
|
10
|
+
// 隐藏「模板组件」分类(如切换组件时,模板不能作为切换目标)
|
|
11
|
+
hideTemplate: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: false
|
|
14
|
+
}
|
|
10
15
|
},
|
|
11
16
|
data() {
|
|
12
17
|
return {
|
|
@@ -25,6 +30,7 @@ const _sfc_main = {
|
|
|
25
30
|
]),
|
|
26
31
|
componentTypeList() {
|
|
27
32
|
const code = this.getCodeById("COMPONENT_TYPE") || [];
|
|
33
|
+
if (this.hideTemplate) return code;
|
|
28
34
|
return [...code, { code: "template", name: "模板组件" }];
|
|
29
35
|
}
|
|
30
36
|
},
|
|
@@ -244,7 +250,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
244
250
|
])
|
|
245
251
|
]);
|
|
246
252
|
}
|
|
247
|
-
const ComponentLibraryDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
253
|
+
const ComponentLibraryDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-be6fc4ff"]]);
|
|
248
254
|
export {
|
|
249
255
|
ComponentLibraryDialog as default
|
|
250
256
|
};
|
|
@@ -1109,7 +1109,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1109
1109
|
}, 8, ["modelValue"])
|
|
1110
1110
|
], 2);
|
|
1111
1111
|
}
|
|
1112
|
-
const DashboardMobile = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
1112
|
+
const DashboardMobile = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-49553b15"]]);
|
|
1113
1113
|
export {
|
|
1114
1114
|
DashboardMobile as default
|
|
1115
1115
|
};
|