@opentiny/tiny-engine-plugin-model-manager 2.10.0-rc.0 → 2.10.0

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.
package/dist/index.js CHANGED
@@ -1,21 +1,21 @@
1
1
  import "./style.css";
2
- import { ref as k, watch as ne, createElementBlock as v, openBlock as r, createVNode as t, unref as o, withCtx as u, createElementVNode as g, computed as ae, resolveComponent as U, createTextVNode as A, createCommentVNode as F, Fragment as P, renderList as J, createBlock as z, toDisplayString as q, withModifiers as Q, nextTick as W, reactive as ie, provide as se, onMounted as ue, normalizeClass as re } from "vue";
3
- import { Form as ce, FormItem as G, TinyInput as w, TinyButton as K, TinyGrid as pe, TinyGridColumn as D, TinySelect as Z, TinyOption as N, TinyCheckbox as ee, CollapseItem as me, Collapse as fe, Button as ve, Notify as le, TinySearch as ge, Modal as ye } from "@opentiny/vue";
2
+ import { ref as M, watch as ae, createElementBlock as v, openBlock as c, createVNode as t, unref as n, withCtx as r, createElementVNode as g, computed as ne, resolveComponent as S, createTextVNode as A, createCommentVNode as F, Fragment as P, renderList as H, createBlock as z, toDisplayString as L, withModifiers as Q, nextTick as W, reactive as se, provide as de, onMounted as ue, normalizeClass as re } from "vue";
3
+ import { Form as ce, FormItem as K, TinyInput as N, TinyButton as J, TinyGrid as pe, TinyGridColumn as I, TinySelect as Z, TinyOption as D, TinyCheckbox as ee, CollapseItem as me, Collapse as fe, Button as ve, Notify as le, TinySearch as ge, Modal as ye } from "@opentiny/vue";
4
4
  import { IconSearch as _e } from "@opentiny/vue-icon";
5
5
  import { ButtonGroup as he, SvgButton as X, PluginSetting as xe, PluginPanel as Ce, SearchEmpty as Ve } from "@opentiny/tiny-engine-common";
