fec-dev-designer 1.0.4 → 1.0.5

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.
Files changed (29) hide show
  1. package/es/config-dev.js +7 -5
  2. package/es/node_modules/@element-plus/icons-vue/dist/index.js +107 -92
  3. package/es/node_modules/element-plus/es/components/result/index.js +7 -0
  4. package/es/node_modules/element-plus/es/components/result/src/result.js +34 -0
  5. package/es/node_modules/element-plus/es/components/result/src/result2.js +93 -0
  6. package/es/node_modules/element-plus/theme-chalk/el-result.css.js +4 -0
  7. package/es/src/components/OptionConfig.vue.js +1 -1
  8. package/es/src/components/ValueSelector.vue2.js +30 -24
  9. package/es/src/components/ValueSelectorPopover.vue2.js +2 -1
  10. package/es/src/layout/aside/index.vue.js +64 -60
  11. package/es/src/layout/index.vue.js +91 -54
  12. package/es/src/packages/dataSource/dataSource.vue.js +122 -118
  13. package/es/src/packages/eventFlow/dialog/action/Page.vue.js +29 -20
  14. package/es/src/packages/form/aside/index.js +17 -3
  15. package/es/src/packages/form/components/ComponentPreviewWrapper.vue.js +46 -42
  16. package/es/src/packages/form/default.js +1 -0
  17. package/es/src/packages/form/formSetting.vue.js +72 -50
  18. package/es/src/packages/form/index.vue.js +247 -202
  19. package/es/src/packages/form/property/blank.vue.js +62 -0
  20. package/es/src/packages/form/property/index.vue.js +21 -20
  21. package/es/src/packages/form/property/subTable.vue.js +61 -52
  22. package/es/src/packages/form/property/widgets.vue.js +280 -173
  23. package/es/src/packages/table/aside/index.js +1 -0
  24. package/es/src/packages/table/property/widgets.vue.js +96 -85
  25. package/es/src/packages/table/queryModule/FixedModeConfig.vue.js +6 -6
  26. package/es/src/packages/table/tablePagination.vue.js +37 -45
  27. package/es/src/packages/table/tableSetting.vue.js +12 -13
  28. package/es/style.css +1 -1
  29. package/package.json +1 -1
@@ -1,9 +1,10 @@
1
- import { computed as n, openBlock as b, createBlock as V, resolveDynamicComponent as g, withCtx as A, createVNode as x } from "vue";
2
- import { ElInputTag as C, ElInput as N } from "element-plus";
3
- import I from "./ValueSelectorPopover.vue2.js";
1
+ import { computed as o, openBlock as V, createBlock as g, resolveDynamicComponent as A, withCtx as x, createVNode as C } from "vue";
2
+ import { ElInputTag as F, ElInput as N } from "element-plus";
3
+ import h from "./ValueSelectorPopover.vue2.js";
4
+ import { getEditConfigData as I } from "../packages/utils/common.js";
4
5
  import "./ValueSelector.vue.js";
5
6
  import B from "../../_virtual/_plugin-vue_export-helper.js";
