@fecp/designer 5.6.17 → 5.6.18
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/layout/aside/index.vue.mjs +6 -6
- package/es/designer/src/layout/header/index.vue.mjs +2 -2
- package/es/designer/src/layout/index.vue.mjs +38 -45
- package/es/designer/src/layout/property/index.vue.mjs +2 -2
- package/es/designer/src/packages/utils/common.mjs +17 -17
- package/es/designer/src/store/index.mjs +2 -2
- package/es/designer.css +9 -9
- package/es/packages/mobile/src/components/base/card/Card.vue.mjs +2 -2
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/layout/index.vue.js +55 -62
- package/lib/designer/src/store/index.js +2 -2
- package/lib/designer.css +9 -9
- package/lib/packages/mobile/src/components/base/card/Card.vue.js +2 -2
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ import components from "../../packages/form/aside/index.mjs";
|
|
|
14
14
|
import FieldRecycleBin from "./fieldRecycleBin.vue.mjs";
|
|
15
15
|
import HiddenFieldDialog from "./HiddenFieldDialog.vue.mjs";
|
|
16
16
|
import { throttle as eo } from "../../../../node_modules/@vexip-ui/utils/dist/index.mjs";
|
|
17
|
-
import
|
|
17
|
+
import store from "../../store/index.mjs";
|
|
18
18
|
/* empty css */
|
|
19
19
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
20
20
|
import { ElAside } from "../../../../node_modules/element-plus/es/components/container/index.mjs";
|
|
@@ -37,7 +37,7 @@ const _sfc_main = {
|
|
|
37
37
|
setup(__props, { emit: __emit }) {
|
|
38
38
|
const emit = __emit;
|
|
39
39
|
const editingAside = computed(() => {
|
|
40
|
-
switch (
|
|
40
|
+
switch (store.getters.editingType) {
|
|
41
41
|
case "table":
|
|
42
42
|
return components$1;
|
|
43
43
|
case "form":
|
|
@@ -46,7 +46,7 @@ const _sfc_main = {
|
|
|
46
46
|
return null;
|
|
47
47
|
});
|
|
48
48
|
const editingType = computed(() => {
|
|
49
|
-
return
|
|
49
|
+
return store.getters.editingType;
|
|
50
50
|
});
|
|
51
51
|
const activeNames = ref(["basic", "advanced"]);
|
|
52
52
|
const recycleBinVisible = ref(false);
|
|
@@ -70,19 +70,19 @@ const _sfc_main = {
|
|
|
70
70
|
}
|
|
71
71
|
function onDragEnd(event) {
|
|
72
72
|
setSelectedItem(event.clonedData);
|
|
73
|
-
if (
|
|
73
|
+
if (store.getters.editingType == "form") {
|
|
74
74
|
emitter.emit("onFormDragEnd", event);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
const onMove = eo((event) => {
|
|
78
|
-
if (
|
|
78
|
+
if (store.getters.editingType == "form") {
|
|
79
79
|
emit("onFormDragMove", event);
|
|
80
80
|
return true;
|
|
81
81
|
}
|
|
82
82
|
return true;
|
|
83
83
|
}, 50);
|
|
84
84
|
function onStart(event) {
|
|
85
|
-
if (
|
|
85
|
+
if (store.getters.editingType == "form") {
|
|
86
86
|
emitter.emit("onFormDragStart", event);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
@@ -15,7 +15,7 @@ import tableHeaderBtn from "../../packages/table/headerBtn.vue.mjs";
|
|
|
15
15
|
import formHeaderBtn from "../../packages/form/headerBtn.vue.mjs";
|
|
16
16
|
import { getEditConfigData, getEditingType } from "../../packages/utils/common.mjs";
|
|
17
17
|
import api from "../../api/index.mjs";
|
|
18
|
-
import
|
|
18
|
+
import store from "../../store/index.mjs";
|
|
19
19
|
import packageJson from "../../../package.json.mjs";
|
|
20
20
|
import { defaultProperty } from "../../packages/form/aside/index.mjs";
|
|
21
21
|
import { defaultProperty as defaultProperty$1 } from "../../packages/table/aside/index.mjs";
|
|
@@ -42,7 +42,7 @@ const _sfc_main = {
|
|
|
42
42
|
const currentInstance = getCurrentInstance();
|
|
43
43
|
const ctx = currentInstance.proxy;
|
|
44
44
|
const editingHeaderBtn = computed(() => {
|
|
45
|
-
switch (
|
|
45
|
+
switch (store.getters.editingType) {
|
|
46
46
|
case "table":
|
|
47
47
|
return tableHeaderBtn;
|
|
48
48
|
case "form":
|
|
@@ -7,19 +7,18 @@ import "../../../node_modules/element-plus/es/index.mjs";
|
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
9
|
import "../../../node_modules/element-plus/theme-chalk/el-config-provider.css.mjs";
|
|
10
|
-
import { getCurrentInstance, ref, computed,
|
|
10
|
+
import { getCurrentInstance, ref, computed, createBlock, openBlock, unref, withCtx, createElementBlock, createCommentVNode, createVNode, resolveDynamicComponent } from "vue";
|
|
11
11
|
import zh_cn_default from "../../../node_modules/element-plus/es/locale/lang/zh-cn.mjs";
|
|
12
12
|
import LayoutAside from "./aside/index.vue.mjs";
|
|
13
13
|
import _sfc_main$1 from "./header/index.vue.mjs";
|
|
14
14
|
import LayoutProperty from "./property/index.vue.mjs";
|
|
15
15
|
import tableWorkArea from "../packages/table/index.vue.mjs";
|
|
16
16
|
import formWorkArea from "../packages/form/index.vue.mjs";
|
|
17
|
-
import
|
|
18
|
-
import { setSelectedItem, setHoverItem
|
|
17
|
+
import store from "../store/index.mjs";
|
|
18
|
+
import { setEditConfigData, setSelectedItem, setHoverItem } from "../packages/utils/common.mjs";
|
|
19
19
|
import api from "../api/index.mjs";
|
|
20
20
|
import { defaultTableConfig } from "../packages/table/default.mjs";
|
|
21
21
|
import { defaultFormConfig } from "../packages/form/default.mjs";
|
|
22
|
-
import { useStore } from "../../../node_modules/vuex/dist/vuex.esm-bundler.mjs";
|
|
23
22
|
/* empty css */
|
|
24
23
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
25
24
|
import { ElConfigProvider } from "../../../node_modules/element-plus/es/components/config-provider/index.mjs";
|
|
@@ -32,48 +31,45 @@ const _hoisted_1 = {
|
|
|
32
31
|
const _sfc_main = {
|
|
33
32
|
__name: "index",
|
|
34
33
|
setup(__props) {
|
|
35
|
-
const store = useStore();
|
|
36
34
|
const currentInstance = getCurrentInstance();
|
|
37
35
|
const ctx = currentInstance.proxy;
|
|
38
36
|
const pkId = getUrlParam("pkId");
|
|
39
37
|
const isInitd = ref(0);
|
|
40
38
|
const compRef = ref(null);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
storeDev.commit("set_editing_type", data.type);
|
|
76
|
-
}
|
|
39
|
+
if (!pkId) {
|
|
40
|
+
isInitd.value = -1;
|
|
41
|
+
} else {
|
|
42
|
+
api.login4dev(ctx.$http).then((data) => {
|
|
43
|
+
store.commit("set_token", data.token);
|
|
44
|
+
store.commit("set_refreshToken", data.refreshToken);
|
|
45
|
+
api.getById(ctx.$http, pkId).then((data2) => {
|
|
46
|
+
const templateName = data2.templateName;
|
|
47
|
+
const templateKey = data2.templateKey;
|
|
48
|
+
document.title = templateName || "表单设计器";
|
|
49
|
+
if (data2.type == "table") {
|
|
50
|
+
const tableOptions = ref({
|
|
51
|
+
pkId,
|
|
52
|
+
templateName,
|
|
53
|
+
templateKey,
|
|
54
|
+
...defaultTableConfig,
|
|
55
|
+
...JSON.parse(data2.context)
|
|
56
|
+
});
|
|
57
|
+
setEditConfigData(tableOptions.value);
|
|
58
|
+
isInitd.value = 1;
|
|
59
|
+
} else if (data2.type == "form") {
|
|
60
|
+
const formOptions = ref({
|
|
61
|
+
pkId,
|
|
62
|
+
templateName,
|
|
63
|
+
templateKey,
|
|
64
|
+
...defaultFormConfig,
|
|
65
|
+
...JSON.parse(data2.context)
|
|
66
|
+
});
|
|
67
|
+
setEditConfigData(formOptions.value);
|
|
68
|
+
isInitd.value = 1;
|
|
69
|
+
}
|
|
70
|
+
store.commit("set_editing_type", data2.type);
|
|
71
|
+
});
|
|
72
|
+
});
|
|
77
73
|
}
|
|
78
74
|
const editingArea = computed(() => {
|
|
79
75
|
switch (store.getters.editingType) {
|
|
@@ -99,9 +95,6 @@ const _sfc_main = {
|
|
|
99
95
|
if (values.length === 0) return null;
|
|
100
96
|
return values.length === 1 ? values[0] : values;
|
|
101
97
|
}
|
|
102
|
-
onMounted(() => {
|
|
103
|
-
init();
|
|
104
|
-
});
|
|
105
98
|
return (_ctx, _cache) => {
|
|
106
99
|
const _component_el_config_provider = ElConfigProvider;
|
|
107
100
|
const _component_el_main = ElMain;
|
|
@@ -151,7 +144,7 @@ const _sfc_main = {
|
|
|
151
144
|
};
|
|
152
145
|
}
|
|
153
146
|
};
|
|
154
|
-
const layout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
147
|
+
const layout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ae1b4337"]]);
|
|
155
148
|
export {
|
|
156
149
|
layout as default
|
|
157
150
|
};
|
|
@@ -4,7 +4,7 @@ import "../../../../node_modules/element-plus/es/index.mjs";
|
|
|
4
4
|
import { computed, createBlock, openBlock, withCtx, resolveDynamicComponent } from "vue";
|
|
5
5
|
import _sfc_main$2 from "../../packages/table/property/index.vue.mjs";
|
|
6
6
|
import _sfc_main$1 from "../../packages/form/property/index.vue.mjs";
|
|
7
|
-
import
|
|
7
|
+
import store from "../../store/index.mjs";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
10
10
|
import { ElAside } from "../../../../node_modules/element-plus/es/components/container/index.mjs";
|
|
@@ -12,7 +12,7 @@ const _sfc_main = {
|
|
|
12
12
|
__name: "index",
|
|
13
13
|
setup(__props) {
|
|
14
14
|
const editingProperty = computed(() => {
|
|
15
|
-
switch (
|
|
15
|
+
switch (store.getters.editingType) {
|
|
16
16
|
case "table":
|
|
17
17
|
return _sfc_main$2;
|
|
18
18
|
case "form":
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import
|
|
1
|
+
import store from "../../store/index.mjs";
|
|
2
2
|
import cloneDeep$1 from "../../../../node_modules/lodash-es/cloneDeep.mjs";
|
|
3
3
|
function cloneDeep(data) {
|
|
4
4
|
return cloneDeep$1(data);
|
|
5
5
|
}
|
|
6
6
|
function setEditConfigData(data) {
|
|
7
|
-
|
|
7
|
+
store.commit("set_edit_config_data", data);
|
|
8
8
|
}
|
|
9
9
|
function getEditConfigData() {
|
|
10
|
-
return
|
|
10
|
+
return store.getters.editConfigData;
|
|
11
11
|
}
|
|
12
12
|
function setSelectedItem(item) {
|
|
13
|
-
|
|
13
|
+
store.commit("set_selected_item", item);
|
|
14
14
|
}
|
|
15
15
|
function setHoverItem(item) {
|
|
16
|
-
|
|
16
|
+
store.commit("set_hover_item", item);
|
|
17
17
|
}
|
|
18
18
|
function isHoverItem(item) {
|
|
19
19
|
var _a;
|
|
20
|
-
return ((_a =
|
|
20
|
+
return ((_a = store.getters.hoverItem) == null ? void 0 : _a.id) == (item == null ? void 0 : item.id);
|
|
21
21
|
}
|
|
22
22
|
function isSelectedItem(item) {
|
|
23
23
|
var _a;
|
|
24
|
-
return ((_a =
|
|
24
|
+
return ((_a = store.getters.selectedItem) == null ? void 0 : _a.id) == (item == null ? void 0 : item.id);
|
|
25
25
|
}
|
|
26
26
|
function getCurrentItem() {
|
|
27
|
-
return
|
|
27
|
+
return store.getters.selectedItem;
|
|
28
28
|
}
|
|
29
29
|
function getCurrentClass(item) {
|
|
30
30
|
return {
|
|
@@ -33,24 +33,24 @@ function getCurrentClass(item) {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
function setEditConfigDataSources(dataSources) {
|
|
36
|
-
const editConfigData =
|
|
36
|
+
const editConfigData = store.getters.editConfigData;
|
|
37
37
|
editConfigData.dataSources = dataSources;
|
|
38
|
-
|
|
38
|
+
store.commit("set_edit_config_data", editConfigData);
|
|
39
39
|
}
|
|
40
40
|
function getEditConfigDialogs() {
|
|
41
|
-
return
|
|
41
|
+
return store.getters.editConfigData.dialogs || [];
|
|
42
42
|
}
|
|
43
43
|
function setEditConfigDialogs(dialogs) {
|
|
44
|
-
const editConfigData =
|
|
44
|
+
const editConfigData = store.getters.editConfigData;
|
|
45
45
|
editConfigData.dialogs = dialogs;
|
|
46
|
-
|
|
46
|
+
store.commit("set_edit_config_data", editConfigData);
|
|
47
47
|
}
|
|
48
48
|
function getEditConfigDataSources() {
|
|
49
|
-
return
|
|
49
|
+
return store.getters.editConfigData.dataSources;
|
|
50
50
|
}
|
|
51
51
|
function getEditConfigDataFields() {
|
|
52
|
-
const editingType =
|
|
53
|
-
const fieldsData =
|
|
52
|
+
const editingType = store.getters.editingType;
|
|
53
|
+
const fieldsData = store.getters.editConfigData.fieldsData;
|
|
54
54
|
switch (editingType) {
|
|
55
55
|
case "table":
|
|
56
56
|
return fieldsData;
|
|
@@ -60,7 +60,7 @@ function getEditConfigDataFields() {
|
|
|
60
60
|
return fieldsData;
|
|
61
61
|
}
|
|
62
62
|
function getEditingType() {
|
|
63
|
-
return
|
|
63
|
+
return store.getters.editingType;
|
|
64
64
|
}
|
|
65
65
|
export {
|
|
66
66
|
cloneDeep,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import a from "../../../node_modules/vuex-persistedstate/dist/vuex-persistedstate.es.mjs";
|
|
2
2
|
import index from "../../../node_modules/vuex/dist/vuex.esm-bundler.mjs";
|
|
3
3
|
import { mutations, getters, state } from "./designer.mjs";
|
|
4
|
-
const
|
|
4
|
+
const store = index.createStore({
|
|
5
5
|
plugins: [
|
|
6
6
|
a({
|
|
7
7
|
key: "fec-dev-designer",
|
|
@@ -15,5 +15,5 @@ const storeDev = index.createStore({
|
|
|
15
15
|
modules: {}
|
|
16
16
|
});
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
store as default
|
|
19
19
|
};
|
package/es/designer.css
CHANGED
|
@@ -5344,7 +5344,7 @@ to {
|
|
|
5344
5344
|
padding: 0 10px;
|
|
5345
5345
|
border-radius: 4px;
|
|
5346
5346
|
font-size: 13px;
|
|
5347
|
-
}.init-error-container[data-v-
|
|
5347
|
+
}.init-error-container[data-v-ae1b4337] {
|
|
5348
5348
|
width: 100%;
|
|
5349
5349
|
height: 100vh;
|
|
5350
5350
|
display: flex;
|
|
@@ -5352,39 +5352,39 @@ to {
|
|
|
5352
5352
|
justify-content: center;
|
|
5353
5353
|
background-color: #f5f7fa;
|
|
5354
5354
|
}
|
|
5355
|
-
.inner-container[data-v-
|
|
5355
|
+
.inner-container[data-v-ae1b4337] {
|
|
5356
5356
|
height: 0px;
|
|
5357
5357
|
z-index: 1;
|
|
5358
5358
|
background-color: #f7f8fa;
|
|
5359
5359
|
}
|
|
5360
|
-
.inner-container[data-v-
|
|
5360
|
+
.inner-container[data-v-ae1b4337] .el-collapse {
|
|
5361
5361
|
border-bottom: none;
|
|
5362
5362
|
}
|
|
5363
|
-
.inner-container[data-v-
|
|
5363
|
+
.inner-container[data-v-ae1b4337] .el-collapse .el-collapse-item__header {
|
|
5364
5364
|
height: 45px;
|
|
5365
5365
|
background: rgb(242, 242, 242);
|
|
5366
5366
|
color: #1a1a1a;
|
|
5367
5367
|
padding-left: 40px;
|
|
5368
5368
|
position: relative;
|
|
5369
5369
|
}
|
|
5370
|
-
.inner-container[data-v-
|
|
5370
|
+
.inner-container[data-v-ae1b4337] .el-collapse .el-collapse-item__header .el-collapse-item__arrow {
|
|
5371
5371
|
position: absolute;
|
|
5372
5372
|
left: 14px;
|
|
5373
5373
|
font-size: 12px;
|
|
5374
5374
|
}
|
|
5375
|
-
.inner-container[data-v-
|
|
5375
|
+
.inner-container[data-v-ae1b4337] .el-collapse .el-collapse-item__header .el-collapse-item__title {
|
|
5376
5376
|
font-size: 14px;
|
|
5377
5377
|
font-weight: 600;
|
|
5378
5378
|
}
|
|
5379
|
-
.inner-container[data-v-
|
|
5379
|
+
.inner-container[data-v-ae1b4337] .el-collapse .el-collapse-item__wrap {
|
|
5380
5380
|
border: none;
|
|
5381
5381
|
}
|
|
5382
|
-
.root-main[data-v-
|
|
5382
|
+
.root-main[data-v-ae1b4337] {
|
|
5383
5383
|
padding: 0;
|
|
5384
5384
|
margin: 0 20px;
|
|
5385
5385
|
background-color: #fff;
|
|
5386
5386
|
}
|
|
5387
|
-
.fec-designer-container[data-v-
|
|
5387
|
+
.fec-designer-container[data-v-ae1b4337] {
|
|
5388
5388
|
flex-direction: column;
|
|
5389
5389
|
height: 100%;
|
|
5390
5390
|
}/* 弹层样式 */
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
/* empty css */
|
|
7
7
|
/* empty css */
|
|
8
8
|
import { createBlock, openBlock, withCtx, createVNode, renderSlot } from "vue";
|
|
9
|
+
/* empty css */
|
|
10
|
+
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
9
11
|
/* empty css */
|
|
10
12
|
/* empty css */
|
|
11
13
|
/* empty css */
|
|
12
14
|
/* empty css */
|
|
13
15
|
/* empty css */
|
|
14
|
-
/* empty css */
|
|
15
|
-
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
16
16
|
import { SwipeCell } from "../../../../../../node_modules/vant/es/swipe-cell/index.mjs";
|
|
17
17
|
import { showConfirmDialog } from "../../../../../../node_modules/vant/es/dialog/function-call.mjs";
|
|
18
18
|
import "../../../../../../node_modules/vant/es/dialog/index.mjs";
|
|
@@ -11,22 +11,21 @@ require("../../../node_modules/element-plus/es/index.js");
|
|
|
11
11
|
require("../../../node_modules/element-plus/theme-chalk/el-config-provider.css.js");
|
|
12
12
|
const Vue = require("vue");
|
|
13
13
|
const zhCn = require("../../../node_modules/element-plus/es/locale/lang/zh-cn.js");
|
|
14
|
-
const index$
|
|
15
|
-
const index$
|
|
16
|
-
const index$
|
|
17
|
-
const index$
|
|
18
|
-
const index = ;/* empty css */
|
|
19
|
-
const index$
|
|
14
|
+
const index$7 = ;/* empty css */
|
|
15
|
+
const index$6 = ;/* empty css */
|
|
16
|
+
const index$8 = ;/* empty css */
|
|
17
|
+
const index$3 = ;/* empty css */
|
|
18
|
+
const index$2 = ;/* empty css */
|
|
19
|
+
const index$1 = require("../store/index.js");
|
|
20
20
|
const common = require("../packages/utils/common.js");
|
|
21
|
-
const index
|
|
21
|
+
const index = require("../api/index.js");
|
|
22
22
|
const _default = require("../packages/table/default.js");
|
|
23
23
|
const _default$1 = require("../packages/form/default.js");
|
|
24
|
-
const vuex_esmBundler = require("../../../node_modules/vuex/dist/vuex.esm-bundler.js");
|
|
25
24
|
;/* empty css */
|
|
26
25
|
const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.js");
|
|
27
|
-
const index$
|
|
28
|
-
const index$
|
|
29
|
-
const index$
|
|
26
|
+
const index$4 = require("../../../node_modules/element-plus/es/components/config-provider/index.js");
|
|
27
|
+
const index$5 = require("../../../node_modules/element-plus/es/components/container/index.js");
|
|
28
|
+
const index$9 = require("../../../node_modules/element-plus/es/components/result/index.js");
|
|
30
29
|
const _hoisted_1 = {
|
|
31
30
|
key: 1,
|
|
32
31
|
class: "init-error-container"
|
|
@@ -34,55 +33,52 @@ const _hoisted_1 = {
|
|
|
34
33
|
const _sfc_main = {
|
|
35
34
|
__name: "index",
|
|
36
35
|
setup(__props) {
|
|
37
|
-
const store = vuex_esmBundler.useStore();
|
|
38
36
|
const currentInstance = Vue.getCurrentInstance();
|
|
39
37
|
const ctx = currentInstance.proxy;
|
|
40
38
|
const pkId = getUrlParam("pkId");
|
|
41
39
|
const isInitd = Vue.ref(0);
|
|
42
40
|
const compRef = Vue.ref(null);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
index$9.default.commit("set_editing_type", data.type);
|
|
78
|
-
}
|
|
41
|
+
if (!pkId) {
|
|
42
|
+
isInitd.value = -1;
|
|
43
|
+
} else {
|
|
44
|
+
index.default.login4dev(ctx.$http).then((data) => {
|
|
45
|
+
index$1.default.commit("set_token", data.token);
|
|
46
|
+
index$1.default.commit("set_refreshToken", data.refreshToken);
|
|
47
|
+
index.default.getById(ctx.$http, pkId).then((data2) => {
|
|
48
|
+
const templateName = data2.templateName;
|
|
49
|
+
const templateKey = data2.templateKey;
|
|
50
|
+
document.title = templateName || "表单设计器";
|
|
51
|
+
if (data2.type == "table") {
|
|
52
|
+
const tableOptions = Vue.ref({
|
|
53
|
+
pkId,
|
|
54
|
+
templateName,
|
|
55
|
+
templateKey,
|
|
56
|
+
..._default.defaultTableConfig,
|
|
57
|
+
...JSON.parse(data2.context)
|
|
58
|
+
});
|
|
59
|
+
common.setEditConfigData(tableOptions.value);
|
|
60
|
+
isInitd.value = 1;
|
|
61
|
+
} else if (data2.type == "form") {
|
|
62
|
+
const formOptions = Vue.ref({
|
|
63
|
+
pkId,
|
|
64
|
+
templateName,
|
|
65
|
+
templateKey,
|
|
66
|
+
..._default$1.defaultFormConfig,
|
|
67
|
+
...JSON.parse(data2.context)
|
|
68
|
+
});
|
|
69
|
+
common.setEditConfigData(formOptions.value);
|
|
70
|
+
isInitd.value = 1;
|
|
71
|
+
}
|
|
72
|
+
index$1.default.commit("set_editing_type", data2.type);
|
|
73
|
+
});
|
|
74
|
+
});
|
|
79
75
|
}
|
|
80
76
|
const editingArea = Vue.computed(() => {
|
|
81
|
-
switch (
|
|
77
|
+
switch (index$1.default.getters.editingType) {
|
|
82
78
|
case "table":
|
|
83
|
-
return index$
|
|
79
|
+
return index$3.default;
|
|
84
80
|
case "form":
|
|
85
|
-
return index.default;
|
|
81
|
+
return index$2.default;
|
|
86
82
|
}
|
|
87
83
|
return null;
|
|
88
84
|
});
|
|
@@ -101,14 +97,11 @@ const _sfc_main = {
|
|
|
101
97
|
if (values.length === 0) return null;
|
|
102
98
|
return values.length === 1 ? values[0] : values;
|
|
103
99
|
}
|
|
104
|
-
Vue.onMounted(() => {
|
|
105
|
-
init();
|
|
106
|
-
});
|
|
107
100
|
return (_ctx, _cache) => {
|
|
108
|
-
const _component_el_config_provider = index$
|
|
109
|
-
const _component_el_main = index$
|
|
110
|
-
const _component_el_container = index$
|
|
111
|
-
const _component_el_result = index$
|
|
101
|
+
const _component_el_config_provider = index$4.ElConfigProvider;
|
|
102
|
+
const _component_el_main = index$5.ElMain;
|
|
103
|
+
const _component_el_container = index$5.ElContainer;
|
|
104
|
+
const _component_el_result = index$9.ElResult;
|
|
112
105
|
return Vue.openBlock(), Vue.createBlock(_component_el_config_provider, { locale: Vue.unref(zhCn.default) }, {
|
|
113
106
|
default: Vue.withCtx(() => [
|
|
114
107
|
isInitd.value == 1 ? (Vue.openBlock(), Vue.createBlock(_component_el_container, {
|
|
@@ -116,10 +109,10 @@ const _sfc_main = {
|
|
|
116
109
|
class: "fec-designer-container"
|
|
117
110
|
}, {
|
|
118
111
|
default: Vue.withCtx(() => [
|
|
119
|
-
Vue.createVNode(Vue.unref(index$
|
|
112
|
+
Vue.createVNode(Vue.unref(index$6.default)),
|
|
120
113
|
Vue.createVNode(_component_el_container, { class: "inner-container" }, {
|
|
121
114
|
default: Vue.withCtx(() => [
|
|
122
|
-
Vue.createVNode(Vue.unref(index$
|
|
115
|
+
Vue.createVNode(Vue.unref(index$7.default), { onOnFormDragMove: onFormDragMove }),
|
|
123
116
|
Vue.createVNode(_component_el_main, { class: "root-main" }, {
|
|
124
117
|
default: Vue.withCtx(() => [
|
|
125
118
|
Vue.createVNode(_component_el_config_provider, { locale: Vue.unref(zhCn.default) }, {
|
|
@@ -134,7 +127,7 @@ const _sfc_main = {
|
|
|
134
127
|
]),
|
|
135
128
|
_: 1
|
|
136
129
|
}),
|
|
137
|
-
Vue.createVNode(Vue.unref(index$
|
|
130
|
+
Vue.createVNode(Vue.unref(index$8.default))
|
|
138
131
|
]),
|
|
139
132
|
_: 1
|
|
140
133
|
})
|
|
@@ -153,5 +146,5 @@ const _sfc_main = {
|
|
|
153
146
|
};
|
|
154
147
|
}
|
|
155
148
|
};
|
|
156
|
-
const layout = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
149
|
+
const layout = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-ae1b4337"]]);
|
|
157
150
|
exports.default = layout;
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const vuexPersistedstate_es = require("../../../node_modules/vuex-persistedstate/dist/vuex-persistedstate.es.js");
|
|
4
4
|
const vuex_esmBundler = require("../../../node_modules/vuex/dist/vuex.esm-bundler.js");
|
|
5
5
|
const designer = require("./designer.js");
|
|
6
|
-
const
|
|
6
|
+
const store = vuex_esmBundler.default.createStore({
|
|
7
7
|
plugins: [
|
|
8
8
|
vuexPersistedstate_es.default({
|
|
9
9
|
key: "fec-dev-designer",
|
|
@@ -16,4 +16,4 @@ const storeDev = vuex_esmBundler.default.createStore({
|
|
|
16
16
|
actions: {},
|
|
17
17
|
modules: {}
|
|
18
18
|
});
|
|
19
|
-
exports.default =
|
|
19
|
+
exports.default = store;
|
package/lib/designer.css
CHANGED
|
@@ -5344,7 +5344,7 @@ to {
|
|
|
5344
5344
|
padding: 0 10px;
|
|
5345
5345
|
border-radius: 4px;
|
|
5346
5346
|
font-size: 13px;
|
|
5347
|
-
}.init-error-container[data-v-
|
|
5347
|
+
}.init-error-container[data-v-ae1b4337] {
|
|
5348
5348
|
width: 100%;
|
|
5349
5349
|
height: 100vh;
|
|
5350
5350
|
display: flex;
|
|
@@ -5352,39 +5352,39 @@ to {
|
|
|
5352
5352
|
justify-content: center;
|
|
5353
5353
|
background-color: #f5f7fa;
|
|
5354
5354
|
}
|
|
5355
|
-
.inner-container[data-v-
|
|
5355
|
+
.inner-container[data-v-ae1b4337] {
|
|
5356
5356
|
height: 0px;
|
|
5357
5357
|
z-index: 1;
|
|
5358
5358
|
background-color: #f7f8fa;
|
|
5359
5359
|
}
|
|
5360
|
-
.inner-container[data-v-
|
|
5360
|
+
.inner-container[data-v-ae1b4337] .el-collapse {
|
|
5361
5361
|
border-bottom: none;
|
|
5362
5362
|
}
|
|
5363
|
-
.inner-container[data-v-
|
|
5363
|
+
.inner-container[data-v-ae1b4337] .el-collapse .el-collapse-item__header {
|
|
5364
5364
|
height: 45px;
|
|
5365
5365
|
background: rgb(242, 242, 242);
|
|
5366
5366
|
color: #1a1a1a;
|
|
5367
5367
|
padding-left: 40px;
|
|
5368
5368
|
position: relative;
|
|
5369
5369
|
}
|
|
5370
|
-
.inner-container[data-v-
|
|
5370
|
+
.inner-container[data-v-ae1b4337] .el-collapse .el-collapse-item__header .el-collapse-item__arrow {
|
|
5371
5371
|
position: absolute;
|
|
5372
5372
|
left: 14px;
|
|
5373
5373
|
font-size: 12px;
|
|
5374
5374
|
}
|
|
5375
|
-
.inner-container[data-v-
|
|
5375
|
+
.inner-container[data-v-ae1b4337] .el-collapse .el-collapse-item__header .el-collapse-item__title {
|
|
5376
5376
|
font-size: 14px;
|
|
5377
5377
|
font-weight: 600;
|
|
5378
5378
|
}
|
|
5379
|
-
.inner-container[data-v-
|
|
5379
|
+
.inner-container[data-v-ae1b4337] .el-collapse .el-collapse-item__wrap {
|
|
5380
5380
|
border: none;
|
|
5381
5381
|
}
|
|
5382
|
-
.root-main[data-v-
|
|
5382
|
+
.root-main[data-v-ae1b4337] {
|
|
5383
5383
|
padding: 0;
|
|
5384
5384
|
margin: 0 20px;
|
|
5385
5385
|
background-color: #fff;
|
|
5386
5386
|
}
|
|
5387
|
-
.fec-designer-container[data-v-
|
|
5387
|
+
.fec-designer-container[data-v-ae1b4337] {
|
|
5388
5388
|
flex-direction: column;
|
|
5389
5389
|
height: 100%;
|
|
5390
5390
|
}/* 弹层样式 */
|
|
@@ -8,13 +8,13 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
8
8
|
;/* empty css */
|
|
9
9
|
;/* empty css */
|
|
10
10
|
const Vue = require("vue");
|
|
11
|
+
;/* empty css */
|
|
12
|
+
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
11
13
|
;/* empty css */
|
|
12
14
|
;/* empty css */
|
|
13
15
|
;/* empty css */
|
|
14
16
|
;/* empty css */
|
|
15
17
|
;/* empty css */
|
|
16
|
-
;/* empty css */
|
|
17
|
-
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
18
18
|
const index$1 = require("../../../../../../node_modules/vant/es/swipe-cell/index.js");
|
|
19
19
|
const functionCall = require("../../../../../../node_modules/vant/es/dialog/function-call.js");
|
|
20
20
|
require("../../../../../../node_modules/vant/es/dialog/index.js");
|