fec-dev-designer 5.1.2 → 5.1.3

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.
@@ -9,51 +9,59 @@ import "../../../node_modules/element-plus/theme-chalk/el-scrollbar.css.js";
9
9
  import "../../../node_modules/element-plus/theme-chalk/el-table-column.css.js";
10
10
  import "../../../node_modules/element-plus/theme-chalk/el-tag.css.js";
11
11
  import "../../../node_modules/element-plus/theme-chalk/el-button.css.js";
12
- import { useModel as T, computed as F, ref as p, watch as R, openBlock as k, createBlock as M, withCtx as r, createVNode as i, createTextVNode as c, createElementVNode as f, unref as v } from "vue";
13
- import { RefreshRight as I, Delete as b } from "../../../node_modules/@element-plus/icons-vue/dist/index.js";
14
- import { getEditConfigData as N, cloneDeep as g } from "../utils/common.js";
12
+ import { useModel as F, computed as R, ref as f, watch as k, openBlock as I, createBlock as M, withCtx as r, createVNode as n, createTextVNode as c, createElementVNode as v, unref as g } from "vue";
13
+ import { RefreshRight as N, Delete as b } from "../../../node_modules/@element-plus/icons-vue/dist/index.js";
14
+ import { getEditConfigData as Y, getEditingType as x, cloneDeep as m } from "../../packages/utils/common.js";
15
15
  import "../../../node_modules/element-plus/theme-chalk/el-badge.css.js";
16
16
  import "../../../node_modules/element-plus/theme-chalk/el-message.css.js";
17
17
  import "../../../node_modules/element-plus/theme-chalk/el-message-box.css.js";
18
18
  import "../../../node_modules/element-plus/theme-chalk/el-input.css.js";
19
19
  import "./fieldRecycleBin.vue2.js";
20
- import Y from "../../../_virtual/_plugin-vue_export-helper.js";
20
+ import $ from "../../../_virtual/_plugin-vue_export-helper.js";
21
21
  import { ElMessage as h } from "../../../node_modules/element-plus/es/components/message/index.js";
22
22
  import { ElMessageBox as y } from "../../../node_modules/element-plus/es/components/message-box/index.js";