6
- const F = {
7
+ const $ = {
7
8
  __name: "ValueSelector",
8
9
  props: {
9
10
  // modelValue 的格式:
@@ -38,7 +39,10 @@ const F = {
38
39
  },
39
40
  emits: ["update:modelValue"],
40
41
  setup(r, { emit: m }) {
41
- const a = r, o = m, p = n(() => a.multiple ? C : N), f = n(() => {
42
+ const a = r, i = m, p = o(() => a.multiple ? F : N), f = o(() => {
43
+ const e = I();
44
+ return (e == null ? void 0 : e.hiddenFields) || [];
45
+ }), c = o(() => {
42
46
  if (!a.modelValue)
43
47
  return "";
44
48
  if (!a.multiple && typeof a.modelValue == "object" && !Array.isArray(a.modelValue)) {
@@ -50,7 +54,7 @@ const F = {
50
54
  } else if (!a.multiple && typeof a.modelValue == "string")
51
55
  return a.modelValue;
52
56
  return "";
53
- }), s = n({
57
+ }), s = o({
54
58
  get() {
55
59
  return !a.multiple || !Array.isArray(a.modelValue) ? [] : a.modelValue.map((e) => {
56
60
  if (e.label)
@@ -62,28 +66,30 @@ const F = {
62
66
  set(e) {
63
67
  if (Array.isArray(a.modelValue)) {
64
68
  const l = a.modelValue.filter((t) => {
65
- const i = t.label || (() => {
69
+ const n = t.label || (() => {
66
70
  const u = a.availableFields.find(
67
71
  (y) => y.id === t.value
68
72
  );
69
73
  return (u == null ? void 0 : u.label) || (u == null ? void 0 : u.fieldName) || t.value;
70
74
  })();
71
- return e.includes(i);
75
+ return e.includes(n);
72
76
  });
73
- o("update:modelValue", l);
77
+ i("update:modelValue", l);
74
78
  }
75
79
  }
76
- }), d = n({
80
+ }), d = o({
77
81
  get() {
78
- return a.multiple ? s.value : f.value;
82
+ return a.multiple ? s.value : c.value;
79
83
  },
80
84
  set(e) {
81
- a.multiple && Array.isArray(e) ? s.value = e : !a.multiple && typeof e == "string" && o("update:modelValue", e);
85
+ a.multiple && Array.isArray(e) ? s.value = e : !a.multiple && typeof e == "string" && i("update:modelValue", e);
82
86
  }
83
- }), c = (e) => {
87
+ }), v = (e) => {
84
88
  let l = null;
85
89
  if (e.type === "field") {
86
- const t = a.availableFields.find((i) => i.id === e.value);
90
+ const t = [...a.availableFields, ...f.value].find(
91
+ (n) => n.id === e.value
92
+ );
87
93
  l = {
88
94
  label: `\${${(t == null ? void 0 : t.label) || (t == null ? void 0 : t.fieldName) || e.value}}`,
89
95
  type: "field",
@@ -91,7 +97,7 @@ const F = {
91
97
  };
92
98
  } else
93
99
  e.type === "userInfo" ? l = {
94
- label: `\${用户信息: ${v(e.value)}}`,
100
+ label: `\${用户信息: ${b(e.value)}}`,
95
101
  type: "userInfo",
96
102
  value: e.value
97
103
  } : e.type === "urlParam" && (l = {
@@ -102,10 +108,10 @@ const F = {
102
108
  if (l)
103
109
  if (a.multiple) {
104
110
  const t = Array.isArray(a.modelValue) ? a.modelValue : [];
105
- t.some((u) => u.value === l.value) || o("update:modelValue", [...t, l]);
111
+ t.some((u) => u.value === l.value) || i("update:modelValue", [...t, l]);
106
112
  } else
107
- o("update:modelValue", l);
108
- }, v = (e) => ({
113
+ i("update:modelValue", l);
114
+ }, b = (e) => ({
109
115
  userCode: "用户编号",
110
116
  userName: "用户名称",
111
117
  roleCode: "角色编号",
@@ -113,7 +119,7 @@ const F = {
113
119
  orgCode: "机构编号",
114
120
  orgName: "机构名称"
115
121
  })[e] || e;
116
- return (e, l) => (b(), V(g(p.value), {
122
+ return (e, l) => (V(), g(A(p.value), {
117
123
  modelValue: d.value,
118
124
  "onUpdate:modelValue": l[0] || (l[0] = (t) => d.value = t),
119
125
  placeholder: r.placeholder,
@@ -126,17 +132,17 @@ const F = {
126
132
  class: "value-selector-input",
127
133
  size: "small"
128
134
  }, {
129
- suffix: A(() => [
130
- x(I, {
135
+ suffix: x(() => [
136
+ C(h, {
131
137
  "available-fields": r.availableFields,
132
138
  disabled: r.disabled,
133
- onConfirm: c
139
+ onConfirm: v
134
140
  }, null, 8, ["available-fields", "disabled"])
135
141
  ]),
136
142
  _: 1
137
143
  }, 8, ["modelValue", "placeholder", "disabled", "readonly", "trigger"]));
138
144
  }
139
- }, j = /* @__PURE__ */ B(F, [["__scopeId", "data-v-e62accf1"]]);
145
+ }, D = /* @__PURE__ */ B($, [["__scopeId", "data-v-a452b81a"]]);
140
146
  export {
141
- j as default
147
+ D as default
142
148
  };
@@ -36,6 +36,7 @@ const Y = { class: "value-selector-tabs" }, Z = { class: "field-group-label" },
36
36
  const o = q();
37
37
  return (o == null ? void 0 : o.hiddenFields) || [];
38
38
  }), S = y(() => {
39
+ debugger;
39
40
  const o = (_.availableFields || []).filter(
40
41
  (n) => !n.isHidden
41
42
  ), e = $.value.map((n) => ({
@@ -257,7 +258,7 @@ const Y = { class: "value-selector-tabs" }, Z = { class: "field-group-label" },
257
258
  }, 8, ["visible"]);
258
259
  };
259
260
  }
260
- }, Ie = /* @__PURE__ */ G(te, [["__scopeId", "data-v-aa614827"]]);
261
+ }, Ie = /* @__PURE__ */ G(te, [["__scopeId", "data-v-e34dd724"]]);
261
262
  export {
262
263
  Ie as default
263
264
  };
@@ -3,44 +3,46 @@ 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 m, withCtx as a, createElementVNode as l, createVNode as n, createElementBlock as d, Fragment as D, renderList as k, unref as c, toDisplayString as b, createCommentVNode as p } from "vue";
7
- import { useStore as S } from "vuex";
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 d, Fragment as E, renderList as k, unref as m, toDisplayString as b, createCommentVNode as p } from "vue";
7
+ import { useStore as $ } from "vuex";
8
8
  import x from "../../packages/utils/eventBus.js";
9
- import { VueDraggable as L } from "../../../node_modules/vue-draggable-plus/dist/vue-draggable-plus.js";
10
- import { Calendar as R, DeleteFilled as $, Hide as j } from "../../../node_modules/@element-plus/icons-vue/dist/index.js";
11
- import { getEditConfigData as C, setSelectedItem as q } from "../../packages/utils/common.js";
12
- import z from "../../packages/table/aside/index.js";
13
- import G from "../../packages/form/aside/index.js";
14
- import J from "../../packages/form/fieldRecycleBin.vue.js";
15
- import K from "../../packages/form/HiddenFieldDialog.vue.js";
9
+ import { VueDraggable as j } from "../../../node_modules/vue-draggable-plus/dist/vue-draggable-plus.js";
10
+ import { Calendar as q, DeleteFilled as z, Hide as G } from "../../../node_modules/@element-plus/icons-vue/dist/index.js";
11
+ import { getEditConfigData as C, setSelectedItem as J } from "../../packages/utils/common.js";
12
+ import K from "../../packages/table/aside/index.js";
13
+ import O from "../../packages/form/aside/index.js";
14
+ import P from "../../packages/form/fieldRecycleBin.vue.js";
15
+ import Q from "../../packages/form/HiddenFieldDialog.vue.js";
16
+ import { throttle as W } from "../../../node_modules/@vexip-ui/utils/dist/index.js";
16
17
  import "./index.vue2.js";
17
- import O from "../../../_virtual/_plugin-vue_export-helper.js";
18
- import { ElIcon as P } from "../../../node_modules/element-plus/es/components/icon/index.js";
19
- import { ElCollapseItem as Q, ElCollapse as W } from "../../../node_modules/element-plus/es/components/collapse/index.js";
20
- import { ElBadge as X } from "../../../node_modules/element-plus/es/components/badge/index.js";
21
- import { ElAside as Y } from "../../../node_modules/element-plus/es/components/container/index.js";
22
- const Z = { class: "dev-designer-aside" }, ee = { class: "components-item" }, te = { class: "menu-components-item" }, oe = { class: "components-item-label" }, le = {
18
+ import X from "../../../_virtual/_plugin-vue_export-helper.js";
19
+ import { ElIcon as Y } from "../../../node_modules/element-plus/es/components/icon/index.js";
20
+ import { ElCollapseItem as Z, ElCollapse as ee } from "../../../node_modules/element-plus/es/components/collapse/index.js";
21
+ import { ElBadge as te } from "../../../node_modules/element-plus/es/components/badge/index.js";
22
+ import { ElAside as oe } from "../../../node_modules/element-plus/es/components/container/index.js";
23
+ const le = { class: "dev-designer-aside" }, ne = { class: "components-item" }, se = { class: "menu-components-item" }, ae = { class: "components-item-label" }, ie = {
23
24
  key: 0,
24
25
  class: "table-item"
25
- }, ne = { class: "widgets" }, se = { class: "field-label" }, ae = {
26
+ }, re = { class: "widgets" }, de = { class: "field-label" }, me = {
26
27
  key: 0,
27
28
  class: "aside-footer"
28
- }, ie = {
29
+ }, ue = {
29
30
  __name: "index",
30
- setup(de) {
31
- const r = S(), B = u(() => {
32
- switch (r.getters.editingType) {
31
+ emits: ["onFormDragMove"],
32
+ setup(ce, { emit: B }) {
33
+ const S = B, i = $(), T = u(() => {
34
+ switch (i.getters.editingType) {
33
35
  case "table":
34
- return z;
36
+ return K;
35
37
  case "form":
36
- return G;
38
+ return O;
37
39
  }
38
40
  return null;
39
- }), V = u(() => r.getters.editingType), y = g(["basic", "advanced"]), f = g(!1), _ = g(!1), h = u(() => {
41
+ }), V = u(() => i.getters.editingType), y = g(["basic", "advanced"]), f = g(!1), _ = g(!1), F = u(() => {
40
42
  var e;
41
43
  const t = C();
42
44
  return ((e = t == null ? void 0 : t.deletedFields) == null ? void 0 : e.length) || 0;
43
- }), E = u(() => {
45
+ }), h = u(() => {
44
46
  var e;
45
47
  const t = C();
46
48
  return ((e = t == null ? void 0 : t.hiddenFields) == null ? void 0 : e.length) || 0;
@@ -52,64 +54,66 @@ const Z = { class: "dev-designer-aside" }, ee = { class: "components-item" }, te
52
54
  type: "widgets"
53
55
  };
54
56
  }
55
- function N(t) {
56
- q(t.clonedData), r.getters.editingType == "form" && x.emit("onFormDragEnd", t);
57
+ function M(t) {
58
+ J(t.clonedData), i.getters.editingType == "form" && x.emit("onFormDragEnd", t);
57
59
  }
58
- function T(t) {
59
- return r.getters.editingType == "form" && x.emit("onFormDragMove", t), !0;
60
+ const N = W((t) => (i.getters.editingType == "form" && S("onFormDragMove", t), !0), 50);
61
+ function U(t) {
62
+ i.getters.editingType == "form" && x.emit("onFormDragStart", t);
60
63
  }
61
- function U() {
64
+ function I() {
62
65
  f.value = !0;
63
66
  }
64
- function I() {
67
+ function A() {
65
68
  _.value = !0;
66
69
  }
67
70
  return (t, e) => {
68
- const v = P, A = Q, H = W, F = X, M = Y;
69
- return s(), m(M, { class: "root-aside" }, {
71
+ const v = Y, H = Z, L = ee, D = te, R = oe;
72
+ return s(), c(R, { class: "root-aside" }, {
70
73
  default: a(() => [
71
- l("div", Z, [
72
- n(H, {
74
+ l("div", le, [
75
+ n(L, {
73
76
  modelValue: y.value,
74
77
  "onUpdate:modelValue": e[0] || (e[0] = (o) => y.value = o)
75
78
  }, {
76
79
  default: a(() => [
77
- (s(!0), d(D, null, k(B.value, (o) => (s(), m(A, {
80
+ (s(!0), d(E, null, k(T.value, (o) => (s(), c(H, {
78
81
  title: o.title,
79
82
  name: o.name
80
83
  }, {
81
84
  default: a(() => [
82
- n(c(L), {
85
+ n(m(j), {
83
86
  modelValue: o.children,
84
- "onUpdate:modelValue": (i) => o.children = i,
87
+ "onUpdate:modelValue": (r) => o.children = r,
85
88
  animation: 150,
86
89
  ghostClass: "ghost",
87
90
  group: { name: "dev", pull: "clone", put: !1 },
88
91
  clone: w,
89
- onEnd: N,
90
- onMove: T,
92
+ onEnd: M,
93
+ onMove: m(N),
94
+ onStart: U,
91
95
  sort: !1,
92
96
  class: "components-list"
93
97
  }, {
94
98
  default: a(() => [
95
- (s(!0), d(D, null, k(o.children, (i) => (s(), d("div", ee, [
96
- l("div", te, [
99
+ (s(!0), d(E, null, k(o.children, (r) => (s(), d("div", ne, [
100
+ l("div", se, [
97
101
  n(v, { class: "components-item-icon" }, {
98
102
  default: a(() => [
99
- n(c(R))
103
+ n(m(q))
100
104
  ]),
101
105
  _: 1
102
106
  }),
103
- l("span", oe, b(i.label), 1)
107
+ l("span", ae, b(r.label), 1)
104
108
  ]),
105
- V.value == "table" ? (s(), d("div", le, [
106
- l("div", ne, b(i.label), 1),
107
- l("div", se, b(i.fieldName), 1)
109
+ V.value == "table" ? (s(), d("div", ie, [
110
+ l("div", re, b(r.label), 1),
111
+ l("div", de, b(r.fieldName), 1)
108
112
  ])) : p("", !0)
109
113
  ]))), 256))
110
114
  ]),
111
115
  _: 2
112
- }, 1032, ["modelValue", "onUpdate:modelValue"])
116
+ }, 1032, ["modelValue", "onUpdate:modelValue", "onMove"])
113
117
  ]),
114
118
  _: 2
115
119
  }, 1032, ["title", "name"]))), 256))
@@ -117,21 +121,21 @@ const Z = { class: "dev-designer-aside" }, ee = { class: "components-item" }, te
117
121
  _: 1
118
122
  }, 8, ["modelValue"])
119
123
  ]),
120
- V.value == "form" ? (s(), d("div", ae, [
124
+ V.value == "form" ? (s(), d("div", me, [
121
125
  l("div", {
122
126
  class: "footer-btn recycle-btn",
123
- onClick: U
127
+ onClick: I
124
128
  }, [
125
129
  n(v, { class: "btn-icon" }, {
126
130
  default: a(() => [
127
- n(c($))
131
+ n(m(z))
128
132
  ]),
129
133
  _: 1
130
134
  }),
131
135
  e[3] || (e[3] = l("span", { class: "btn-text" }, "字段回收站", -1)),
132
- h.value > 0 ? (s(), m(F, {
136
+ F.value > 0 ? (s(), c(D, {
133
137
  key: 0,
134
- value: h.value,
138
+ value: F.value,
135
139
  max: 99,
136
140
  class: "btn-badge"
137
141
  }, null, 8, ["value"])) : p("", !0)
@@ -139,28 +143,28 @@ const Z = { class: "dev-designer-aside" }, ee = { class: "components-item" }, te
139
143
  e[5] || (e[5] = l("div", { class: "footer-divider" }, null, -1)),
140
144
  l("div", {
141
145
  class: "footer-btn hidden-field-btn",
142
- onClick: I
146
+ onClick: A
143
147
  }, [
144
148
  n(v, { class: "btn-icon" }, {
145
149
  default: a(() => [
146
- n(c(j))
150
+ n(m(G))
147
151
  ]),
148
152
  _: 1
149
153
  }),
150
154
  e[4] || (e[4] = l("span", { class: "btn-text" }, "隐藏域", -1)),
151
- E.value > 0 ? (s(), m(F, {
155
+ h.value > 0 ? (s(), c(D, {
152
156
  key: 0,
153
- value: E.value,
157
+ value: h.value,
154
158
  max: 99,
155
159
  class: "btn-badge"
156
160
  }, null, 8, ["value"])) : p("", !0)
157
161
  ])
158
162
  ])) : p("", !0),
159
- n(J, {
163
+ n(P, {
160
164
  modelValue: f.value,
161
165
  "onUpdate:modelValue": e[1] || (e[1] = (o) => f.value = o)
162
166
  }, null, 8, ["modelValue"]),
163
- n(K, {
167
+ n(Q, {
164
168
  modelValue: _.value,
165
169
  "onUpdate:modelValue": e[2] || (e[2] = (o) => _.value = o)
166
170
  }, null, 8, ["modelValue"])
@@ -169,7 +173,7 @@ const Z = { class: "dev-designer-aside" }, ee = { class: "components-item" }, te
169
173
  });
170
174
  };
171
175
  }
172
- }, Ne = /* @__PURE__ */ O(ie, [["__scopeId", "data-v-6873d89a"]]);
176
+ }, Ie = /* @__PURE__ */ X(ue, [["__scopeId", "data-v-4e1d5565"]]);
173
177
  export {
174
- Ne as default
178
+ Ie as default
175
179
  };
@@ -1,97 +1,134 @@
1
1
  import "../../node_modules/element-plus/theme-chalk/base.css.js";
2
+ import "../../node_modules/element-plus/theme-chalk/el-result.css.js";
3
+ import "../../node_modules/element-plus/theme-chalk/el-button.css.js";
2
4
  import "../../node_modules/element-plus/theme-chalk/el-container.css.js";
3
5
  import "../../node_modules/element-plus/theme-chalk/el-aside.css.js";
4
6
  import "../../node_modules/element-plus/theme-chalk/el-footer.css.js";
5
7
  import "../../node_modules/element-plus/theme-chalk/el-header.css.js";
6
8
  import "../../node_modules/element-plus/theme-chalk/el-main.css.js";
7
9
  import "../../node_modules/element-plus/theme-chalk/el-config-provider.css.js";
8
- import { ref as l, computed as k, openBlock as u, createBlock as _, withCtx as p, createVNode as o, unref as r, resolveDynamicComponent as h, createCommentVNode as C } from "vue";
9
- import { useStore as b } from "vuex";
10
- import { useRoute as x } from "vue-router";
11
- import I from "./aside/index.vue.js";
12
- import N from "./header/index.vue.js";
13
- import T from "./property/index.vue.js";
14
- import A from "../packages/table/index.vue.js";
15
- import E from "../packages/form/index.vue.js";
16
- import O from "../../node_modules/element-plus/dist/locale/zh-cn.js";
17
- import { setEditConfigData as d, setSelectedItem as S, setHoverItem as B } from "../packages/utils/common.js";
10
+ import { ref as m, computed as w, openBlock as u, createBlock as d, withCtx as r, createVNode as o, unref as p, resolveDynamicComponent as D, createElementBlock as E, createTextVNode as N, createCommentVNode as B } from "vue";
11
+ import { useStore as T } from "vuex";
12
+ import { useRoute as O, useRouter as R } from "vue-router";
13
+ import A from "./aside/index.vue.js";
14
+ import F from "./header/index.vue.js";
15
+ import M from "./property/index.vue.js";
16
+ import S from "../packages/table/index.vue.js";
17
+ import V from "../packages/form/index.vue.js";
18
+ import J from "../../node_modules/element-plus/dist/locale/zh-cn.js";
19
+ import { setEditConfigData as v, setSelectedItem as K, setHoverItem as L } from "../packages/utils/common.js";
18
20
  import y from "../api/index.js";
19
- import { defaultTableConfig as w } from "../packages/table/default.js";
20
- import { defaultFormConfig as D } from "../packages/form/default.js";
21
+ import { defaultTableConfig as P } from "../packages/table/default.js";
22
+ import { defaultFormConfig as W } from "../packages/form/default.js";
21
23
  import "./index.vue2.js";
22
- import J from "../../_virtual/_plugin-vue_export-helper.js";
23
- import { ElConfigProvider as K } from "../../node_modules/element-plus/es/components/config-provider/index.js";
24
- import { ElMain as L, ElContainer as P } from "../../node_modules/element-plus/es/components/container/index.js";
25
- const V = {
24
+ import q from "../../_virtual/_plugin-vue_export-helper.js";
25
+ import { ElConfigProvider as z } from "../../node_modules/element-plus/es/components/config-provider/index.js";
26
+ import { ElMain as H, ElContainer as $ } from "../../node_modules/element-plus/es/components/container/index.js";
27
+ import { ElButton as j } from "../../node_modules/element-plus/es/components/button/index.js";
28
+ import { ElResult as G } from "../../node_modules/element-plus/es/components/result/index.js";
29
+ const Q = {
30
+ key: 1,
31
+ class: "init-error-container"
32
+ }, U = {
26
33
  __name: "index",
27
- setup(W) {
28
- const m = b(), v = x(), c = l("table"), n = v.query.pkId || "42198dc36f73b0da3d39258d58ba2ada", s = l(!1);
29
- y.login4dev().then((f) => {
30
- m.commit("set_token", f.token), m.commit("set_refreshToken", f.refreshToken), n && y.getById(n).then((e) => {
31
- const i = e.templateName, a = e.templateKey;
32
- if (c.value = e.type, c.value === "table") {
33
- const t = l({
34
- pkId: n,
35
- templateName: i,
34
+ setup(X) {
35
+ const l = T(), g = O(), k = R(), f = m("table"), c = g.query.pkId, n = m(0), _ = m(null);
36
+ function h() {
37
+ window.history.length > 1 ? k.back() : window.close();
38
+ }
39
+ c ? y.login4dev().then((i) => {
40
+ l.commit("set_token", i.token), l.commit("set_refreshToken", i.refreshToken), y.getById(c).then((e) => {
41
+ const s = e.templateName, a = e.templateKey;
42
+ if (f.value = e.type, f.value === "table") {
43
+ const t = m({
44
+ pkId: c,
45
+ templateName: s,
36
46
  templateKey: a,
37
- ...w,
47
+ ...P,
38
48
  ...JSON.parse(e.context)
39
49
  });
40
- d(t.value), s.value = !0;
41
- } else if (c.value === "form") {
42
- const t = l({
43
- pkId: n,
44
- templateName: i,
50
+ v(t.value), n.value = 1;
51
+ } else if (f.value === "form") {
52
+ const t = m({
53
+ pkId: c,
54
+ templateName: s,
45
55
  templateKey: a,
46
- ...D,
56
+ ...W,
47
57
  ...JSON.parse(e.context)
48
58
  });
49
- d(t.value), s.value = !0;
59
+ v(t.value), n.value = 1;
50
60
  }
51
- m.commit("set_editing_type", e.type);
61
+ l.commit("set_editing_type", e.type);
52
62
  });
53
- });
54
- const g = k(() => {
55
- switch (m.getters.editingType) {
63
+ }) : n.value = -1;
64
+ const b = w(() => {
65
+ switch (l.getters.editingType) {
56
66
  case "table":
57
- return A;
67
+ return S;
58
68
  case "form":
59
- return E;
69
+ return V;
60
70
  }
61
71
  return null;
62
72
  });
63
- return S(null), B(null), (f, e) => {
64
- const i = K, a = L, t = P;
65
- return s.value ? (u(), _(t, {
73
+ K(null), L(null);
74
+ function x(i) {
75
+ var e;
76
+ (e = _.value) == null || e.onFormDragMove(i);
77
+ }
78
+ return (i, e) => {
79
+ const s = z, a = H, t = $, C = j, I = G;
80
+ return n.value == 1 ? (u(), d(t, {
66
81
  key: 0,
67
82
  style: { "flex-direction": "column", height: "100%" }
68
83
  }, {
69
- default: p(() => [
70
- o(r(N)),
84
+ default: r(() => [
85
+ o(p(F)),
71
86
  o(t, { class: "inner-container" }, {
72
- default: p(() => [
73
- o(r(I)),
87
+ default: r(() => [
88
+ o(p(A), { onOnFormDragMove: x }),
74
89
  o(a, { class: "root-main" }, {
75
- default: p(() => [
76
- o(i, { locale: r(O) }, {
77
- default: p(() => [
78
- (u(), _(h(r(g))))
90
+ default: r(() => [
91
+ o(s, { locale: p(J) }, {
92
+ default: r(() => [
93
+ (u(), d(D(b.value), {
94
+ ref_key: "compRef",
95
+ ref: _
96
+ }, null, 512))
79
97
  ]),
80
98
  _: 1
81
99
  }, 8, ["locale"])
82
100
  ]),
83
101
  _: 1
84
102
  }),
85
- o(r(T))
103
+ o(p(M))
86
104
  ]),
87
105
  _: 1
88
106
  })
89
107
  ]),
90
108
  _: 1
91
- })) : C("", !0);
109
+ })) : n.value == -1 ? (u(), E("div", Q, [
110
+ o(I, {
111
+ icon: "warning",
112
+ title: "缺少模板ID",
113
+ "sub-title": "请提供有效的模板ID(pkId)参数"
114
+ }, {
115
+ extra: r(() => [
116
+ o(C, {
117
+ type: "primary",
118
+ onClick: h
119
+ }, {
120
+ default: r(() => [...e[0] || (e[0] = [
121
+ N("返回", -1)
122
+ ])]),
123
+ _: 1
124
+ })
125
+ ]),
126
+ _: 1
127
+ })
128
+ ])) : B("", !0);
92
129
  };
93
130
  }
94
- }, ce = /* @__PURE__ */ J(V, [["__scopeId", "data-v-ea04c802"]]);
131
+ }, De = /* @__PURE__ */ q(U, [["__scopeId", "data-v-9ea74b78"]]);
95
132
  export {
96
- ce as default
133
+ De as default
97
134
  };