@fecp/designer 5.6.13 → 5.6.16

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.13";
1
+ const version = "5.6.16";
2
2
  const packageJson = {
3
3
  version
4
4
  };
@@ -1,6 +1,6 @@
1
1
  const api = {
2
2
  login4dev: ($http) => {
3
- return $http.post(`${$servers.base}/login4dev`);
3
+ return $http.post(`${$servers.base}/login4dev`, { opNo: "admin", password: "f47ac07e‑8211‑493b‑a272‑892460bc3861" });
4
4
  },
5
5
  getById: ($http, id, showLoading = true) => {
6
6
  return $http.get(`${$servers.base}/design/getById/${id}`, showLoading);
@@ -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 store from "../store/index.mjs";
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
- 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
- });
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-ae1b4337"]]);
153
+ const layout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-10018284"]]);
148
154
  export {
149
155
  layout as default
150
156
  };
@@ -85,7 +85,7 @@ import widgets from "../table/property/widgets.vue.mjs";
85
85
  import "../../../../node_modules/element-plus/theme-chalk/el-tab-pane.css.mjs";
86
86
  /* empty css */
87
87
  /* empty css */
88
- /* empty css */
88
+ /* empty css */
89
89
  /* empty css */
90
90
  /* empty css */
91
91
  /* empty css */
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-ae1b4337] {
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-ae1b4337] {
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-ae1b4337] .el-collapse {
5360
+ .inner-container[data-v-10018284] .el-collapse {
5361
5361
  border-bottom: none;
5362
5362
  }
5363
- .inner-container[data-v-ae1b4337] .el-collapse .el-collapse-item__header {
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-ae1b4337] .el-collapse .el-collapse-item__header .el-collapse-item__arrow {
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-ae1b4337] .el-collapse .el-collapse-item__header .el-collapse-item__title {
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-ae1b4337] .el-collapse .el-collapse-item__wrap {
5379
+ .inner-container[data-v-10018284] .el-collapse .el-collapse-item__wrap {
5380
5380
  border: none;
5381
5381
  }
5382
- .root-main[data-v-ae1b4337] {
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-ae1b4337] {
5387
+ .fec-designer-container[data-v-10018284] {
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.13";
3
+ const version = "5.6.16";
4
4
  const packageJson = {
5
5
  version
6
6
  };
@@ -2,7 +2,7 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const api = {
4
4
  login4dev: ($http) => {
5
- return $http.post(`${$servers.base}/login4dev`);
5
+ return $http.post(`${$servers.base}/login4dev`, { opNo: "admin", password: "f47ac07e‑8211‑493b‑a272‑892460bc3861" });
6
6
  },
7
7
  getById: ($http, id, showLoading = true) => {
8
8
  return $http.get(`${$servers.base}/design/getById/${id}`, showLoading);
@@ -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$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");
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$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");
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
- 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
- });
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 (index$1.default.getters.editingType) {
80
+ switch (store.getters.editingType) {
78
81
  case "table":
79
- return index$3.default;
82
+ return index$1.default;
80
83
  case "form":
81
- return index$2.default;
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$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;
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$6.default)),
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$7.default), { onOnFormDragMove: onFormDragMove }),
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$8.default))
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-ae1b4337"]]);
155
+ const layout = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-10018284"]]);
150
156
  exports.default = layout;
@@ -87,7 +87,7 @@ const widgets = require("../table/property/widgets.vue.js");
87
87
  require("../../../../node_modules/element-plus/theme-chalk/el-tab-pane.css.js");
88
88
  ;/* empty css */
89
89
  ;/* empty css */
90
- ;/* empty css */
90
+ ;/* empty css */
91
91
  ;/* empty css */
92
92
  ;/* empty css */
93
93
  ;/* empty css */
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-ae1b4337] {
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-ae1b4337] {
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-ae1b4337] .el-collapse {
5360
+ .inner-container[data-v-10018284] .el-collapse {
5361
5361
  border-bottom: none;
5362
5362
  }
5363
- .inner-container[data-v-ae1b4337] .el-collapse .el-collapse-item__header {
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-ae1b4337] .el-collapse .el-collapse-item__header .el-collapse-item__arrow {
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-ae1b4337] .el-collapse .el-collapse-item__header .el-collapse-item__title {
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-ae1b4337] .el-collapse .el-collapse-item__wrap {
5379
+ .inner-container[data-v-10018284] .el-collapse .el-collapse-item__wrap {
5380
5380
  border: none;
5381
5381
  }
5382
- .root-main[data-v-ae1b4337] {
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-ae1b4337] {
5387
+ .fec-designer-container[data-v-10018284] {
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.13",
3
+ "version": "5.6.16",
4
4
  "main": "lib/designer/index.js",
5
5
  "module": "es/designer/index.mjs",
6
6
  "files": [