6
- import { getMetaApi as B, META_SERVICE as T, useLayout as oe, useEnv as Me } from "@opentiny/tiny-engine-meta-register";
7
- const H = (p, y) => {
6
+ import { getMetaApi as q, META_SERVICE as B, useLayout as oe, useEnv as be } from "@opentiny/tiny-engine-meta-register";
7
+ const j = (p, y) => {
8
8
  const C = p.__vccOpts || p;
9
- for (const [d, m] of y)
10
- C[d] = m;
9
+ for (const [s, m] of y)
10
+ C[s] = m;
11
11
  return C;
12
- }, be = { class: "section" }, Ee = { class: "form-item" }, ke = { class: "form-item" }, Re = { class: "form-item" }, Ue = { class: "form-item" }, Se = {
12
+ }, Ee = { class: "section" }, Me = { class: "form-item" }, ke = { class: "form-item" }, Re = { class: "form-item" }, Se = { class: "form-item" }, Ue = {
13
13
  __name: "ModelBasicForm",
14
14
  props: {
15
15
  model: { type: Object, required: !0 }
16
16
  },
17
17
  setup(p, { expose: y }) {
18
- const C = p, d = k(C.model), m = k(), R = k({
18
+ const C = p, s = M(C.model), m = M(), R = M({
19
19
  nameCn: [
20
20
  { required: !0, message: "必填", trigger: "blur" },
21
21
  { min: 1, max: 32, message: "长度在1-32之间", trigger: "blur" }
@@ -26,20 +26,20 @@ const H = (p, y) => {
26
26
  ],
27
27
  modelUrl: [{ min: 1, max: 200, message: "长度在1-200之间", trigger: "blur" }]
28
28
  });
29
- return ne(
29
+ return ae(
30
30
  () => C.model,
31
31
  (h) => {
32
- d.value = h;
32
+ s.value = h;
33
33
  },
34
34
  { deep: !0 }
35
35
  ), y({
36
- getLocalValue: () => d.value,
36
+ getLocalValue: () => s.value,
37
37
  validate: () => m.value.validate()
38
- }), (h, _) => (r(), v("div", be, [
39
- t(o(ce), {
38
+ }), (h, _) => (c(), v("div", Ee, [
39
+ t(n(ce), {
40
40
  ref_key: "ruleFormRef",
41
41
  ref: m,
42
- model: d.value,
42
+ model: s.value,
43
43
  rules: R.value,
44
44
  "label-width": "120px",
45
45
  "validate-type": "text",
@@ -47,16 +47,16 @@ const H = (p, y) => {
47
47
  "label-align": !0,
48
48
  "label-position": "top"
49
49
  }, {
50
- default: u(() => [
51
- g("div", Ee, [
52
- t(o(G), {
50
+ default: r(() => [
51
+ g("div", Me, [
52
+ t(n(K), {
53
53
  label: "中文名称",
54
54
  prop: "nameCn"
55
55
  }, {
56
- default: u(() => [
57
- t(o(w), {
58
- modelValue: d.value.nameCn,
59
- "onUpdate:modelValue": _[0] || (_[0] = (b) => d.value.nameCn = b),
56
+ default: r(() => [
57
+ t(n(N), {
58
+ modelValue: s.value.nameCn,
59
+ "onUpdate:modelValue": _[0] || (_[0] = (E) => s.value.nameCn = E),
60
60
  placeholder: "请输入模型中文名称"
61
61
  }, null, 8, ["modelValue"])
62
62
  ]),
@@ -64,14 +64,14 @@ const H = (p, y) => {
64
64
  })
65
65
  ]),
66
66
  g("div", ke, [
67
- t(o(G), {
67
+ t(n(K), {
68
68
  label: "英文名称",
69
69
  prop: "nameEn"
70
70
  }, {
71
- default: u(() => [
72
- t(o(w), {
73
- modelValue: d.value.nameEn,
74
- "onUpdate:modelValue": _[1] || (_[1] = (b) => d.value.nameEn = b),
71
+ default: r(() => [
72
+ t(n(N), {
73
+ modelValue: s.value.nameEn,
74
+ "onUpdate:modelValue": _[1] || (_[1] = (E) => s.value.nameEn = E),
75
75
  placeholder: "请输入模型英文名称"
76
76
  }, null, 8, ["modelValue"])
77
77
  ]),
@@ -79,31 +79,31 @@ const H = (p, y) => {
79
79
  })
80
80
  ]),
81
81
  g("div", Re, [
82
- t(o(G), {
82
+ t(n(K), {
83
83
  label: "模型地址",
84
84
  prop: "modelUrl"
85
85
  }, {
86
- default: u(() => [
87
- t(o(w), {
88
- modelValue: d.value.modelUrl,
89
- "onUpdate:modelValue": _[2] || (_[2] = (b) => d.value.modelUrl = b),
86
+ default: r(() => [
87
+ t(n(N), {
88
+ modelValue: s.value.modelUrl,
89
+ "onUpdate:modelValue": _[2] || (_[2] = (E) => s.value.modelUrl = E),
90
90
  placeholder: "请输入模型地址,如:https://api.example.com/model"
91
91
  }, null, 8, ["modelValue"])
92
92
  ]),
93
93
  _: 1
94
94
  })
95
95
  ]),
96
- g("div", Ue, [
97
- t(o(G), {
96
+ g("div", Se, [
97
+ t(n(K), {
98
98
  label: "描述",
99
99
  prop: "description"
100
100
  }, {
101
- default: u(() => [
102
- t(o(w), {
101
+ default: r(() => [
102
+ t(n(N), {
103
103
  type: "textarea",
104
104
  rows: 3,
105
- modelValue: d.value.description,
106
- "onUpdate:modelValue": _[3] || (_[3] = (b) => d.value.description = b),
105
+ modelValue: s.value.description,
106
+ "onUpdate:modelValue": _[3] || (_[3] = (E) => s.value.description = E),
107
107
  placeholder: "请输入模型描述"
108
108
  }, null, 8, ["modelValue"])
109
109
  ]),
@@ -115,19 +115,19 @@ const H = (p, y) => {
115
115
  }, 8, ["model", "rules"])
116
116
  ]));
117
117
  }
118
- }, we = /* @__PURE__ */ H(Se, [["__scopeId", "data-v-7966159f"]]), $e = { class: "section" }, Ie = { class: "field-table" }, De = {
118
+ }, Ne = /* @__PURE__ */ j(Ue, [["__scopeId", "data-v-7966159f"]]), $e = { class: "section" }, we = { class: "field-table" }, Ie = {
119
119
  key: 0,
120
120
  class: "expand-content"
121
- }, Ne = { class: "expand-section" }, Ae = { class: "enum-values" }, Fe = {
121
+ }, De = { class: "expand-section" }, Ae = { class: "enum-values" }, Fe = {
122
122
  key: 1,
123
123
  class: "expand-content"
124
- }, Le = { class: "expand-section" }, qe = { class: "model-ref-section" }, Be = {
124
+ }, Oe = { class: "expand-section" }, Le = { class: "model-ref-section" }, qe = {
125
125
  key: 0,
126
126
  class: "model-ref-info"
127
- }, Te = {
127
+ }, Be = {
128
128
  key: 0,
129
129
  class: "editing-cell"
130
- }, Oe = {
130
+ }, Te = {
131
131
  key: 1,
132
132
  class: "readonly-cell"
133
133
  }, Pe = {
@@ -142,13 +142,13 @@ const H = (p, y) => {
142
142
  }, Ke = {
143
143
  key: 1,
144
144
  class: "readonly-cell"
145
- }, je = {
145
+ }, Je = {
146
146
  key: 0,
147
147
  class: "editing-cell"
148
- }, He = {
148
+ }, je = {
149
149
  key: 1,
150
150
  class: "readonly-cell"
151
- }, Je = {
151
+ }, He = {
152
152
  key: 0,
153
153
  class: "editing-cell"
154
154
  }, Qe = {
@@ -163,133 +163,133 @@ const H = (p, y) => {
163
163
  },
164
164
  emits: ["insert-enum-after", "remove-enum"],
165
165
  setup(p, { expose: y }) {
166
- const C = p, d = k(null), m = k(C.model), R = ae(() => C.availableModels.filter((e) => e.id !== C.model.id)), M = () => {
167
- var e, i;
168
- return ((i = (e = d.value) == null ? void 0 : e.getData) == null ? void 0 : i.call(e)) || [];
166
+ const C = p, s = M(null), m = M(C.model), R = ne(() => C.availableModels.filter((e) => e.id !== C.model.id)), b = () => {
167
+ var e, o;
168
+ return ((o = (e = s.value) == null ? void 0 : e.getData) == null ? void 0 : o.call(e)) || [];
169
169
  }, h = (e) => {
170
- const i = R.value.find((c) => c.id === e);
171
- return i ? `${i.nameCn} (${i.nameEn})` : "未知模型";
170
+ const o = R.value.find((f) => f.id === e);
171
+ return o ? `${o.nameCn} (${o.nameEn})` : "未知模型";
172
172
  }, _ = (e) => {
173
- var i, c;
173
+ var o, f;
174
174
  if (e.type === "Enum" || e.type === "ModelRef")
175
175
  e.isExpanded = !0, e.type === "Enum" && (!Array.isArray(e.options) || e.options.length === 0) && (e.options = [{ value: "", label: "" }]), e.type === "ModelRef" && (e.isModel = !0, e.defaultValue = e.defaultValue || null), W(() => {
176
- var a, n;
177
- (((n = (a = d.value) == null ? void 0 : a.getGridData) == null ? void 0 : n.call(a)) || []).forEach((f) => {
178
- f.id === e.id && !expandConfig.value.expandRowKeys.includes(f._RID) && expandConfig.value.expandRowKeys.push(f._RID);
176
+ var a, i;
177
+ (((i = (a = s.value) == null ? void 0 : a.getGridData) == null ? void 0 : i.call(a)) || []).forEach((d) => {
178
+ d.id === e.id && !expandConfig.value.expandRowKeys.includes(d._RID) && expandConfig.value.expandRowKeys.push(d._RID);
179
179
  });
180
180
  });
181
181
  else {
182
182
  e.isExpanded = !1;
183
- const a = (((c = (i = d.value) == null ? void 0 : i.getGridData) == null ? void 0 : c.call(i)) || []).find((n) => n.id === e.id);
183
+ const a = (((f = (o = s.value) == null ? void 0 : o.getGridData) == null ? void 0 : f.call(o)) || []).find((i) => i.id === e.id);
184
184
  if (a) {
185
- const n = expandConfig.value.expandRowKeys.indexOf(a._RID);
186
- n > -1 && expandConfig.value.expandRowKeys.splice(n, 1);
185
+ const i = expandConfig.value.expandRowKeys.indexOf(a._RID);
186
+ i > -1 && expandConfig.value.expandRowKeys.splice(i, 1);
187
187
  }
188
188
  }
189
189
  W(() => {
190
190
  m.value && m.value.parameters && (m.value.parameters = [...m.value.parameters]);
191
191
  });
192
- }, b = (e) => ({
192
+ }, E = (e) => ({
193
193
  String: "字符串",
194
194
  Number: "数字",
195
195
  Boolean: "布尔值",
196
196
  Date: "日期",
197
197
  Enum: "枚举值",
198
198
  ModelRef: "模型引用"
199
- })[e] || e, $ = (e) => {
200
- var i;
201
- e._editCache = { ...e }, e.isEditing = !0, (e.type === "Enum" || e.type === "ModelRef") && (e.isExpanded = !0, e.type === "Enum" && (!Array.isArray(e.options) || e.options.length === 0) && (e.options = [{ value: "", label: "" }]), e.type === "ModelRef" && (e.isModel = !0, e.defaultValue = e.defaultValue || null), (((i = d.value) == null ? void 0 : i.getGridData()) || []).forEach((l) => {
199
+ })[e] || e, k = (e) => {
200
+ var o;
201
+ e._editCache = { ...e }, e.isEditing = !0, (e.type === "Enum" || e.type === "ModelRef") && (e.isExpanded = !0, e.type === "Enum" && (!Array.isArray(e.options) || e.options.length === 0) && (e.options = [{ value: "", label: "" }]), e.type === "ModelRef" && (e.isModel = !0, e.defaultValue = e.defaultValue || null), (((o = s.value) == null ? void 0 : o.getGridData()) || []).forEach((l) => {
202
202
  l.id === e.id && !expandConfig.value.expandRowKeys.includes(l._RID) && expandConfig.value.expandRowKeys.push(l._RID);
203
203
  }));
204
- }, I = (e) => {
204
+ }, $ = (e) => {
205
205
  e.isEditing = !1, e.isExpanded = !1, e._editCache && JSON.stringify(e._editCache) !== JSON.stringify(e) && (e._editCache = null), e.isNew && delete e.isNew;
206
- }, s = (e) => {
206
+ }, w = (e) => {
207
207
  var l, a;
208
208
  e.isEditing = !1, e.isExpanded = !1;
209
- const c = (((a = (l = d.value) == null ? void 0 : l.getGridData) == null ? void 0 : a.call(l)) || []).find((n) => n.id === e.id);
210
- if (c) {
211
- const n = expandConfig.value.expandRowKeys.indexOf(c._RID);
212
- n > -1 && expandConfig.value.expandRowKeys.splice(n, 1);
209
+ const f = (((a = (l = s.value) == null ? void 0 : l.getGridData) == null ? void 0 : a.call(l)) || []).find((i) => i.id === e.id);
210
+ if (f) {
211
+ const i = expandConfig.value.expandRowKeys.indexOf(f._RID);
212
+ i > -1 && expandConfig.value.expandRowKeys.splice(i, 1);
213
213
  }
214
214
  if (e._editCache && (Object.assign(e, e._editCache), e._editCache = null), e.isNew) {
215
- const n = m.value.parameters.findIndex((f) => f.id === e.id);
216
- n > -1 && m.value.parameters.splice(n, 1);
215
+ const i = m.value.parameters.findIndex((d) => d.id === e.id);
216
+ i > -1 && m.value.parameters.splice(i, 1);
217
217
  }
218
- }, E = (e) => {
219
- const i = m.value.parameters.findIndex((c) => c.prop === e.prop);
220
- i > -1 && m.value.parameters.splice(i, 1);
218
+ }, u = (e) => {
219
+ const o = m.value.parameters.findIndex((f) => f.prop === e.prop);
220
+ o > -1 && m.value.parameters.splice(o, 1);
221
221
  };
222
222
  return y({
223
- fieldGrid: d,
224
- getGridData: M
225
- }), (e, i) => {
226
- const c = U("svg-icon");
227
- return r(), v("div", $e, [
228
- t(o(K), {
223
+ fieldGrid: s,
224
+ getGridData: b
225
+ }), (e, o) => {
226
+ const f = S("svg-icon");
227
+ return c(), v("div", $e, [
228
+ t(n(J), {
229
229
  class: "add-field-btn",
230
230
  size: "mini",
231
- onClick: i[0] || (i[0] = (l) => e.$emit("add-field"))
231
+ onClick: o[0] || (o[0] = (l) => e.$emit("add-field"))
232
232
  }, {
233
- default: u(() => [
234
- t(c, { name: "add" }),
235
- i[1] || (i[1] = A(" 添加字段 ", -1))
233
+ default: r(() => [
234
+ t(f, { name: "add" }),
235
+ o[1] || (o[1] = A(" 添加字段 ", -1))
236
236
  ]),
237
237
  _: 1
238
238
  }),
239
- g("div", Ie, [
240
- t(o(pe), {
239
+ g("div", we, [
240
+ t(n(pe), {
241
241
  data: p.model.parameters,
242
242
  "header-fixed": !0,
243
243
  scrollable: { y: !0 },
244
244
  "expand-config": p.expandConfig,
245
245
  ref_key: "fieldGrid",
246
- ref: d,
246
+ ref: s,
247
247
  style: { height: "100%" }
248
248
  }, {
249
- default: u(() => [
250
- t(o(D), {
249
+ default: r(() => [
250
+ t(n(I), {
251
251
  type: "expand",
252
252
  width: "20"
253
253
  }, {
254
- default: u(({ row: l }) => [
255
- l.type === "Enum" ? (r(), v("div", De, [
256
- g("div", Ne, [
257
- i[4] || (i[4] = g("h4", null, "默认选项(下拉框)", -1)),
254
+ default: r(({ row: l }) => [
255
+ l.type === "Enum" ? (c(), v("div", Ie, [
256
+ g("div", De, [
257
+ o[4] || (o[4] = g("h4", null, "默认选项(下拉框)", -1)),
258
258
  g("div", Ae, [
259
- (r(!0), v(P, null, J(l.options || [], (a, n) => (r(), v("div", {
260
- key: n,
259
+ (c(!0), v(P, null, H(l.options || [], (a, i) => (c(), v("div", {
260
+ key: i,
261
261
  class: "enum-item"
262
262
  }, [
263
- t(o(w), {
263
+ t(n(N), {
264
264
  modelValue: a.value,
265
- "onUpdate:modelValue": (f) => a.value = f,
265
+ "onUpdate:modelValue": (d) => a.value = d,
266
266
  placeholder: "值",
267
267
  size: "small",
268
268
  style: { width: "150px", "margin-right": "8px" }
269
269
  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
270
- t(o(w), {
270
+ t(n(N), {
271
271
  modelValue: a.label,
272
- "onUpdate:modelValue": (f) => a.label = f,
272
+ "onUpdate:modelValue": (d) => a.label = d,
273
273
  placeholder: "显示标签",
274
274
  size: "small",
275
275
  style: { width: "200px", "margin-right": "8px" }
276
276
  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
277
- t(o(K), {
277
+ t(n(J), {
278
278
  type: "text",
279
279
  size: "small",
280
- onClick: (f) => e.$emit("insert-enum-after", l, n)
280
+ onClick: (d) => e.$emit("insert-enum-after", l, i)
281
281
  }, {
282
- default: u(() => [...i[2] || (i[2] = [
282
+ default: r(() => [...o[2] || (o[2] = [
283
283
  A("新增", -1)
284
284
  ])]),
285
285
  _: 1
286
286
  }, 8, ["onClick"]),
287
- t(o(K), {
287
+ t(n(J), {
288
288
  type: "text",
289
289
  size: "small",
290
- onClick: (f) => e.$emit("remove-enum", l, n)
290
+ onClick: (d) => e.$emit("remove-enum", l, i)
291
291
  }, {
292
- default: u(() => [...i[3] || (i[3] = [
292
+ default: r(() => [...o[3] || (o[3] = [
293
293
  A("删除", -1)
294
294
  ])]),
295
295
  _: 1
@@ -297,19 +297,19 @@ const H = (p, y) => {
297
297
  ]))), 128))
298
298
  ])
299
299
  ])
300
- ])) : l.type === "ModelRef" ? (r(), v("div", Fe, [
301
- g("div", Le, [
302
- i[5] || (i[5] = g("h4", null, "引用的模型", -1)),
303
- g("div", qe, [
304
- t(o(Z), {
300
+ ])) : l.type === "ModelRef" ? (c(), v("div", Fe, [
301
+ g("div", Oe, [
302
+ o[5] || (o[5] = g("h4", null, "引用的模型", -1)),
303
+ g("div", Le, [
304
+ t(n(Z), {
305
305
  modelValue: l.defaultValue,
306
306
  "onUpdate:modelValue": (a) => l.defaultValue = a,
307
307
  placeholder: "请选择要引用的模型",
308
308
  size: "small",
309
309
  style: { width: "100%" }
310
310
  }, {
311
- default: u(() => [
312
- (r(!0), v(P, null, J(R.value, (a) => (r(), z(o(N), {
311
+ default: r(() => [
312
+ (c(!0), v(P, null, H(R.value, (a) => (c(), z(n(D), {
313
313
  key: a.id,
314
314
  value: a.id,
315
315
  label: `${a.nameCn} (${a.nameEn})`
@@ -317,8 +317,8 @@ const H = (p, y) => {
317
317
  ]),
318
318
  _: 1
319
319
  }, 8, ["modelValue", "onUpdate:modelValue"]),
320
- l.defaultValue ? (r(), v("div", Be, [
321
- g("p", null, "已选择模型:" + q(h(l.defaultValue)), 1)
320
+ l.defaultValue ? (c(), v("div", qe, [
321
+ g("p", null, "已选择模型:" + L(h(l.defaultValue)), 1)
322
322
  ])) : F("", !0)
323
323
  ])
324
324
  ])
@@ -326,98 +326,98 @@ const H = (p, y) => {
326
326
  ]),
327
327
  _: 1
328
328
  }),
329
- t(o(D), {
329
+ t(n(I), {
330
330
  field: "prop",
331
331
  title: "字段名称",
332
332
  width: "100"
333
333
  }, {
334
- default: u(({ row: l }) => [
335
- l.isEditing ? (r(), v("div", Te, [
336
- t(o(w), {
334
+ default: r(({ row: l }) => [
335
+ l.isEditing ? (c(), v("div", Be, [
336
+ t(n(N), {
337
337
  modelValue: l.prop,
338
338
  "onUpdate:modelValue": (a) => l.prop = a,
339
339
  placeholder: "请输入字段名称",
340
340
  size: "small"
341
341
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
342
- ])) : (r(), v("div", Oe, q(l.prop || "点击编辑"), 1))
342
+ ])) : (c(), v("div", Te, L(l.prop || "点击编辑"), 1))
343
343
  ]),
344
344
  _: 1
345
345
  }),
346
- t(o(D), {
346
+ t(n(I), {
347
347
  field: "type",
348
348
  title: "类型",
349
349
  width: "80"
350
350
  }, {
351
- default: u(({ row: l }) => [
352
- l.isEditing ? (r(), v("div", Pe, [
353
- t(o(Z), {
351
+ default: r(({ row: l }) => [
352
+ l.isEditing ? (c(), v("div", Pe, [
353
+ t(n(Z), {
354
354
  modelValue: l.type,
355
355
  "onUpdate:modelValue": (a) => l.type = a,
356
356
  size: "small",
357
357
  onChange: (a) => _(l)
358
358
  }, {
359
- default: u(() => [
360
- t(o(N), {
359
+ default: r(() => [
360
+ t(n(D), {
361
361
  value: "String",
362
362
  label: "字符串"
363
363
  }),
364
- t(o(N), {
364
+ t(n(D), {
365
365
  value: "Number",
366
366
  label: "数字"
367
367
  }),
368
- t(o(N), {
368
+ t(n(D), {
369
369
  value: "Boolean",
370
370
  label: "布尔值"
371
371
  }),
372
- t(o(N), {
372
+ t(n(D), {
373
373
  value: "Date",
374
374
  label: "日期"
375
375
  }),
376
- t(o(N), {
376
+ t(n(D), {
377
377
  value: "Enum",
378
378
  label: "枚举值"
379
379
  }),
380
- t(o(N), {
380
+ t(n(D), {
381
381
  value: "ModelRef",
382
382
  label: "模型引用"
383
383
  })
384
384
  ]),
385
385
  _: 1
386
386
  }, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
387
- ])) : (r(), v("div", ze, q(b(l.type)), 1))
387
+ ])) : (c(), v("div", ze, L(E(l.type)), 1))
388
388
  ]),
389
389
  _: 1
390
390
  }),
391
- t(o(D), {
391
+ t(n(I), {
392
392
  field: "defaultValue",
393
393
  title: "默认值",
394
394
  width: "100"
395
395
  }, {
396
- default: u(({ row: l }) => [
397
- l.isEditing ? (r(), v("div", Ge, [
398
- t(o(w), {
396
+ default: r(({ row: l }) => [
397
+ l.isEditing ? (c(), v("div", Ge, [
398
+ t(n(N), {
399
399
  modelValue: l.defaultValue,
400
400
  "onUpdate:modelValue": (a) => l.defaultValue = a,
401
401
  placeholder: "请输入默认值",
402
402
  size: "small"
403
403
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
404
- ])) : (r(), v("div", Ke, q(l.defaultValue), 1))
404
+ ])) : (c(), v("div", Ke, L(l.defaultValue), 1))
405
405
  ]),
406
406
  _: 1
407
407
  }),
408
- t(o(D), {
408
+ t(n(I), {
409
409
  field: "required",
410
410
  title: "必填",
411
411
  width: "60"
412
412
  }, {
413
- default: u(({ row: l }) => [
414
- l.isEditing ? (r(), v("div", je, [
415
- t(o(ee), {
413
+ default: r(({ row: l }) => [
414
+ l.isEditing ? (c(), v("div", Je, [
415
+ t(n(ee), {
416
416
  modelValue: l.required,
417
417
  "onUpdate:modelValue": (a) => l.required = a
418
418
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
419
- ])) : (r(), v("div", He, [
420
- t(o(ee), {
419
+ ])) : (c(), v("div", je, [
420
+ t(n(ee), {
421
421
  modelValue: l.required,
422
422
  "onUpdate:modelValue": (a) => l.required = a,
423
423
  disabled: ""
@@ -426,52 +426,52 @@ const H = (p, y) => {
426
426
  ]),
427
427
  _: 1
428
428
  }),
429
- t(o(D), {
429
+ t(n(I), {
430
430
  field: "description",
431
431
  title: "描述",
432
432
  width: "100"
433
433
  }, {
434
- default: u(({ row: l }) => [
435
- l.isEditing ? (r(), v("div", Je, [
436
- t(o(w), {
434
+ default: r(({ row: l }) => [
435
+ l.isEditing ? (c(), v("div", He, [
436
+ t(n(N), {
437
437
  modelValue: l.description,
438
438
  "onUpdate:modelValue": (a) => l.description = a,
439
439
  placeholder: "请输入字段描述",
440
440
  size: "small"
441
441
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
442
- ])) : (r(), v("div", Qe, q(l.description || "点击编辑"), 1))
442
+ ])) : (c(), v("div", Qe, L(l.description || "点击编辑"), 1))
443
443
  ]),
444
444
  _: 1
445
445
  }),
446
- t(o(D), {
446
+ t(n(I), {
447
447
  field: "operation",
448
448
  title: "操作",
449
449
  width: "90"
450
450
  }, {
451
- default: u(({ row: l }) => [
451
+ default: r(({ row: l }) => [
452
452
  g("div", We, [
453
- l.isEditing ? (r(), v(P, { key: 0 }, [
453
+ l.isEditing ? (c(), v(P, { key: 0 }, [
454
454
  g("span", {
455
455
  type: "text",
456
456
  size: "mini",
457
- onClick: (a) => I(l)
457
+ onClick: (a) => $(l)
458
458
  }, "保存", 8, Xe),
459
459
  g("span", {
460
460
  type: "text",
461
461
  size: "mini",
462
- onClick: (a) => s(l)
462
+ onClick: (a) => w(l)
463
463
  }, "取消", 8, Ye)
464
- ], 64)) : (r(), v(P, { key: 1 }, [
464
+ ], 64)) : (c(), v(P, { key: 1 }, [
465
465
  g("span", null, [
466
- t(c, {
466
+ t(f, {
467
467
  name: "to-edit",
468
- onClick: Q((a) => $(l), ["stop"])
468
+ onClick: Q((a) => k(l), ["stop"])
469
469
  }, null, 8, ["onClick"])
470
470
  ]),
471
471
  g("span", null, [
472
- t(c, {
472
+ t(f, {
473
473
  name: "delete",
474
- onClick: Q((a) => E(l), ["stop"])
474
+ onClick: Q((a) => u(l), ["stop"])
475
475
  }, null, 8, ["onClick"])
476
476
  ])
477
477
  ], 64))
@@ -486,35 +486,35 @@ const H = (p, y) => {
486
486
  ]);
487
487
  };
488
488
  }
489
- }, el = /* @__PURE__ */ H(Ze, [["__scopeId", "data-v-d15af5f8"]]), O = "/material-center/api/model";
489
+ }, el = /* @__PURE__ */ j(Ze, [["__scopeId", "data-v-d15af5f8"]]), T = "/material-center/api/model";
490
490
  function ll(p = {}) {
491
- return B(T.Http).get(`${O}/list`, { params: p });
491
+ return q(B.Http).get(`${T}/list`, { params: p });
492
492
  }
493
493
  function tl(p) {
494
- return B(T.Http).post(`${O}/create`, p);
494
+ return q(B.Http).post(`${T}/create`, p);
495
495
  }
496
- function nl(p, y) {
497
- return B(T.Http).put(`${O}/update/${p}`, y);
496
+ function al(p, y) {
497
+ return q(B.Http).put(`${T}/update/${p}`, y);
498
498
  }
499
- function al(p) {
500
- return B(T.Http).delete(`${O}/delete/${p}`);
499
+ function nl(p) {
500
+ return q(B.Http).delete(`${T}/delete/${p}`);
501
501
  }
502
502
  function ol() {
503
- return B(T.Http).get(`${O}/table/list`);
503
+ return q(B.Http).get(`${T}/table/list`);
504
504
  }
505
- function dl(p) {
506
- return B(T.Http).get(`${O}/table/${p}`);
505
+ function il(p) {
506
+ return q(B.Http).get(`${T}/table/${p}`);
507
507
  }
508
- const Y = k(!1), te = () => {
508
+ const Y = M(!1), te = () => {
509
509
  Y.value = !0;
510
- }, j = () => {
510
+ }, G = () => {
511
511
  Y.value = !1;
512
- }, il = {
512
+ }, sl = {
513
513
  components: {
514
514
  PluginSetting: xe,
515
515
  SvgButton: X,
516
516
  ButtonGroup: he,
517
- ModelBasicForm: we,
517
+ ModelBasicForm: Ne,
518
518
  FieldManager: el,
519
519
  TinyButton: ve,
520
520
  TinyCollapse: fe,
@@ -536,18 +536,18 @@ const Y = k(!1), te = () => {
536
536
  },
537
537
  emits: ["editCallback", "exportModel", "deleteCallback"],
538
538
  setup(p, { emit: y }) {
539
- const { PLUGIN_NAME: C } = oe(), d = k(["general", "fields"]), m = k(), R = k(), M = k({
539
+ const { PLUGIN_NAME: C } = oe(), s = M(["general", "fields"]), m = M(), R = M(), b = M({
540
540
  expandAll: !1,
541
541
  trigger: "row",
542
542
  expandRowKeys: [],
543
543
  accordion: !1,
544
- activeMethod: (s) => s.type === "Enum" || s.type === "ModelRef",
544
+ activeMethod: (u) => u.type === "Enum" || u.type === "ModelRef",
545
545
  // 枚举类型和模型引用类型都显示展开箭头
546
- showIcon: (s) => s.type === "Enum" || s.type === "ModelRef"
546
+ showIcon: (u) => u.type === "Enum" || u.type === "ModelRef"
547
547
  // 枚举类型和模型引用类型都显示展开箭头
548
548
  }), h = () => {
549
549
  if (!m.value) return;
550
- const s = {
550
+ const u = {
551
551
  prop: "",
552
552
  type: "String",
553
553
  required: !1,
@@ -556,158 +556,172 @@ const Y = k(!1), te = () => {
556
556
  isNew: !0
557
557
  // 新增字段标记
558
558
  };
559
- m.value.parameters.push(s), W(() => {
560
- const E = document.querySelectorAll(".editing-cell .tiny-input");
561
- E.length > 0 && E[E.length - 1].focus();
559
+ m.value.parameters.push(u), W(() => {
560
+ const e = document.querySelectorAll(".editing-cell .tiny-input");
561
+ e.length > 0 && e[e.length - 1].focus();
562
562
  });
563
- }, _ = (s, E) => {
564
- s.options || (s.options = []), s.options.splice(E + 1, 0, { value: "", label: "" });
565
- }, b = (s, E) => {
566
- if (Array.isArray(s.options)) {
567
- if (s.options.length <= 1) {
568
- s.options[0] = { value: "", label: "" };
563
+ }, _ = (u, e) => {
564
+ u.options || (u.options = []), u.options.splice(e + 1, 0, { value: "", label: "" });
565
+ }, E = (u, e) => {
566
+ if (Array.isArray(u.options)) {
567
+ if (u.options.length <= 1) {
568
+ u.options[0] = { value: "", label: "" };
569
569
  return;
570
570
  }
571
- s.options.splice(E, 1);
571
+ u.options.splice(e, 1);
572
572
  }
573
- }, $ = async () => {
574
- var E;
575
- const s = (E = R.value) == null ? void 0 : E.getLocalValue();
576
- R.value.validate().then(async (e) => {
577
- var i;
578
- if (e) {
579
- const c = {
580
- description: s.description,
581
- modelUrl: s.modelUrl,
582
- nameCn: s.nameCn,
583
- nameEn: s.nameEn,
584
- version: s.version,
585
- id: s.id,
586
- parameters: s.parameters.filter((n) => !!n.prop)
573
+ }, k = M(!1), $ = async () => {
574
+ var e;
575
+ const u = (e = R.value) == null ? void 0 : e.getLocalValue();
576
+ R.value.validate().then(async (o) => {
577
+ var f;
578
+ if (o) {
579
+ k.value = !0;
580
+ const l = {
581
+ description: u.description,
582
+ modelUrl: u.modelUrl,
583
+ nameCn: u.nameCn,
584
+ nameEn: u.nameEn,
585
+ version: u.version,
586
+ id: u.id,
587
+ parameters: JSON.parse(JSON.stringify(u.parameters.filter((d) => !!d.prop)))
587
588
  };
588
- let l = !0, a = "";
589
- if (((i = c.parameters) == null ? void 0 : i.length) > 0 && c.parameters.forEach((n) => {
590
- n.type === "Enum" && (n.options = JSON.stringify(n.options)), n.type === "ModelRef" && (n.isModel = !0, delete n.options, n.defaultValue = n.defaultValue || null, l = !!n.defaultValue, a = n.prop);
591
- }), !l) {
589
+ let a = !0, i = "";
590
+ if (((f = l.parameters) == null ? void 0 : f.length) > 0 && l.parameters.forEach((d) => {
591
+ d.type === "Enum" && (d.options = JSON.stringify(d.options || [])), d.type === "ModelRef" && (d.isModel = !0, delete d.options, d.defaultValue = d.defaultValue || null, a = !!d.defaultValue, i = d.prop);
592
+ }), !a) {
592
593
  le({
593
594
  type: "error",
594
- message: `字段${a}未关联模型引用`
595
- });
595
+ message: `字段${i}未关联模型引用`
596
+ }), k.value = !1;
596
597
  return;
597
598
  }
598
- s.id === null ? (delete c.id, await tl(c)) : await nl(c.id, c), y("editCallback"), le({
599
+ u.id === null ? (delete l.id, await tl(l)) : await al(l.id, l), y("editCallback"), le({
599
600
  type: "success",
600
601
  message: "保存成功"
601
- }), m.value = null;
602
+ }), G(), m.value = null, k.value = !1;
602
603
  }
604
+ }).catch(() => {
605
+ k.value = !1;
603
606
  });
604
- }, I = () => {
605
- $emit("deleteCallback", m), j();
607
+ }, w = () => {
608
+ y("deleteCallback", m.value), G();
606
609
  };
607
- return ne(
610
+ return ae(
608
611
  () => p.model,
609
- (s) => {
610
- m.value = s;
612
+ (u) => {
613
+ if (!k.value && u) {
614
+ const e = JSON.parse(JSON.stringify(u));
615
+ e.parameters && e.parameters.forEach((o) => {
616
+ if (o.type === "Enum" && typeof o.options == "string")
617
+ try {
618
+ o.options = JSON.parse(o.options);
619
+ } catch {
620
+ o.options = [{ value: "", label: "" }];
621
+ }
622
+ }), m.value = e;
623
+ } else
624
+ m.value = u;
611
625
  },
612
- { deep: !0 }
626
+ { deep: !0, immediate: !0 }
613
627
  ), {
614
628
  isShow: Y,
615
629
  PLUGIN_NAME: C,
616
- activeName: d,
630
+ activeName: s,
617
631
  modelBasicFormRef: R,
618
- expandConfig: M,
632
+ expandConfig: b,
619
633
  selectedModel: m,
620
- closeModelSettingPanel: j,
634
+ closeModelSettingPanel: G,
621
635
  handleAddField: h,
622
636
  insertEnumValueAfter: _,
623
- removeEnumValue: b,
637
+ removeEnumValue: E,
624
638
  saveModel: $,
625
- deleteModel: I
639
+ deleteModel: w
626
640
  };
627
641
  }
628
642
  };
629
- function sl(p, y, C, d, m, R) {
630
- const M = U("tiny-button"), h = U("svg-button"), _ = U("button-group"), b = U("model-basic-form"), $ = U("tiny-collapse-item"), I = U("field-manager"), s = U("tiny-collapse"), E = U("plugin-setting");
631
- return d.isShow ? (r(), z(E, {
643
+ function dl(p, y, C, s, m, R) {
644
+ const b = S("tiny-button"), h = S("svg-button"), _ = S("button-group"), E = S("model-basic-form"), k = S("tiny-collapse-item"), $ = S("field-manager"), w = S("tiny-collapse"), u = S("plugin-setting");
645
+ return s.isShow ? (c(), z(u, {
632
646
  key: 0,
633
- "fixed-name": d.PLUGIN_NAME.ModelManager,
647
+ "fixed-name": s.PLUGIN_NAME.ModelManager,
634
648
  align: p.align,
635
649
  title: "模型设置",
636
650
  class: "modelmanager-plugin-setting"
637
651
  }, {
638
- header: u(() => [
652
+ header: r(() => [
639
653
  t(_, null, {
640
- default: u(() => {
654
+ default: r(() => {
641
655
  var e;
642
656
  return [
643
- C.showExport ? (r(), z(M, {
657
+ C.showExport ? (c(), z(b, {
644
658
  key: 0,
645
- onClick: y[0] || (y[0] = (i) => {
646
- var c;
647
- return p.$emit("exportModel", (c = d.selectedModel) == null ? void 0 : c.id);
659
+ onClick: y[0] || (y[0] = (o) => {
660
+ var f;
661
+ return p.$emit("exportModel", (f = s.selectedModel) == null ? void 0 : f.id);
648
662
  })
649
663
  }, {
650
- default: u(() => [...y[2] || (y[2] = [
664
+ default: r(() => [...y[2] || (y[2] = [
651
665
  A("导出SQL", -1)
652
666
  ])]),
653
667
  _: 1
654
668
  })) : F("", !0),
655
- t(M, {
669
+ t(b, {
656
670
  type: "primary",
657
- onClick: d.saveModel
671
+ onClick: s.saveModel
658
672
  }, {
659
- default: u(() => [...y[3] || (y[3] = [
673
+ default: r(() => [...y[3] || (y[3] = [
660
674
  A("保存", -1)
661
675
  ])]),
662
676
  _: 1
663
677
  }, 8, ["onClick"]),
664
- (e = d.selectedModel) != null && e.id ? (r(), z(h, {
678
+ (e = s.selectedModel) != null && e.id ? (c(), z(h, {
665
679
  key: 1,
666
680
  name: "delete",
667
- onClick: d.deleteModel
681
+ onClick: s.deleteModel
668
682
  }, null, 8, ["onClick"])) : F("", !0),
669
683
  t(h, {
670
684
  name: "close",
671
- onClick: d.closeModelSettingPanel
685
+ onClick: s.closeModelSettingPanel
672
686
  }, null, 8, ["onClick"])
673
687
  ];
674
688
  }),
675
689
  _: 1
676
690
  })
677
691
  ]),
678
- content: u(() => [
679
- t(s, {
680
- modelValue: d.activeName,
681
- "onUpdate:modelValue": y[1] || (y[1] = (e) => d.activeName = e),
692
+ content: r(() => [
693
+ t(w, {
694
+ modelValue: s.activeName,
695
+ "onUpdate:modelValue": y[1] || (y[1] = (e) => s.activeName = e),
682
696
  class: "page-setting-collapse"
683
697
  }, {
684
- default: u(() => [
685
- t($, {
698
+ default: r(() => [
699
+ t(k, {
686
700
  title: "基本设置",
687
701
  name: "general"
688
702
  }, {
689
- default: u(() => [
690
- t(b, {
703
+ default: r(() => [
704
+ t(E, {
691
705
  ref: "modelBasicFormRef",
692
- model: d.selectedModel
706
+ model: s.selectedModel
693
707
  }, null, 8, ["model"])
694
708
  ]),
695
709
  _: 1
696
710
  }),
697
- t($, {
711
+ t(k, {
698
712
  class: "base-setting",
699
713
  title: "字段管理",
700
714
  name: "fields"
701
715
  }, {
702
- default: u(() => [
703
- t(I, {
716
+ default: r(() => [
717
+ t($, {
704
718
  ref: "fieldManagerRef",
705
- model: d.selectedModel,
706
- "expand-config": d.expandConfig,
719
+ model: s.selectedModel,
720
+ "expand-config": s.expandConfig,
707
721
  "available-models": C.models,
708
- onAddField: d.handleAddField,
709
- onInsertEnumAfter: d.insertEnumValueAfter,
710
- onRemoveEnum: d.removeEnumValue
722
+ onAddField: s.handleAddField,
723
+ onInsertEnumAfter: s.insertEnumValueAfter,
724
+ onRemoveEnum: s.removeEnumValue
711
725
  }, null, 8, ["model", "expand-config", "available-models", "onAddField", "onInsertEnumAfter", "onRemoveEnum"])
712
726
  ]),
713
727
  _: 1
@@ -719,7 +733,7 @@ function sl(p, y, C, d, m, R) {
719
733
  _: 1
720
734
  }, 8, ["fixed-name", "align"])) : F("", !0);
721
735
  }
722
- const ul = /* @__PURE__ */ H(il, [["render", sl], ["__scopeId", "data-v-75eb0773"]]), rl = { class: "plugin-modelmanager" }, cl = {
736
+ const ul = /* @__PURE__ */ j(sl, [["render", dl], ["__scopeId", "data-v-6c838220"]]), rl = { class: "plugin-modelmanager" }, cl = {
723
737
  class: "model-manager-search",
724
738
  clearable: "",
725
739
  placeholder: "搜索"
@@ -736,21 +750,21 @@ const ul = /* @__PURE__ */ H(il, [["render", sl], ["__scopeId", "data-v-75eb0773
736
750
  },
737
751
  emits: ["close"],
738
752
  setup(p, { emit: y }) {
739
- const C = y, { PLUGIN_NAME: d } = oe(), { VITE_ORIGIN: m } = Me(), R = _e(), M = k(null), h = k([]), _ = k(""), b = k(!1), $ = ie({
753
+ const C = y, { PLUGIN_NAME: s } = oe(), { VITE_ORIGIN: m } = be(), R = _e(), b = M(null), h = M([]), _ = M(""), E = M(!1), k = se({
740
754
  emitEvent: C
741
755
  });
742
- se("panelState", $);
743
- const I = ae(() => _.value ? h.value.filter(
744
- (n) => (n.nameCn || "").toLowerCase().includes(_.value.toLowerCase()) || (n.description || "").toLowerCase().includes(_.value.toLowerCase())
745
- ) : h.value), s = () => {
746
- C("close"), j();
747
- }, E = (n) => {
748
- var f;
749
- ((f = n.parameters) == null ? void 0 : f.length) > 0 && n.parameters.forEach((x) => {
756
+ de("panelState", k);
757
+ const $ = ne(() => _.value ? h.value.filter(
758
+ (i) => (i.nameCn || "").toLowerCase().includes(_.value.toLowerCase()) || (i.description || "").toLowerCase().includes(_.value.toLowerCase())
759
+ ) : h.value), w = () => {
760
+ C("close"), G();
761
+ }, u = (i) => {
762
+ var d;
763
+ ((d = i.parameters) == null ? void 0 : d.length) > 0 && i.parameters.forEach((x) => {
750
764
  x.isModel = !1, x.type === "Enum" && (x.options = typeof x.options == "string" ? JSON.parse(x.options) : x.options || []), x.type === "ModelRef" && (x.isModel = !0, x.defaultValue = Number(x.defaultValue));
751
- }), M.value = n, te();
765
+ }), b.value = i, te();
752
766
  }, e = () => {
753
- M.value = {
767
+ b.value = {
754
768
  id: null,
755
769
  nameCn: "",
756
770
  nameEn: "",
@@ -758,46 +772,46 @@ const ul = /* @__PURE__ */ H(il, [["render", sl], ["__scopeId", "data-v-75eb0773
758
772
  description: "",
759
773
  parameters: []
760
774
  }, te();
761
- }, i = async (n) => {
775
+ }, o = async (i) => {
762
776
  var x;
763
- const f = n.nameCn || n.nameEn || n.id;
777
+ const d = i.nameCn || i.nameEn || i.id;
764
778
  try {
765
779
  const V = await ye.confirm({
766
780
  title: "提示",
767
- message: `确认删除模型「${f}」吗?该操作不可恢复。`
781
+ message: `确认删除模型「${d}」吗?该操作不可恢复。`
768
782
  });
769
783
  if (!(V === "confirm" || (V == null ? void 0 : V.action) === "confirm" || V === !0 || V === void 0)) return;
770
- await al(n.id);
771
- const L = h.value.findIndex((de) => de.id === n.id);
772
- L > -1 && (h.value.splice(L, 1), ((x = M.value) == null ? void 0 : x.id) === n.id && (M.value = null));
784
+ await nl(i.id);
785
+ const O = h.value.findIndex((ie) => ie.id === i.id);
786
+ O > -1 && (h.value.splice(O, 1), ((x = b.value) == null ? void 0 : x.id) === i.id && (b.value = null));
773
787
  } catch {
774
788
  }
775
- }, c = async () => {
776
- const n = await ll({
789
+ }, f = async () => {
790
+ const i = await ll({
777
791
  currentPage: 1,
778
792
  pageSize: 500
779
793
  });
780
- h.value = n.records || [];
781
- }, l = async (n) => {
782
- var L;
783
- const f = n ? await dl(n) : await ol(), x = new Blob([f], { type: "text/sql" }), V = URL.createObjectURL(x), S = document.createElement("a");
784
- S.href = V, S.download = `${n ? (L = M.value) == null ? void 0 : L.nameEn : "models"}.sql`, document.body.appendChild(S), S.click(), document.body.removeChild(S), URL.revokeObjectURL(V);
794
+ h.value = i.records || [];
795
+ }, l = async (i) => {
796
+ var O;
797
+ const d = i ? await il(i) : await ol(), x = new Blob([d], { type: "text/sql" }), V = URL.createObjectURL(x), U = document.createElement("a");
798
+ U.href = V, U.download = `${i ? (O = b.value) == null ? void 0 : O.nameEn : "models"}.sql`, document.body.appendChild(U), U.click(), document.body.removeChild(U), URL.revokeObjectURL(V);
785
799
  }, a = async () => {
786
- await c(), M.value = null, j();
800
+ await f(), b.value = null, G();
787
801
  };
788
802
  return ue(async () => {
789
- await c();
790
- }), (n, f) => {
791
- const x = U("svg-icon");
792
- return r(), v("div", rl, [
793
- t(o(Ce), {
803
+ await f();
804
+ }), (i, d) => {
805
+ const x = S("svg-icon");
806
+ return c(), v("div", rl, [
807
+ t(n(Ce), {
794
808
  title: p.title,
795
- "fixed-name": o(d).ModelManager,
809
+ "fixed-name": n(s).ModelManager,
796
810
  fixedPanels: p.fixedPanels,
797
- onClose: s
811
+ onClose: w
798
812
  }, {
799
- header: u(() => [
800
- b.value ? (r(), z(o(X), {
813
+ header: r(() => [
814
+ E.value ? (c(), z(n(X), {
801
815
  key: 0,
802
816
  class: "flow-download-icon",
803
817
  name: "flow-download",
@@ -806,34 +820,34 @@ const ul = /* @__PURE__ */ H(il, [["render", sl], ["__scopeId", "data-v-75eb0773
806
820
  onClick: l
807
821
  })) : F("", !0)
808
822
  ]),
809
- content: u(() => [
810
- t(o(K), {
823
+ content: r(() => [
824
+ t(n(J), {
811
825
  class: "add-model",
812
826
  onClick: e
813
827
  }, {
814
- default: u(() => [
828
+ default: r(() => [
815
829
  t(x, { name: "add" }),
816
- f[1] || (f[1] = A("新建模型 ", -1))
830
+ d[1] || (d[1] = A("新建模型 ", -1))
817
831
  ]),
818
832
  _: 1
819
833
  }),
820
834
  g("div", cl, [
821
- t(o(ge), {
835
+ t(n(ge), {
822
836
  modelValue: _.value,
823
- "onUpdate:modelValue": f[0] || (f[0] = (V) => _.value = V)
837
+ "onUpdate:modelValue": d[0] || (d[0] = (V) => _.value = V)
824
838
  }, {
825
- prefix: u(() => [
826
- t(o(R))
839
+ prefix: r(() => [
840
+ t(n(R))
827
841
  ]),
828
842
  _: 1
829
843
  }, 8, ["modelValue"])
830
844
  ]),
831
845
  g("div", pl, [
832
- h.value.length ? (r(!0), v(P, { key: 0 }, J(I.value, (V) => {
833
- var S;
834
- return r(), v("div", {
846
+ h.value.length ? (c(!0), v(P, { key: 0 }, H($.value, (V) => {
847
+ var U;
848
+ return c(), v("div", {
835
849
  key: V.id,
836
- class: re(["model-item", { active: ((S = M.value) == null ? void 0 : S.id) === V.id }])
850
+ class: re(["model-item", { active: ((U = b.value) == null ? void 0 : U.id) === V.id }])
837
851
  }, [
838
852
  g("div", ml, [
839
853
  g("div", fl, [
@@ -841,21 +855,21 @@ const ul = /* @__PURE__ */ H(il, [["render", sl], ["__scopeId", "data-v-75eb0773
841
855
  name: "plugin-icon-modelmanager",
842
856
  class: "plugin-icon-modelmanager"
843
857
  }),
844
- A(" " + q(V.nameCn), 1)
858
+ A(" " + L(V.nameCn), 1)
845
859
  ]),
846
860
  g("div", vl, [
847
- t(o(X), {
861
+ t(n(X), {
848
862
  class: "set-page",
849
863
  hoverBgColor: !1,
850
864
  tips: "设置模型",
851
865
  name: "setting",
852
- onMousedown: Q((L) => E(V), ["stop", "prevent"])
866
+ onMousedown: Q((O) => u(V), ["stop", "prevent"])
853
867
  }, null, 8, ["onMousedown"])
854
868
  ])
855
869
  ])
856
870
  ], 2);
857
871
  }), 128)) : F("", !0),
858
- t(o(Ve), {
872
+ t(n(Ve), {
859
873
  isShow: !h.value.length
860
874
  }, null, 8, ["isShow"])
861
875
  ])
@@ -863,27 +877,27 @@ const ul = /* @__PURE__ */ H(il, [["render", sl], ["__scopeId", "data-v-75eb0773
863
877
  _: 1
864
878
  }, 8, ["title", "fixed-name", "fixedPanels"]),
865
879
  t(ul, {
866
- model: M.value,
880
+ model: b.value,
867
881
  models: h.value,
868
- showExport: b.value,
869
- onDeleteCallback: i,
882
+ showExport: E.value,
883
+ onDeleteCallback: o,
870
884
  onEditCallback: a,
871
885
  onExportModel: l
872
886
  }, null, 8, ["model", "models", "showExport"])
873
887
  ]);
874
888
  };
875
889
  }
876
- }, yl = /* @__PURE__ */ H(gl, [["__scopeId", "data-v-d102b73c"]]), _l = {
890
+ }, yl = /* @__PURE__ */ j(gl, [["__scopeId", "data-v-d102b73c"]]), _l = {
877
891
  id: "engine.plugins.modelmanager",
878
892
  title: "模型管理",
879
893
  type: "plugins",
880
894
  width: 280,
881
895
  icon: "plugin-icon-modelmanager"
882
- }, El = {
896
+ }, Ml = {
883
897
  ..._l,
884
898
  entry: yl
885
899
  };
886
900
  export {
887
- El as default
901
+ Ml as default
888
902
  };
889
903
  //# sourceMappingURL=index.js.map