23
- import { ElButton as $ } from "../../../node_modules/element-plus/es/components/button/index.js";
24
- import { ElTableColumn as S, ElTable as q } from "../../../node_modules/element-plus/es/components/table/index.js";
25
- import { ElDialog as P } from "../../../node_modules/element-plus/es/components/dialog/index.js";
26
- const U = { class: "action-bar" }, j = { class: "left-buttons" }, z = { class: "field-list-container" }, A = {
23
+ import { ElButton as S } from "../../../node_modules/element-plus/es/components/button/index.js";
24
+ import { ElTableColumn as q, ElTable as P } from "../../../node_modules/element-plus/es/components/table/index.js";
25
+ import { ElDialog as U } from "../../../node_modules/element-plus/es/components/dialog/index.js";
26
+ const j = { class: "action-bar" }, z = { class: "left-buttons" }, A = { class: "field-list-container" }, G = {
27
27
  __name: "fieldRecycleBin",
28
28
  props: {
29
29
  modelValue: { required: !0 },
30
30
  modelModifiers: {}
31
31
  },
32
32
  emits: ["update:modelValue"],
33
- setup(x) {
34
- const s = T(x, "modelValue"), n = F(() => N()), l = p([]), o = p([]), w = p(null);
35
- R(s, (d) => {
36
- d && B();
33
+ setup(w) {
34
+ const s = F(w, "modelValue"), d = R(() => Y()), a = f([]), o = f([]), D = f(null);
35
+ k(s, (i) => {
36
+ i && E();
37
37
  });
38
- const B = () => {
39
- l.value = n.value.deletedFields || [];
40
- }, C = (d) => {
41
- o.value = d;
42
- }, D = () => {
43
- if (o.value.length === 0)
44
- return;
45
- n.value.fieldsData || (n.value.fieldsData = []);
46
- let e = n.value.fieldsData.reduce(
47
- (a, t) => Math.max(a, t.y + t.h),
48
- 0
49
- );
50
- o.value.forEach((a) => {
51
- const t = g(a.data);
52
- t.y = e, e += t.h, n.value.fieldsData.push(t);
53
- const u = l.value.findIndex((m) => m === a);
54
- u !== -1 && l.value.splice(u, 1);
55
- }), n.value.deletedFields = g(l.value), h.success(`已恢复 ${o.value.length} 个字段`), o.value = [];
56
- }, E = async () => {
38
+ const E = () => {
39
+ a.value = d.value.deletedFields || [];
40
+ }, B = (i) => {
41
+ o.value = i;
42
+ }, C = () => {
43
+ if (o.value.length !== 0) {
44
+ if (d.value.fieldsData || (d.value.fieldsData = []), x() == "form") {
45
+ let e = d.value.fieldsData.reduce(
46
+ (t, l) => Math.max(t, l.y + l.h),
47
+ 0
48
+ );
49
+ o.value.forEach((t) => {
50
+ const l = m(t.data);
51
+ l.y = e, e += l.h, d.value.fieldsData.push(l);
52
+ const u = a.value.findIndex((p) => p === t);
53
+ u !== -1 && a.value.splice(u, 1);
54
+ });
55
+ } else
56
+ x() == "table" && o.value.forEach((i) => {
57
+ const e = m(i.data);
58
+ d.value.fieldsData.push(e);
59
+ const t = a.value.findIndex((l) => l === i);
60
+ t !== -1 && a.value.splice(t, 1);
61
+ });
62
+ d.value.deletedFields = m(a.value), h.success(`已恢复 ${o.value.length} 个字段`), o.value = [];
63
+ }
64
+ }, T = async () => {
57
65
  if (o.value.length !== 0)
58
66
  try {
59
67
  await y.confirm(
@@ -64,14 +72,14 @@ const U = { class: "action-bar" }, j = { class: "left-buttons" }, z = { class: "
64
72
  cancelButtonText: "取消",
65
73
  type: "warning"
66
74
  }
67
- ), o.value.forEach((d) => {
68
- const e = l.value.findIndex((a) => a === d);
69
- e !== -1 && l.value.splice(e, 1);
70
- }), n.value.deletedFields = g(l.value), o.value = [], h.success("字段已彻底删除");
75
+ ), o.value.forEach((i) => {
76
+ const e = a.value.findIndex((t) => t === i);
77
+ e !== -1 && a.value.splice(e, 1);
78
+ }), d.value.deletedFields = m(a.value), o.value = [], h.success("字段已彻底删除");
71
79
  } catch {
72
80
  }
73
81
  }, V = async () => {
74
- if (l.value.length !== 0)
82
+ if (a.value.length !== 0)
75
83
  try {
76
84
  await y.confirm(
77
85
  "确定要清空回收站吗?此操作将永久删除所有字段,不可恢复。",
@@ -81,13 +89,13 @@ const U = { class: "action-bar" }, j = { class: "left-buttons" }, z = { class: "
81
89
  cancelButtonText: "取消",
82
90
  type: "warning"
83
91
  }
84
- ), l.value = [], n.value.deletedFields = [], h.success("回收站已清空");
92
+ ), a.value = [], d.value.deletedFields = [], h.success("回收站已清空");
85
93
  } catch {
86
94
  }
87
95
  };
88
- return (d, e) => {
89
- const a = $, t = S, u = q, m = P;
90
- return k(), M(m, {
96
+ return (i, e) => {
97
+ const t = S, l = q, u = P, p = U;
98
+ return I(), M(p, {
91
99
  modelValue: s.value,
92
100
  "onUpdate:modelValue": e[1] || (e[1] = (_) => s.value = _),
93
101
  title: "字段回收站",
@@ -98,7 +106,7 @@ const U = { class: "action-bar" }, j = { class: "left-buttons" }, z = { class: "
98
106
  class: "fec-dev-designer-dialog"
99
107
  }, {
100
108
  footer: r(() => [
101
- i(a, {
109
+ n(t, {
102
110
  onClick: e[0] || (e[0] = (_) => s.value = !1)
103
111
  }, {
104
112
  default: r(() => [...e[5] || (e[5] = [
@@ -108,24 +116,24 @@ const U = { class: "action-bar" }, j = { class: "left-buttons" }, z = { class: "
108
116
  })
109
117
  ]),
110
118
  default: r(() => [
111
- f("div", U, [
112
- f("div", j, [
113
- i(a, {
119
+ v("div", j, [
120
+ v("div", z, [
121
+ n(t, {
114
122
  type: "primary",
115
- icon: v(I),
123
+ icon: g(N),
116
124
  disabled: o.value.length === 0,
117
- onClick: D
125
+ onClick: C
118
126
  }, {
119
127
  default: r(() => [...e[2] || (e[2] = [
120
128
  c(" 恢复 ", -1)
121
129
  ])]),
122
130
  _: 1
123
131
  }, 8, ["icon", "disabled"]),
124
- i(a, {
132
+ n(t, {
125
133
  type: "danger",
126
- icon: v(b),
134
+ icon: g(b),
127
135
  disabled: o.value.length === 0,
128
- onClick: E
136
+ onClick: T
129
137
  }, {
130
138
  default: r(() => [...e[3] || (e[3] = [
131
139
  c(" 彻底删除 ", -1)
@@ -133,11 +141,11 @@ const U = { class: "action-bar" }, j = { class: "left-buttons" }, z = { class: "
133
141
  _: 1
134
142
  }, 8, ["icon", "disabled"])
135
143
  ]),
136
- i(a, {
144
+ n(t, {
137
145
  type: "danger",
138
- icon: v(b),
146
+ icon: g(b),
139
147
  plain: "",
140
- disabled: l.value.length === 0,
148
+ disabled: a.value.length === 0,
141
149
  onClick: V
142
150
  }, {
143
151
  default: r(() => [...e[4] || (e[4] = [
@@ -146,35 +154,35 @@ const U = { class: "action-bar" }, j = { class: "left-buttons" }, z = { class: "
146
154
  _: 1
147
155
  }, 8, ["icon", "disabled"])
148
156
  ]),
149
- f("div", z, [
150
- i(u, {
157
+ v("div", A, [
158
+ n(u, {
151
159
  ref_key: "tableRef",
152
- ref: w,
153
- data: l.value,
154
- onSelectionChange: C,
160
+ ref: D,
161
+ data: a.value,
162
+ onSelectionChange: B,
155
163
  height: "400"
156
164
  }, {
157
165
  default: r(() => [
158
- i(t, {
166
+ n(l, {
159
167
  type: "selection",
160
168
  width: "55"
161
169
  }),
162
- i(t, {
170
+ n(l, {
163
171
  prop: "label",
164
172
  label: "字段标签",
165
173
  "min-width": "120"
166
174
  }),
167
- i(t, {
175
+ n(l, {
168
176
  prop: "fieldName",
169
177
  label: "字段名称",
170
178
  "min-width": "120"
171
179
  }),
172
- i(t, {
180
+ n(l, {
173
181
  prop: "fieldType",
174
182
  label: "字段类型",
175
183
  width: "100"
176
184
  }),
177
- i(t, {
185
+ n(l, {
178
186
  prop: "deleteTime",
179
187
  label: "删除时间",
180
188
  width: "180"
@@ -188,7 +196,7 @@ const U = { class: "action-bar" }, j = { class: "left-buttons" }, z = { class: "
188
196
  }, 8, ["modelValue"]);
189
197
  };
190
198
  }
191
- }, ve = /* @__PURE__ */ Y(A, [["__scopeId", "data-v-0c7da658"]]);
199
+ }, ge = /* @__PURE__ */ $(G, [["__scopeId", "data-v-d770fcac"]]);
192
200
  export {
193
- ve as default
201
+ ge as default
194
202
  };
@@ -3,17 +3,17 @@ import "../../../node_modules/element-plus/theme-chalk/el-aside.css.js";
3
3
  import "../../../node_modules/element-plus/theme-chalk/el-badge.css.js";
4
4
  import "../../../node_modules/element-plus/theme-chalk/el-collapse.css.js";
5
5
  import "../../../node_modules/element-plus/theme-chalk/el-collapse-item.css.js";
6
- import { computed as u, ref as g, openBlock as s, createBlock as c, withCtx as a, createElementVNode as l, createVNode as n, createElementBlock as r, Fragment as E, renderList as k, unref as d, toDisplayString as b, createCommentVNode as p } from "vue";
6
+ import { computed as m, ref as v, openBlock as s, createBlock as u, withCtx as a, createElementVNode as l, createVNode as n, createElementBlock as c, Fragment as D, renderList as E, unref as r, toDisplayString as g, createCommentVNode as b } from "vue";
7
7
  import x from "../../packages/utils/eventBus.js";
8
8
  import { VueDraggable as $ } from "../../../node_modules/vue-draggable-plus/dist/vue-draggable-plus.js";
9
9
  import { Calendar as j, DeleteFilled as q, Hide as z } from "../../../node_modules/@element-plus/icons-vue/dist/index.js";
10
10
  import { getEditConfigData as C, setSelectedItem as G } from "../../packages/utils/common.js";
11
11
  import J from "../../packages/table/aside/index.js";
12
12
  import K from "../../packages/form/aside/index.js";
13
- import O from "../../packages/form/fieldRecycleBin.vue.js";
14
- import P from "../../packages/form/HiddenFieldDialog.vue.js";
13
+ import O from "./fieldRecycleBin.vue.js";
14
+ import P from "./HiddenFieldDialog.vue.js";
15
15
  import { throttle as Q } from "../../../node_modules/@vexip-ui/utils/dist/index.js";
16
- import m from "../../store/index.js";
16
+ import d from "../../store/index.js";
17
17
  import "./index.vue2.js";
18
18
  import W from "../../../_virtual/_plugin-vue_export-helper.js";
19
19
  import { ElIcon as X } from "../../../node_modules/element-plus/es/components/icon/index.js";
@@ -23,26 +23,23 @@ import { ElAside as te } from "../../../node_modules/element-plus/es/components/
23
23
  const oe = { class: "dev-designer-aside" }, le = { class: "components-item" }, ne = { class: "menu-components-item" }, se = { class: "components-item-label" }, ae = {
24
24
  key: 0,
25
25
  class: "table-item"
26
- }, ie = { class: "widgets" }, re = { class: "field-label" }, de = {
27
- key: 0,
28
- class: "aside-footer"
29
- }, me = {
26
+ }, ie = { class: "widgets" }, re = { class: "field-label" }, de = { class: "aside-footer" }, me = {
30
27
  __name: "index",
31
28
  emits: ["onFormDragMove"],
32
- setup(ue, { emit: B }) {
33
- const T = B, w = u(() => {
34
- switch (m.getters.editingType) {
29
+ setup(ue, { emit: k }) {
30
+ const B = k, T = m(() => {
31
+ switch (d.getters.editingType) {
35
32
  case "table":
36
33
  return J;
37
34
  case "form":
38
35
  return K;
39
36
  }
40
37
  return null;
41
- }), V = u(() => m.getters.editingType), y = g(["basic", "advanced"]), f = g(!1), _ = g(!1), F = u(() => {
38
+ }), w = m(() => d.getters.editingType), V = v(["basic", "advanced"]), p = v(!1), f = v(!1), y = m(() => {
42
39
  var e;
43
40
  const t = C();
44
41
  return ((e = t == null ? void 0 : t.deletedFields) == null ? void 0 : e.length) || 0;
45
- }), h = u(() => {
42
+ }), F = m(() => {
46
43
  var e;
47
44
  const t = C();
48
45
  return ((e = t == null ? void 0 : t.hiddenFields) == null ? void 0 : e.length) || 0;
@@ -55,34 +52,34 @@ const oe = { class: "dev-designer-aside" }, le = { class: "components-item" }, n
55
52
  };
56
53
  }
57
54
  function N(t) {
58
- G(t.clonedData), m.getters.editingType == "form" && x.emit("onFormDragEnd", t);
55
+ G(t.clonedData), d.getters.editingType == "form" && x.emit("onFormDragEnd", t);
59
56
  }
60
- const S = Q((t) => (m.getters.editingType == "form" && T("onFormDragMove", t), !0), 50);
57
+ const S = Q((t) => (d.getters.editingType == "form" && B("onFormDragMove", t), !0), 50);
61
58
  function U(t) {
62
- m.getters.editingType == "form" && x.emit("onFormDragStart", t);
59
+ d.getters.editingType == "form" && x.emit("onFormDragStart", t);
63
60
  }
64
61
  function I() {
65
- f.value = !0;
62
+ p.value = !0;
66
63
  }
67
64
  function A() {
68
- _.value = !0;
65
+ f.value = !0;
69
66
  }
70
67
  return (t, e) => {
71
- const v = X, H = Y, L = Z, D = ee, R = te;
72
- return s(), c(R, { class: "root-aside" }, {
68
+ const _ = X, H = Y, L = Z, h = ee, R = te;
69
+ return s(), u(R, { class: "root-aside" }, {
73
70
  default: a(() => [
74
71
  l("div", oe, [
75
72
  n(L, {
76
- modelValue: y.value,
77
- "onUpdate:modelValue": e[0] || (e[0] = (o) => y.value = o)
73
+ modelValue: V.value,
74
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => V.value = o)
78
75
  }, {
79
76
  default: a(() => [
80
- (s(!0), r(E, null, k(w.value, (o) => (s(), c(H, {
77
+ (s(!0), c(D, null, E(T.value, (o) => (s(), u(H, {
81
78
  title: o.title,
82
79
  name: o.name
83
80
  }, {
84
81
  default: a(() => [
85
- n(d($), {
82
+ n(r($), {
86
83
  modelValue: o.children,
87
84
  "onUpdate:modelValue": (i) => o.children = i,
88
85
  animation: 150,
@@ -90,26 +87,26 @@ const oe = { class: "dev-designer-aside" }, le = { class: "components-item" }, n
90
87
  group: { name: "dev", pull: "clone", put: !1 },
91
88
  clone: M,
92
89
  onEnd: N,
93
- onMove: d(S),
90
+ onMove: r(S),
94
91
  onStart: U,
95
92
  sort: !1,
96
93
  class: "components-list"
97
94
  }, {
98
95
  default: a(() => [
99
- (s(!0), r(E, null, k(o.children, (i) => (s(), r("div", le, [
96
+ (s(!0), c(D, null, E(o.children, (i) => (s(), c("div", le, [
100
97
  l("div", ne, [
101
- n(v, { class: "components-item-icon" }, {
98
+ n(_, { class: "components-item-icon" }, {
102
99
  default: a(() => [
103
- n(d(j))
100
+ n(r(j))
104
101
  ]),
105
102
  _: 1
106
103
  }),
107
- l("span", se, b(i.label), 1)
104
+ l("span", se, g(i.label), 1)
108
105
  ]),
109
- V.value == "table" ? (s(), r("div", ae, [
110
- l("div", ie, b(i.label), 1),
111
- l("div", re, b(i.fieldName), 1)
112
- ])) : p("", !0)
106
+ w.value == "table" ? (s(), c("div", ae, [
107
+ l("div", ie, g(i.label), 1),
108
+ l("div", re, g(i.fieldName), 1)
109
+ ])) : b("", !0)
113
110
  ]))), 256))
114
111
  ]),
115
112
  _: 2
@@ -121,59 +118,59 @@ const oe = { class: "dev-designer-aside" }, le = { class: "components-item" }, n
121
118
  _: 1
122
119
  }, 8, ["modelValue"])
123
120
  ]),
124
- V.value == "form" ? (s(), r("div", de, [
121
+ l("div", de, [
125
122
  l("div", {
126
123
  class: "footer-btn recycle-btn",
127
124
  onClick: I
128
125
  }, [
129
- n(v, { class: "btn-icon" }, {
126
+ n(_, { class: "btn-icon" }, {
130
127
  default: a(() => [
131
- n(d(q))
128
+ n(r(q))
132
129
  ]),
133
130
  _: 1
134
131
  }),
135
132
  e[3] || (e[3] = l("span", { class: "btn-text" }, "字段回收站", -1)),
136
- F.value > 0 ? (s(), c(D, {
133
+ y.value > 0 ? (s(), u(h, {
137
134
  key: 0,
138
- value: F.value,
135
+ value: y.value,
139
136
  max: 99,
140
137
  class: "btn-badge"
141
- }, null, 8, ["value"])) : p("", !0)
138
+ }, null, 8, ["value"])) : b("", !0)
142
139
  ]),
143
140
  e[5] || (e[5] = l("div", { class: "footer-divider" }, null, -1)),
144
141
  l("div", {
145
142
  class: "footer-btn hidden-field-btn",
146
143
  onClick: A
147
144
  }, [
148
- n(v, { class: "btn-icon" }, {
145
+ n(_, { class: "btn-icon" }, {
149
146
  default: a(() => [
150
- n(d(z))
147
+ n(r(z))
151
148
  ]),
152
149
  _: 1
153
150
  }),
154
151
  e[4] || (e[4] = l("span", { class: "btn-text" }, "隐藏域", -1)),
155
- h.value > 0 ? (s(), c(D, {
152
+ F.value > 0 ? (s(), u(h, {
156
153
  key: 0,
157
- value: h.value,
154
+ value: F.value,
158
155
  max: 99,
159
156
  class: "btn-badge"
160
- }, null, 8, ["value"])) : p("", !0)
157
+ }, null, 8, ["value"])) : b("", !0)
161
158
  ])
162
- ])) : p("", !0),
159
+ ]),
163
160
  n(O, {
164
- modelValue: f.value,
165
- "onUpdate:modelValue": e[1] || (e[1] = (o) => f.value = o)
161
+ modelValue: p.value,
162
+ "onUpdate:modelValue": e[1] || (e[1] = (o) => p.value = o)
166
163
  }, null, 8, ["modelValue"]),
167
164
  n(P, {
168
- modelValue: _.value,
169
- "onUpdate:modelValue": e[2] || (e[2] = (o) => _.value = o)
165
+ modelValue: f.value,
166
+ "onUpdate:modelValue": e[2] || (e[2] = (o) => f.value = o)
170
167
  }, null, 8, ["modelValue"])
171
168
  ]),
172
169
  _: 1
173
170
  });
174
171
  };
175
172
  }
176
- }, Ue = /* @__PURE__ */ W(me, [["__scopeId", "data-v-8edf3b11"]]);
173
+ }, Ue = /* @__PURE__ */ W(me, [["__scopeId", "data-v-fa48b88f"]]);
177
174
  export {
178
175
  Ue as default
179
176
  };