@fecp/designer 5.6.13 → 5.6.14
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.
|
@@ -7,18 +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, createBlock, openBlock, unref, withCtx, createElementBlock, createCommentVNode, createVNode, resolveDynamicComponent } from "vue";
|
|
10
|
+
import { getCurrentInstance, ref, computed, onMounted, 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 { setEditConfigData, setSelectedItem, setHoverItem } from "../packages/utils/common.mjs";
|
|
17
|
+
import { setSelectedItem, setHoverItem, setEditConfigData } from "../packages/utils/common.mjs";
|
|
19
18
|
import api from "../api/index.mjs";
|
|
20
19
|
import { defaultTableConfig } from "../packages/table/default.mjs";
|
|
21
20
|
import { defaultFormConfig } from "../packages/form/default.mjs";
|
|
21
|
+
import { useStore } from "../../../node_modules/vuex/dist/vuex.esm-bundler.mjs";
|
|
22
22
|
/* empty css */
|
|
23
23
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
24
24
|
import { ElConfigProvider } from "../../../node_modules/element-plus/es/components/config-provider/index.mjs";
|
|
@@ -31,45 +31,48 @@ const _hoisted_1 = {
|
|
|
31
31
|
const _sfc_main = {
|
|
32
32
|
__name: "index",
|
|
33
33
|
setup(__props) {
|
|
34
|
+
const store = useStore();
|
|
34
35
|
const currentInstance = getCurrentInstance();
|
|
35
36
|
const ctx = currentInstance.proxy;
|
|
36
37
|
const pkId = getUrlParam("pkId");
|
|
37
38
|
const isInitd = ref(0);
|
|
38
39
|
const compRef = ref(null);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
store.
|
|
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
|
-
|
|
40
|
+
async function init() {
|
|
41
|
+
if (!pkId) {
|
|
42
|
+
isInitd.value = -1;
|
|
43
|
+
} else {
|
|
44
|
+
if (!store.getters.token) {
|
|
45
|
+
const resData = await api.login4dev(ctx.$http);
|
|
46
|
+
store.commit("set_token", resData.token);
|
|
47
|
+
store.commit("set_refreshToken", resData.refreshToken);
|
|
48
|
+
}
|
|
49
|
+
const data = await api.getById(ctx.$http, pkId);
|
|
50
|
+
const templateName = data.templateName;
|
|
51
|
+
const templateKey = data.templateKey;
|
|
52
|
+
document.title = templateName || "表单设计器";
|
|
53
|
+
if (data.type == "table") {
|
|
54
|
+
const tableOptions = ref({
|
|
55
|
+
pkId,
|
|
56
|
+
templateName,
|
|
57
|
+
templateKey,
|
|
58
|
+
...defaultTableConfig,
|
|
59
|
+
...JSON.parse(data.context)
|
|
60
|
+
});
|
|
61
|
+
setEditConfigData(tableOptions.value);
|
|
62
|
+
isInitd.value = 1;
|
|
63
|
+
} else if (data.type == "form") {
|
|
64
|
+
const formOptions = ref({
|
|
65
|
+
pkId,
|
|
66
|
+
templateName,
|
|
67
|
+
templateKey,
|
|
68
|
+
...defaultFormConfig,
|
|
69
|
+
...JSON.parse(data.context)
|
|
70
|
+
});
|
|
71
|
+
setEditConfigData(formOptions.value);
|
|
72
|
+
isInitd.value = 1;
|
|
73
|
+
}
|
|
74
|
+
store.commit("set_editing_type", data.type);
|
|
75
|
+
}
|
|
73
76
|
}
|
|
74
77
|
const editingArea = computed(() => {
|
|
75
78
|
switch (store.getters.editingType) {
|
|
@@ -95,6 +98,9 @@ const _sfc_main = {
|
|
|
95
98
|
if (values.length === 0) return null;
|
|
96
99
|
return values.length === 1 ? values[0] : values;
|
|
97
100
|
}
|
|
101
|
+
onMounted(() => {
|
|
102
|
+
init();
|
|
103
|
+
});
|
|
98
104
|
return (_ctx, _cache) => {
|
|
99
105
|
const _component_el_config_provider = ElConfigProvider;
|
|
100
106
|
const _component_el_main = ElMain;
|
|
@@ -144,7 +150,7 @@ const _sfc_main = {
|
|
|
144
150
|
};
|
|
145
151
|
}
|
|
146
152
|
};
|
|
147
|
-
const layout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
153
|
+
const layout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-10018284"]]);
|
|
148
154
|
export {
|
|
149
155
|
layout as default
|
|
150
156
|
};
|
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-10018284] {
|
|
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-10018284] {
|
|
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-10018284] .el-collapse {
|
|
5361
5361
|
border-bottom: none;
|
|
5362
5362
|
}
|
|
5363
|
-
.inner-container[data-v-
|
|
5363
|
+
.inner-container[data-v-10018284] .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-10018284] .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-10018284] .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-10018284] .el-collapse .el-collapse-item__wrap {
|
|
5380
5380
|
border: none;
|
|
5381
5381
|
}
|
|
5382
|
-
.root-main[data-v-
|
|
5382
|
+
.root-main[data-v-10018284] {
|
|
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-10018284] {
|
|
5388
5388
|
flex-direction: column;
|
|
5389
5389
|
height: 100%;
|
|
5390
5390
|
}/* 弹层样式 */
|
|
@@ -11,21 +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
|
|
19
|
-
const index$1 = require("../store/index.js");
|
|
14
|
+
const index$5 = ;/* empty css */
|
|
15
|
+
const index$4 = ;/* empty css */
|
|
16
|
+
const index$6 = ;/* empty css */
|
|
17
|
+
const index$1 = ;/* empty css */
|
|
18
|
+
const index = ;/* empty css */
|
|
20
19
|
const common = require("../packages/utils/common.js");
|
|
21
|
-
const index = require("../api/index.js");
|
|
20
|
+
const index$8 = require("../api/index.js");
|
|
22
21
|
const _default = require("../packages/table/default.js");
|
|
23
22
|
const _default$1 = require("../packages/form/default.js");
|
|
23
|
+
const vuex_esmBundler = require("../../../node_modules/vuex/dist/vuex.esm-bundler.js");
|
|
24
24
|
;/* empty css */
|
|
25
25
|
const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.js");
|
|
26
|
-
const index$
|
|
27
|
-
const index$
|
|
28
|
-
const index$
|
|
26
|
+
const index$2 = require("../../../node_modules/element-plus/es/components/config-provider/index.js");
|
|
27
|
+
const index$3 = require("../../../node_modules/element-plus/es/components/container/index.js");
|
|
28
|
+
const index$7 = require("../../../node_modules/element-plus/es/components/result/index.js");
|
|
29
29
|
const _hoisted_1 = {
|
|
30
30
|
key: 1,
|
|
31
31
|
class: "init-error-container"
|
|
@@ -33,52 +33,55 @@ const _hoisted_1 = {
|
|
|
33
33
|
const _sfc_main = {
|
|
34
34
|
__name: "index",
|
|
35
35
|
setup(__props) {
|
|
36
|
+
const store = vuex_esmBundler.useStore();
|
|
36
37
|
const currentInstance = Vue.getCurrentInstance();
|
|
37
38
|
const ctx = currentInstance.proxy;
|
|
38
39
|
const pkId = getUrlParam("pkId");
|
|
39
40
|
const isInitd = Vue.ref(0);
|
|
40
41
|
const compRef = Vue.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
|
-
|
|
42
|
+
async function init() {
|
|
43
|
+
if (!pkId) {
|
|
44
|
+
isInitd.value = -1;
|
|
45
|
+
} else {
|
|
46
|
+
if (!store.getters.token) {
|
|
47
|
+
const resData = await index$8.default.login4dev(ctx.$http);
|
|
48
|
+
store.commit("set_token", resData.token);
|
|
49
|
+
store.commit("set_refreshToken", resData.refreshToken);
|
|
50
|
+
}
|
|
51
|
+
const data = await index$8.default.getById(ctx.$http, pkId);
|
|
52
|
+
const templateName = data.templateName;
|
|
53
|
+
const templateKey = data.templateKey;
|
|
54
|
+
document.title = templateName || "表单设计器";
|
|
55
|
+
if (data.type == "table") {
|
|
56
|
+
const tableOptions = Vue.ref({
|
|
57
|
+
pkId,
|
|
58
|
+
templateName,
|
|
59
|
+
templateKey,
|
|
60
|
+
..._default.defaultTableConfig,
|
|
61
|
+
...JSON.parse(data.context)
|
|
62
|
+
});
|
|
63
|
+
common.setEditConfigData(tableOptions.value);
|
|
64
|
+
isInitd.value = 1;
|
|
65
|
+
} else if (data.type == "form") {
|
|
66
|
+
const formOptions = Vue.ref({
|
|
67
|
+
pkId,
|
|
68
|
+
templateName,
|
|
69
|
+
templateKey,
|
|
70
|
+
..._default$1.defaultFormConfig,
|
|
71
|
+
...JSON.parse(data.context)
|
|
72
|
+
});
|
|
73
|
+
common.setEditConfigData(formOptions.value);
|
|
74
|
+
isInitd.value = 1;
|
|
75
|
+
}
|
|
76
|
+
store.commit("set_editing_type", data.type);
|
|
77
|
+
}
|
|
75
78
|
}
|
|
76
79
|
const editingArea = Vue.computed(() => {
|
|
77
|
-
switch (
|
|
80
|
+
switch (store.getters.editingType) {
|
|
78
81
|
case "table":
|
|
79
|
-
return index$
|
|
82
|
+
return index$1.default;
|
|
80
83
|
case "form":
|
|
81
|
-
return index
|
|
84
|
+
return index.default;
|
|
82
85
|
}
|
|
83
86
|
return null;
|
|
84
87
|
});
|
|
@@ -97,11 +100,14 @@ const _sfc_main = {
|
|
|
97
100
|
if (values.length === 0) return null;
|
|
98
101
|
return values.length === 1 ? values[0] : values;
|
|
99
102
|
}
|
|
103
|
+
Vue.onMounted(() => {
|
|
104
|
+
init();
|
|
105
|
+
});
|
|
100
106
|
return (_ctx, _cache) => {
|
|
101
|
-
const _component_el_config_provider = index$
|
|
102
|
-
const _component_el_main = index$
|
|
103
|
-
const _component_el_container = index$
|
|
104
|
-
const _component_el_result = index$
|
|
107
|
+
const _component_el_config_provider = index$2.ElConfigProvider;
|
|
108
|
+
const _component_el_main = index$3.ElMain;
|
|
109
|
+
const _component_el_container = index$3.ElContainer;
|
|
110
|
+
const _component_el_result = index$7.ElResult;
|
|
105
111
|
return Vue.openBlock(), Vue.createBlock(_component_el_config_provider, { locale: Vue.unref(zhCn.default) }, {
|
|
106
112
|
default: Vue.withCtx(() => [
|
|
107
113
|
isInitd.value == 1 ? (Vue.openBlock(), Vue.createBlock(_component_el_container, {
|
|
@@ -109,10 +115,10 @@ const _sfc_main = {
|
|
|
109
115
|
class: "fec-designer-container"
|
|
110
116
|
}, {
|
|
111
117
|
default: Vue.withCtx(() => [
|
|
112
|
-
Vue.createVNode(Vue.unref(index$
|
|
118
|
+
Vue.createVNode(Vue.unref(index$4.default)),
|
|
113
119
|
Vue.createVNode(_component_el_container, { class: "inner-container" }, {
|
|
114
120
|
default: Vue.withCtx(() => [
|
|
115
|
-
Vue.createVNode(Vue.unref(index$
|
|
121
|
+
Vue.createVNode(Vue.unref(index$5.default), { onOnFormDragMove: onFormDragMove }),
|
|
116
122
|
Vue.createVNode(_component_el_main, { class: "root-main" }, {
|
|
117
123
|
default: Vue.withCtx(() => [
|
|
118
124
|
Vue.createVNode(_component_el_config_provider, { locale: Vue.unref(zhCn.default) }, {
|
|
@@ -127,7 +133,7 @@ const _sfc_main = {
|
|
|
127
133
|
]),
|
|
128
134
|
_: 1
|
|
129
135
|
}),
|
|
130
|
-
Vue.createVNode(Vue.unref(index$
|
|
136
|
+
Vue.createVNode(Vue.unref(index$6.default))
|
|
131
137
|
]),
|
|
132
138
|
_: 1
|
|
133
139
|
})
|
|
@@ -146,5 +152,5 @@ const _sfc_main = {
|
|
|
146
152
|
};
|
|
147
153
|
}
|
|
148
154
|
};
|
|
149
|
-
const layout = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
155
|
+
const layout = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-10018284"]]);
|
|
150
156
|
exports.default = layout;
|
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-10018284] {
|
|
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-10018284] {
|
|
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-10018284] .el-collapse {
|
|
5361
5361
|
border-bottom: none;
|
|
5362
5362
|
}
|
|
5363
|
-
.inner-container[data-v-
|
|
5363
|
+
.inner-container[data-v-10018284] .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-10018284] .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-10018284] .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-10018284] .el-collapse .el-collapse-item__wrap {
|
|
5380
5380
|
border: none;
|
|
5381
5381
|
}
|
|
5382
|
-
.root-main[data-v-
|
|
5382
|
+
.root-main[data-v-10018284] {
|
|
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-10018284] {
|
|
5388
5388
|
flex-direction: column;
|
|
5389
5389
|
height: 100%;
|
|
5390
5390
|
}/* 弹层样式 */
|