@fecp/designer 5.6.16 → 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.
@@ -1,4 +1,4 @@
1
- const version = "5.6.16";
1
+ const version = "5.6.18";
2
2
  const packageJson = {
3
3
  version
4
4
  };
@@ -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, onMounted, createBlock, openBlock, unref, withCtx, createElementBlock, createCommentVNode, createVNode, resolveDynamicComponent } from "vue";
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 { setSelectedItem, setHoverItem, setEditConfigData } from "../packages/utils/common.mjs";
17
+ import store from "../store/index.mjs";
18
+ import { setEditConfigData, setSelectedItem, setHoverItem } from "../packages/utils/common.mjs";
18
19
  import api from "../api/index.mjs";
19
20
  import { defaultTableConfig } from "../packages/table/default.mjs";
20
21
  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,48 +31,45 @@ const _hoisted_1 = {
31
31
  const _sfc_main = {
32
32
  __name: "index",
33
33
  setup(__props) {
34
- const store = useStore();
35
34
  const currentInstance = getCurrentInstance();
36
35
  const ctx = currentInstance.proxy;
37
36
  const pkId = getUrlParam("pkId");
38
37
  const isInitd = ref(0);
39
38
  const compRef = ref(null);
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
- }
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
+ });
76
73
  }
77
74
  const editingArea = computed(() => {
78
75
  switch (store.getters.editingType) {
@@ -98,9 +95,6 @@ const _sfc_main = {
98
95
  if (values.length === 0) return null;
99
96
  return values.length === 1 ? values[0] : values;
100
97
  }
101
- onMounted(() => {
102
- init();
103
- });
104
98
  return (_ctx, _cache) => {
105
99
  const _component_el_config_provider = ElConfigProvider;
106
100
  const _component_el_main = ElMain;
@@ -150,7 +144,7 @@ const _sfc_main = {
150
144
  };
151
145
  }
152
146
  };
153
- const layout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-10018284"]]);
147
+ const layout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ae1b4337"]]);
154
148
  export {
155
149
  layout as default
156
150
  };
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-10018284] {
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-10018284] {
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-10018284] .el-collapse {
5360
+ .inner-container[data-v-ae1b4337] .el-collapse {
5361
5361
  border-bottom: none;
5362
5362
  }
5363
- .inner-container[data-v-10018284] .el-collapse .el-collapse-item__header {
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-10018284] .el-collapse .el-collapse-item__header .el-collapse-item__arrow {
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-10018284] .el-collapse .el-collapse-item__header .el-collapse-item__title {
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-10018284] .el-collapse .el-collapse-item__wrap {
5379
+ .inner-container[data-v-ae1b4337] .el-collapse .el-collapse-item__wrap {
5380
5380
  border: none;
5381
5381
  }
5382
- .root-main[data-v-10018284] {
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-10018284] {
5387
+ .fec-designer-container[data-v-ae1b4337] {
5388
5388
  flex-direction: column;
5389
5389
  height: 100%;
5390
5390
  }/* 弹层样式 */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const version = "5.6.16";
3
+ const version = "5.6.18";
4
4
  const packageJson = {
5
5
  version
6
6
  };
@@ -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$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 */
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");
19
20
  const common = require("../packages/utils/common.js");
20
- const index$8 = require("../api/index.js");
21
+ const index = require("../api/index.js");
21
22
  const _default = require("../packages/table/default.js");
22
23
  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$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");
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");
29
29
  const _hoisted_1 = {
30
30
  key: 1,
31
31
  class: "init-error-container"
@@ -33,55 +33,52 @@ const _hoisted_1 = {
33
33
  const _sfc_main = {
34
34
  __name: "index",
35
35
  setup(__props) {
36
- const store = vuex_esmBundler.useStore();
37
36
  const currentInstance = Vue.getCurrentInstance();
38
37
  const ctx = currentInstance.proxy;
39
38
  const pkId = getUrlParam("pkId");
40
39
  const isInitd = Vue.ref(0);
41
40
  const compRef = Vue.ref(null);
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
- }
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
+ });
78
75
  }
79
76
  const editingArea = Vue.computed(() => {
80
- switch (store.getters.editingType) {
77
+ switch (index$1.default.getters.editingType) {
81
78
  case "table":
82
- return index$1.default;
79
+ return index$3.default;
83
80
  case "form":
84
- return index.default;
81
+ return index$2.default;
85
82
  }
86
83
  return null;
87
84
  });
@@ -100,14 +97,11 @@ const _sfc_main = {
100
97
  if (values.length === 0) return null;
101
98
  return values.length === 1 ? values[0] : values;
102
99
  }
103
- Vue.onMounted(() => {
104
- init();
105
- });
106
100
  return (_ctx, _cache) => {
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;
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;
111
105
  return Vue.openBlock(), Vue.createBlock(_component_el_config_provider, { locale: Vue.unref(zhCn.default) }, {
112
106
  default: Vue.withCtx(() => [
113
107
  isInitd.value == 1 ? (Vue.openBlock(), Vue.createBlock(_component_el_container, {
@@ -115,10 +109,10 @@ const _sfc_main = {
115
109
  class: "fec-designer-container"
116
110
  }, {
117
111
  default: Vue.withCtx(() => [
118
- Vue.createVNode(Vue.unref(index$4.default)),
112
+ Vue.createVNode(Vue.unref(index$6.default)),
119
113
  Vue.createVNode(_component_el_container, { class: "inner-container" }, {
120
114
  default: Vue.withCtx(() => [
121
- Vue.createVNode(Vue.unref(index$5.default), { onOnFormDragMove: onFormDragMove }),
115
+ Vue.createVNode(Vue.unref(index$7.default), { onOnFormDragMove: onFormDragMove }),
122
116
  Vue.createVNode(_component_el_main, { class: "root-main" }, {
123
117
  default: Vue.withCtx(() => [
124
118
  Vue.createVNode(_component_el_config_provider, { locale: Vue.unref(zhCn.default) }, {
@@ -133,7 +127,7 @@ const _sfc_main = {
133
127
  ]),
134
128
  _: 1
135
129
  }),
136
- Vue.createVNode(Vue.unref(index$6.default))
130
+ Vue.createVNode(Vue.unref(index$8.default))
137
131
  ]),
138
132
  _: 1
139
133
  })
@@ -152,5 +146,5 @@ const _sfc_main = {
152
146
  };
153
147
  }
154
148
  };
155
- const layout = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-10018284"]]);
149
+ const layout = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-ae1b4337"]]);
156
150
  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-10018284] {
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-10018284] {
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-10018284] .el-collapse {
5360
+ .inner-container[data-v-ae1b4337] .el-collapse {
5361
5361
  border-bottom: none;
5362
5362
  }
5363
- .inner-container[data-v-10018284] .el-collapse .el-collapse-item__header {
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-10018284] .el-collapse .el-collapse-item__header .el-collapse-item__arrow {
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-10018284] .el-collapse .el-collapse-item__header .el-collapse-item__title {
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-10018284] .el-collapse .el-collapse-item__wrap {
5379
+ .inner-container[data-v-ae1b4337] .el-collapse .el-collapse-item__wrap {
5380
5380
  border: none;
5381
5381
  }
5382
- .root-main[data-v-10018284] {
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-10018284] {
5387
+ .fec-designer-container[data-v-ae1b4337] {
5388
5388
  flex-direction: column;
5389
5389
  height: 100%;
5390
5390
  }/* 弹层样式 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fecp/designer",
3
- "version": "5.6.16",
3
+ "version": "5.6.18",
4
4
  "main": "lib/designer/index.js",
5
5
  "module": "es/designer/index.mjs",
6
6
  "files": [