@web-utils/form-ui 1.0.0-beta36 → 1.0.0-beta38

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 (103) hide show
  1. package/chunks/{BLWwTutr.mjs → B3ajWLh3.mjs} +15 -33
  2. package/chunks/{Cr1vBYne.mjs → BH_JJ8Xh.mjs} +15 -15
  3. package/chunks/{DistOy_O.mjs → BWBHzD5N.mjs} +28 -19
  4. package/chunks/{DQJyNm1V.mjs → Bd1UFJic.mjs} +135 -131
  5. package/chunks/{DcbnHU8K.mjs → BsCS7SB5.mjs} +19 -23
  6. package/chunks/{BTS_zTkz.mjs → BufIRDd0.mjs} +35 -39
  7. package/chunks/C1AgOUe_.mjs +172 -0
  8. package/chunks/C3Uo82-I.mjs +35 -0
  9. package/chunks/C9dGL28n.mjs +56 -0
  10. package/chunks/{A3sHIRQ_.mjs → CFOGMFgo.mjs} +22 -45
  11. package/chunks/{ZXCLnZFa.mjs → CLPSCSsy.mjs} +111 -144
  12. package/chunks/{D7hD-ppq.mjs → CSyJ-vEx.mjs} +1 -1
  13. package/chunks/CTKmEf2M.mjs +93 -0
  14. package/chunks/{DFsI7Y6h.mjs → CXvGoZKJ.mjs} +12 -11
  15. package/chunks/{Dgyjc3LT.mjs → Cab-ZjRx.mjs} +29 -45
  16. package/chunks/Cj59E77g.mjs +230 -0
  17. package/chunks/Cj5h2Wda.mjs +32 -0
  18. package/chunks/{iWQD3xvX.mjs → CqTcEefA.mjs} +14 -16
  19. package/chunks/{axr9InkL.mjs → Ct5bDJ50.mjs} +9 -13
  20. package/chunks/{D5_ctQqL.mjs → CuG2Q-PM.mjs} +2 -2
  21. package/chunks/{CLn0r4lV.mjs → D8UVq1t1.mjs} +16 -17
  22. package/chunks/{BYAy19s4.mjs → DJe97Fgi.mjs} +2 -8
  23. package/chunks/{Buc52aVh.mjs → DXYgAmil.mjs} +12 -29
  24. package/chunks/{DQxPzCsy.mjs → DhtHh0jk.mjs} +14 -15
  25. package/chunks/{CGJkMYZ4.mjs → DiJyms_r.mjs} +12 -20
  26. package/chunks/{1cDNhlSV.mjs → TvNHGVAP.mjs} +2 -2
  27. package/chunks/{CNskrN5I.mjs → XCGWTz41.mjs} +2 -2
  28. package/chunks/{DQKi5eEl.mjs → XqRTtFfp.mjs} +2 -2
  29. package/chunks/{BX-cVxlK.mjs → cmuHpsX6.mjs} +21 -14
  30. package/chunks/{DJKE5P39.mjs → o6VhYAN52.mjs} +2 -2
  31. package/chunks/{BwdWZEjT.mjs → pdwFQpA8.mjs} +13 -18
  32. package/chunks/{_dm2lLNL.mjs → taicx2sd.mjs} +2 -2
  33. package/constants/index.d.ts +16 -5
  34. package/editable-tree/index.d.ts +1 -1
  35. package/editable-tree/index.mjs +1 -1
  36. package/element-dialog/index.d.ts +1 -1
  37. package/element-dialog/index.mjs +1 -1
  38. package/form-card/index.d.ts +14 -0
  39. package/form-card/index.mjs +18 -0
  40. package/form-cascader/index.d.ts +0 -14
  41. package/form-cascader/index.mjs +1 -1
  42. package/form-check-box-group/index.d.ts +0 -2
  43. package/form-check-box-group/index.mjs +1 -1
  44. package/form-checkbox/index.d.ts +36 -10
  45. package/form-checkbox/index.mjs +1 -1
  46. package/form-date-picker/index.mjs +1 -1
  47. package/form-holder/index.d.ts +2 -6
  48. package/form-holder/index.mjs +1 -1
  49. package/form-image/index.d.ts +2 -14
  50. package/form-image/index.mjs +1 -1
  51. package/form-input/index.d.ts +9 -26
  52. package/form-input/index.mjs +1 -1
  53. package/form-input-cron-expression/index.mjs +1 -1
  54. package/form-input-email/index.d.ts +9 -2
  55. package/form-input-email/index.mjs +1 -1
  56. package/form-input-id-card/index.d.ts +9 -2
  57. package/form-input-id-card/index.mjs +1 -1
  58. package/form-input-number/index.d.ts +0 -6
  59. package/form-input-number/index.mjs +1 -1
  60. package/form-input-phone-number/index.d.ts +9 -2
  61. package/form-input-phone-number/index.mjs +1 -1
  62. package/form-input-tag/index.d.ts +263 -1
  63. package/form-input-tag/index.mjs +1 -3
  64. package/form-input-time/index.d.ts +434 -1
  65. package/form-input-time/index.mjs +1 -3
  66. package/form-item-group/index.mjs +1 -1
  67. package/form-item-x/index.mjs +1 -1
  68. package/form-radio-group/index.d.ts +0 -2
  69. package/form-radio-group/index.mjs +1 -1
  70. package/form-rate/index.d.ts +0 -2
  71. package/form-rate/index.mjs +1 -1
  72. package/form-row/index.mjs +1 -1
  73. package/form-select/index.d.ts +0 -14
  74. package/form-select/index.mjs +1 -1
  75. package/form-slider/index.d.ts +1 -5
  76. package/form-slider/index.mjs +1 -1
  77. package/form-switch/index.d.ts +0 -2
  78. package/form-switch/index.mjs +1 -1
  79. package/form-text/index.mjs +1 -1
  80. package/form-textarea/index.d.ts +370 -0
  81. package/form-textarea/index.mjs +2 -0
  82. package/form-time-select/index.d.ts +319 -0
  83. package/form-time-select/index.mjs +2 -0
  84. package/helper/dictionary.mjs +1 -1
  85. package/iframe-window/index.mjs +1 -1
  86. package/index.d.ts +4 -1
  87. package/index.mjs +46 -43
  88. package/package.json +1 -1
  89. package/pageable-table/index.d.ts +0 -38
  90. package/pageable-table/index.mjs +1 -1
  91. package/table-column/index.mjs +1 -1
  92. package/table-column-def/index.mjs +1 -1
  93. package/table-view/index.mjs +6 -6
  94. package/toolbar/index.mjs +1 -1
  95. package/toolbar-button/index.mjs +1 -1
  96. package/web-types.json +1 -1
  97. package/x-input-tag/index.mjs +4 -3
  98. package/year-calendar/index.mjs +1 -1
  99. package/chunks/BLRY0zkF.mjs +0 -51
  100. package/chunks/BvsmTC3G.mjs +0 -229
  101. /package/chunks/{CnAEuI_c.mjs → ChmDDqoZ2.mjs} +0 -0
  102. /package/chunks/{BW6iY7Q7.mjs → DDmQcNm6.mjs} +0 -0
  103. /package/chunks/{DiE4GJtU.mjs → Ds_Tpa_M.mjs} +0 -0
@@ -1,14 +1,14 @@
1
- import { d as e, t, u as n } from "./BX-cVxlK.mjs";
2
- import { t as r } from "./DQKi5eEl.mjs";
3
- import { t as i } from "./B1MSrc6f.mjs";
4
- import { computePosition as a, delay as o, fastClone as s, findTreeChildren as c, hasOwn as l, isFunction as u, isNotEmpty as d, isPlainObject as f, isUndefined as p, isVerticalScrollbarVisible as m, patch as h, scrollbarWidth as g } from "@web-utils/core";
5
- import { Fragment as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createTextVNode as S, createVNode as C, mergeProps as w, normalizeClass as T, normalizeStyle as E, openBlock as D, renderSlot as O, toDisplayString as k, toHandlers as A, vShow as j, withCtx as M, withDirectives as N, withModifiers as P } from "vue";
6
- import { ElMessageBox as F } from "element-plus";
7
- import { cloneDeep as I } from "@web-utils/integrations/lodash";
8
- import { ElInput as L, ElPopconfirm as R, ElTree as z } from "element-plus/es";
9
- import { addResizeListener as B, removeResizeListener as V } from "@web-utils/integrations/resize";
1
+ import { t as e, u as t } from "./cmuHpsX6.mjs";
2
+ import { t as n } from "./XqRTtFfp.mjs";
3
+ import { t as r } from "./B1MSrc6f.mjs";
4
+ import { computePosition as i, delay as a, fastClone as o, findTreeChildren as s, hasOwn as c, isFunction as l, isNotEmpty as u, isPlainObject as d, isUndefined as f, isVerticalScrollbarVisible as p, patch as m, scrollbarWidth as h } from "@web-utils/core";
5
+ import { Fragment as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createTextVNode as x, createVNode as S, mergeProps as C, normalizeClass as w, normalizeStyle as T, openBlock as E, renderSlot as D, toDisplayString as O, toHandlers as k, vShow as A, withCtx as j, withDirectives as M, withModifiers as N } from "vue";
6
+ import { ElMessageBox as P } from "element-plus";
7
+ import { cloneDeep as F } from "@web-utils/integrations/lodash";
8
+ import { ElInput as I, ElPopconfirm as L, ElTree as R } from "element-plus/es";
9
+ import { addResizeListener as z, removeResizeListener as B } from "@web-utils/integrations/resize";
10
10
  //#region src/components/form/props/tree.ts
11
- var H = {
11
+ var V = {
12
12
  label: {
13
13
  type: String,
14
14
  default: "书签"
@@ -48,7 +48,7 @@ var H = {
48
48
  default: () => ({
49
49
  children: "children",
50
50
  label: "name",
51
- isLeaf: (e) => l(e, "hasChildren") ? !e.hasChildren : l(e, "hasChild") ? !e.hasChild : l(e, "children") && e.children ? e.children.length === 0 : !0
51
+ isLeaf: (e) => c(e, "hasChildren") ? !e.hasChildren : c(e, "hasChild") ? !e.hasChild : c(e, "children") && e.children ? e.children.length === 0 : !0
52
52
  })
53
53
  },
54
54
  menuLabel: {
@@ -78,9 +78,9 @@ var H = {
78
78
  default: "id"
79
79
  },
80
80
  defaultExpandAll: Boolean
81
- }, U = { icon: !0 }, W = (e) => U[e] !== !0, G = {
81
+ }, H = { icon: !0 }, U = (e) => H[e] !== !0, W = {
82
82
  name: "EditableTree",
83
- props: { ...H },
83
+ props: { ...V },
84
84
  emits: {
85
85
  "remove-new-node": null,
86
86
  "node-loaded": null,
@@ -130,20 +130,24 @@ var H = {
130
130
  this.expandedKeys = [...e];
131
131
  }
132
132
  } },
133
- setup(t) {
133
+ setup(e) {
134
+ let { autoBindProps: n, listeners: r } = t(e, {
135
+ predicate: U,
136
+ removeOn: !0
137
+ });
134
138
  return {
135
- autoBind: n(t, { predicate: W }),
136
- listeners: e({ removeOn: !0 })
139
+ autoBindProps: n,
140
+ listeners: r
137
141
  };
138
142
  },
139
143
  created() {
140
144
  this.tryFetch();
141
145
  },
142
146
  mounted() {
143
- B(this.$refs.tree.$el, this.resize), B(this.$refs.treeWrapper, this.resize);
147
+ z(this.$refs.tree.$el, this.resize), z(this.$refs.treeWrapper, this.resize);
144
148
  },
145
149
  beforeUnmount() {
146
- V(this.$refs.tree.$el, this.resize), V(this.$refs.treeWrapper, this.resize);
150
+ B(this.$refs.tree.$el, this.resize), B(this.$refs.treeWrapper, this.resize);
147
151
  },
148
152
  methods: {
149
153
  addExpandKey(e) {
@@ -153,10 +157,10 @@ var H = {
153
157
  this.reserveExpandKey && (this.expandedKeys = this.expandedKeys.filter((t) => t !== e[this.nodeKey]));
154
158
  },
155
159
  resize() {
156
- m(this.$refs.treeWrapper) ? this.right = 4 + g : this.right = 4;
160
+ p(this.$refs.treeWrapper) ? this.right = 4 + h : this.right = 4;
157
161
  },
158
162
  async showContextMenu(e, t, n) {
159
- t.contextmenu === !1 || t.id === -1 || t.id === 0 || t.edit === !0 || this.readonly || this.contextMenu && (this.curNode = n, this.curData = t, this.showMenu = !0, this.$refs.tree.setCurrentKey(t.id), await this.$nextTick(), this.position = a(e, this.$refs.contextMenu), window.addEventListener("click", this.hideContextMenu));
163
+ t.contextmenu === !1 || t.id === -1 || t.id === 0 || t.edit === !0 || this.readonly || this.contextMenu && (this.curNode = n, this.curData = t, this.showMenu = !0, this.$refs.tree.setCurrentKey(t.id), await this.$nextTick(), this.position = i(e, this.$refs.contextMenu), window.addEventListener("click", this.hideContextMenu));
160
164
  },
161
165
  hideContextMenu() {
162
166
  this.showMenu = !1, window.removeEventListener("click", this.hideContextMenu);
@@ -172,14 +176,14 @@ var H = {
172
176
  return;
173
177
  }
174
178
  let i = r.data.data;
175
- f(i) && (i = [i]), i = i || [];
179
+ d(i) && (i = [i]), i = i || [];
176
180
  let a = [];
177
- if (this.empty = i.length === 0, f(this.customRootNode)) {
178
- let e = I(this.customRootNode);
181
+ if (this.empty = i.length === 0, d(this.customRootNode)) {
182
+ let e = F(this.customRootNode);
179
183
  e[this.treeProps.children || "children"] = i, a = [e];
180
- } else if (u(this.customRootNode)) {
184
+ } else if (l(this.customRootNode)) {
181
185
  let e = this.customRootNode(i);
182
- e[this.treeProps.children || "children"] = i, a = f(e) ? [e] : e;
186
+ e[this.treeProps.children || "children"] = i, a = d(e) ? [e] : e;
183
187
  } else a = i;
184
188
  if ((e = this.defaultExpandedKeys) != null && e.length) this.expandedKeys = [...this.defaultExpandedKeys];
185
189
  else if (this.expandFirstNode) {
@@ -193,12 +197,12 @@ var H = {
193
197
  if (e.level === 0) {
194
198
  var n, r;
195
199
  let o = (await this.fetchApi(((n = this.rootNode) == null ? void 0 : n.id) ?? -1, e)).data.data;
196
- if (this.empty = o.length === 0, f(this.customRootNode)) {
197
- let e = I(this.customRootNode);
200
+ if (this.empty = o.length === 0, d(this.customRootNode)) {
201
+ let e = F(this.customRootNode);
198
202
  e[this.treeProps.children || "children"] = o, o = [e], t(o);
199
- } else if (u(this.customRootNode)) {
203
+ } else if (l(this.customRootNode)) {
200
204
  let e = this.customRootNode(o);
201
- e[this.treeProps.children || "children"] = o, o = f(e) ? [e] : e;
205
+ e[this.treeProps.children || "children"] = o, o = d(e) ? [e] : e;
202
206
  } else t(o);
203
207
  if (await this.$nextTick(), this.$emit("root-node-loaded", o), (r = this.defaultExpandedKeys) != null && r.length) {
204
208
  var i;
@@ -223,10 +227,10 @@ var H = {
223
227
  this.newChild && this.newChild.id === -1 && (this.$refs.tree.remove(this.newChild), this.$emit("remove-new-node"));
224
228
  },
225
229
  cancelEdit() {
226
- this.editData && (p(this.editData.edit) ? this.editData.edit = !0 : this.editData.edit = !1);
230
+ this.editData && (f(this.editData.edit) ? this.editData.edit = !0 : this.editData.edit = !1);
227
231
  },
228
232
  async editNode(e, t) {
229
- !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.editData = t, this.text = t[this.treeProps.label], p(t.edit), t.edit = !0, await this.$nextTick(), this.$refs.labelTxt.focus()) : await F.prompt(`请输入新的${this.label}名:`, {
233
+ !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.editData = t, this.text = t[this.treeProps.label], f(t.edit), t.edit = !0, await this.$nextTick(), this.$refs.labelTxt.focus()) : await P.prompt(`请输入新的${this.label}名:`, {
230
234
  ...this.defaultOptions,
231
235
  inputValue: t[this.treeProps.label],
232
236
  beforeClose: async (e, t, n) => {
@@ -242,14 +246,14 @@ var H = {
242
246
  }).catch((e) => e);
243
247
  },
244
248
  async appendRootNode() {
245
- this.text = "", !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(void 0), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), await this.scrollIntoView(!0)) : await F.prompt(`请输入${this.label}名:`, {
249
+ this.text = "", !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(void 0), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), await this.scrollIntoView(!0)) : await P.prompt(`请输入${this.label}名:`, {
246
250
  ...this.defaultOptions,
247
- beforeClose: async (e, n, r) => {
248
- if (e === "confirm") {
251
+ beforeClose: async (t, n, r) => {
252
+ if (t === "confirm") {
249
253
  try {
250
254
  this.createNewChild(-1), n.confirmButtonLoading = !0, n.confirmButtonText = "处理中...";
251
- let e = await this.saveApi(this.newNodeBuilder(n.inputValue, { id: -1 }));
252
- this.newChild[this.treeProps.label] = n.inputValue, this.newChild.edit = !1, t(this.newChild, e.data), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), await this.locateView(), r();
255
+ let t = await this.saveApi(this.newNodeBuilder(n.inputValue, { id: -1 }));
256
+ this.newChild[this.treeProps.label] = n.inputValue, this.newChild.edit = !1, e(this.newChild, t.data), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), await this.locateView(), r();
253
257
  } catch {
254
258
  n.confirmButtonText = "确定";
255
259
  }
@@ -258,18 +262,18 @@ var H = {
258
262
  }
259
263
  }).catch((e) => e);
260
264
  },
261
- appendChildNode(e) {
265
+ appendChildNode(t) {
262
266
  this.text = "";
263
- let n = e.expanded;
264
- e.expand(async () => {
265
- !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(e.data.id), this.$refs.tree.append(this.newChild, e), await this.scrollIntoView(n)) : await F.prompt(`请输入${this.label}名:`, {
267
+ let n = t.expanded;
268
+ t.expand(async () => {
269
+ !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(t.data.id), this.$refs.tree.append(this.newChild, t), await this.scrollIntoView(n)) : await P.prompt(`请输入${this.label}名:`, {
266
270
  ...this.defaultOptions,
267
271
  beforeClose: async (n, r, i) => {
268
272
  if (n === "confirm") {
269
273
  try {
270
- this.createNewChild(e.data.id), r.confirmButtonLoading = !0, r.confirmButtonText = "处理中...";
271
- let n = await this.saveApi(this.newNodeBuilder(r.inputValue, e.data));
272
- this.newChild[this.treeProps.label] = r.inputValue, this.newChild.edit = !1, t(this.newChild, n.data), this.$refs.tree.append(this.newChild, e), await this.locateView(), i();
274
+ this.createNewChild(t.data.id), r.confirmButtonLoading = !0, r.confirmButtonText = "处理中...";
275
+ let n = await this.saveApi(this.newNodeBuilder(r.inputValue, t.data));
276
+ this.newChild[this.treeProps.label] = r.inputValue, this.newChild.edit = !1, e(this.newChild, n.data), this.$refs.tree.append(this.newChild, t), await this.locateView(), i();
273
277
  } catch {
274
278
  r.confirmButtonText = "确定";
275
279
  }
@@ -311,7 +315,7 @@ var H = {
311
315
  },
312
316
  updateNode(e) {
313
317
  let t = this.$refs.tree.getNode(e);
314
- t && h(t.data, e, !0);
318
+ t && m(t.data, e, !0);
315
319
  },
316
320
  setCurrentKey(e) {
317
321
  var t;
@@ -357,24 +361,24 @@ var H = {
357
361
  } else this.$refs.tree.remove(e);
358
362
  } catch {}
359
363
  },
360
- async onConfirm(e, n) {
361
- if (n[this.treeProps.label] === this.text || !d(this.text)) {
364
+ async onConfirm(t, n) {
365
+ if (n[this.treeProps.label] === this.text || !u(this.text)) {
362
366
  this.clear();
363
367
  return;
364
368
  }
365
- p(n.loading), n.loading = !0;
369
+ f(n.loading), n.loading = !0;
366
370
  try {
367
371
  if (this.loading = !0, n.id === -1) {
368
- let r = await this.saveApi(this.newNodeBuilder(this.text, e.parent.data || { id: -1 })), i = s(n);
369
- t(n, {
372
+ let r = await this.saveApi(this.newNodeBuilder(this.text, t.parent.data || { id: -1 })), i = o(n);
373
+ e(n, {
370
374
  ...r.data,
371
375
  isTempNode: !1
372
- }), this.$emit("node-added", n, i, e), this.registerNode(e);
376
+ }), this.$emit("node-added", n, i, t), this.registerNode(t);
373
377
  } else await this.updateApi({
374
378
  ...n,
375
379
  [this.treeProps.label]: this.text
376
380
  });
377
- n[this.treeProps.label] = this.text, n.edit = !1, this.$emit("node-updated", n, e), this.text = "";
381
+ n[this.treeProps.label] = this.text, n.edit = !1, this.$emit("node-updated", n, t), this.text = "";
378
382
  } catch {}
379
383
  n.loading = !1, this.loading = !1;
380
384
  },
@@ -382,7 +386,7 @@ var H = {
382
386
  t.id === -1 ? this.$refs.tree.remove(e) : t.edit = !1, this.text = "";
383
387
  },
384
388
  nodeClick(e, t, n) {
385
- this.hideContextMenu(), (p(e.loading) || !e.loading) && (this.curNode = t, this.curData = e, this.$emit("on-node-click", e, t, n));
389
+ this.hideContextMenu(), (f(e.loading) || !e.loading) && (this.curNode = t, this.curData = e, this.$emit("on-node-click", e, t, n));
386
390
  },
387
391
  getCurrentNode() {
388
392
  return this.$refs.tree.getCurrentNode();
@@ -394,7 +398,7 @@ var H = {
394
398
  },
395
399
  async scrollIntoView(e) {
396
400
  var t;
397
- await this.$nextTick(), e || await o(300), (t = this.$refs) == null || (t = t.labelTxt) == null || t.focus();
401
+ await this.$nextTick(), e || await a(300), (t = this.$refs) == null || (t = t.labelTxt) == null || t.focus();
398
402
  },
399
403
  inputKeyup(e, t, n) {
400
404
  e.keyCode === 13 && this.onConfirm(t, n), e.keyCode === 27 && this.clear();
@@ -421,7 +425,7 @@ var H = {
421
425
  return this.$refs.tree.root;
422
426
  },
423
427
  findTreeNode(e) {
424
- return c(this.$refs.tree.root.childNodes, (t) => t.data === e || t.data.id === e, "childNodes");
428
+ return s(this.$refs.tree.root.childNodes, (t) => t.data === e || t.data.id === e, "childNodes");
425
429
  },
426
430
  registerNode(e) {
427
431
  e.store.registerNode(e), delete e.store.nodesMap[-1];
@@ -430,32 +434,32 @@ var H = {
430
434
  this.lazy ? this.treeKey = Date.now() : await this.tryFetch();
431
435
  }
432
436
  }
433
- }, K = { class: "editable-tree" }, q = {
437
+ }, G = { class: "editable-tree" }, K = {
434
438
  ref: "treeWrapper",
435
439
  class: "et-tree-wrapper"
436
- }, J = {
440
+ }, q = {
437
441
  key: 0,
438
442
  style: { "padding-left": "24px" }
439
- }, Y = ["data-id"], X = {
443
+ }, J = ["data-id"], Y = {
440
444
  class: "node-label flex-row flex-item ellipsis-1",
441
445
  style: { overflow: "hidden" }
442
- }, Z = {
446
+ }, X = {
443
447
  class: "flex-item-relative",
444
448
  style: { height: "21px" }
445
- }, Q = ["title"], $ = {
449
+ }, Z = ["title"], Q = {
446
450
  key: 0,
447
451
  class: "handle-actions"
448
- }, ee = {
452
+ }, $ = {
449
453
  key: 1,
450
454
  class: "handle-actions",
451
455
  style: { display: "inline-block" }
452
- }, te = ["data-id"], ne = { class: "menu-list" };
453
- function re(e, t, n, i, a, o) {
454
- let s = r, c = R, l = L, u = z;
455
- return D(), b("div", K, [!e.readonly && e.addRootNodeButtonStyle === "top-right" ? (D(), v(s, {
456
+ }, ee = ["data-id"], te = { class: "menu-list" };
457
+ function ne(e, t, r, i, a, o) {
458
+ let s = n, c = L, l = I, u = R;
459
+ return E(), y("div", G, [!e.readonly && e.addRootNodeButtonStyle === "top-right" ? (E(), _(s, {
456
460
  key: 0,
457
461
  type: "primary",
458
- style: E([{
462
+ style: T([{
459
463
  position: "absolute",
460
464
  top: "4px",
461
465
  "z-index": "1"
@@ -463,17 +467,17 @@ function re(e, t, n, i, a, o) {
463
467
  icon: "el-icon-plus",
464
468
  circle: "",
465
469
  plain: "",
466
- onClick: t[0] || (t[0] = P((t) => e.$emit("add-root-node"), ["stop"]))
467
- }, null, 8, ["style"])) : y("v-if", !0), x("div", q, [
468
- !e.readonly && e.addRootNodeButtonStyle === "top" ? (D(), b("div", J, [C(s, {
470
+ onClick: t[0] || (t[0] = N((t) => e.$emit("add-root-node"), ["stop"]))
471
+ }, null, 8, ["style"])) : v("v-if", !0), b("div", K, [
472
+ !e.readonly && e.addRootNodeButtonStyle === "top" ? (E(), y("div", q, [S(s, {
469
473
  disabled: a.loading,
470
474
  type: "text",
471
475
  onClick: o.appendRootNode
472
476
  }, {
473
- default: M(() => [t[8] || (t[8] = x("i", { class: "el-icon-lx-add" }, null, -1)), S(" " + k(e.addRootNodeLabel ? e.addRootNodeLabel : `添加${e.label}`), 1)]),
477
+ default: j(() => [t[8] || (t[8] = b("i", { class: "el-icon-lx-add" }, null, -1)), x(" " + O(e.addRootNodeLabel ? e.addRootNodeLabel : `添加${e.label}`), 1)]),
474
478
  _: 1
475
- }, 8, ["disabled", "onClick"])])) : y("v-if", !0),
476
- (D(), v(u, w(i.autoBind, {
479
+ }, 8, ["disabled", "onClick"])])) : v("v-if", !0),
480
+ (E(), _(u, C(i.autoBindProps, {
477
481
  key: a.treeKey,
478
482
  ref: "tree",
479
483
  "default-expand-all": e.defaultExpandAll,
@@ -486,25 +490,25 @@ function re(e, t, n, i, a, o) {
486
490
  props: e.treeProps,
487
491
  lazy: e.lazy,
488
492
  "node-key": e.nodeKey
489
- }, A(i.listeners), {
493
+ }, k(i.listeners), {
490
494
  onNodeClick: o.nodeClick,
491
495
  onNodeContextmenu: o.showContextMenu,
492
496
  onNodeExpand: o.addExpandKey,
493
497
  onNodeCollapse: o.removeExpandKey
494
498
  }), {
495
- default: M(({ node: n, data: r }) => [O(e.$slots, "default", {
499
+ default: j(({ node: n, data: r }) => [D(e.$slots, "default", {
496
500
  node: n,
497
501
  data: r
498
- }, () => [y("非编辑模式"), r.edit ? (D(), b(_, { key: 1 }, [y("编辑模式"), x("span", {
502
+ }, () => [v("非编辑模式"), r.edit ? (E(), y(g, { key: 1 }, [v("编辑模式"), b("span", {
499
503
  "data-id": r.id,
500
504
  class: "custom-tree-node flex-row flex-item",
501
505
  style: { overflow: "hidden" }
502
506
  }, [
503
- e.icon ? (D(), b("i", {
507
+ e.icon ? (E(), y("i", {
504
508
  key: 0,
505
- class: T([r.loading ? "el-icon-loading" : "el-icon-edit-outline", "node-icon flex-not-shrink"])
506
- }, null, 2)) : y("v-if", !0),
507
- C(l, {
509
+ class: w([r.loading ? "el-icon-loading" : "el-icon-edit-outline", "node-icon flex-not-shrink"])
510
+ }, null, 2)) : v("v-if", !0),
511
+ S(l, {
508
512
  ref: "labelTxt",
509
513
  modelValue: a.text,
510
514
  "onUpdate:modelValue": t[2] || (t[2] = (e) => a.text = e),
@@ -512,91 +516,91 @@ function re(e, t, n, i, a, o) {
512
516
  placeholder: o.defaultOptions.inputPlaceholder,
513
517
  onKeyup: (e) => o.inputKeyup(e, n, r),
514
518
  onBlur: (e) => o.inputBlur(e, n, r),
515
- onClick: t[3] || (t[3] = P(() => {}, ["stop"]))
519
+ onClick: t[3] || (t[3] = N(() => {}, ["stop"]))
516
520
  }, null, 8, [
517
521
  "modelValue",
518
522
  "placeholder",
519
523
  "onKeyup",
520
524
  "onBlur"
521
525
  ]),
522
- e.confirmButton ? (D(), b(_, { key: 1 }, [N(C(s, {
526
+ e.confirmButton ? (E(), y(g, { key: 1 }, [M(S(s, {
523
527
  class: "flex-not-shrink",
524
528
  type: "text",
525
- onClick: P((e) => o.onConfirm(n, r), ["stop"])
529
+ onClick: N((e) => o.onConfirm(n, r), ["stop"])
526
530
  }, {
527
- default: M(() => [...t[13] || (t[13] = [S(" 确定 ", -1)])]),
531
+ default: j(() => [...t[13] || (t[13] = [x(" 确定 ", -1)])]),
528
532
  _: 1
529
- }, 8, ["onClick"]), [[j, !r.loading]]), N(C(s, {
533
+ }, 8, ["onClick"]), [[A, !r.loading]]), M(S(s, {
530
534
  class: "flex-not-shrink",
531
535
  type: "text",
532
- onClick: P((e) => o.onCancel(n, r), ["stop"])
536
+ onClick: N((e) => o.onCancel(n, r), ["stop"])
533
537
  }, {
534
- default: M(() => [...t[14] || (t[14] = [S(" 取消 ", -1)])]),
538
+ default: j(() => [...t[14] || (t[14] = [x(" 取消 ", -1)])]),
535
539
  _: 1
536
- }, 8, ["onClick"]), [[j, !r.loading]])], 64)) : y("v-if", !0)
537
- ], 8, te)], 64)) : (D(), b("span", {
540
+ }, 8, ["onClick"]), [[A, !r.loading]])], 64)) : v("v-if", !0)
541
+ ], 8, ee)], 64)) : (E(), y("span", {
538
542
  key: 0,
539
543
  "data-id": r.id,
540
544
  class: "custom-tree-node"
541
545
  }, [
542
- x("span", X, [
543
- e.icon ? (D(), b("i", {
546
+ b("span", Y, [
547
+ e.icon ? (E(), y("i", {
544
548
  key: 0,
545
- class: T([r.loading ? "el-icon-loading" : e.icon(r, n), "node-icon"])
546
- }, null, 2)) : y("v-if", !0),
547
- x("span", Z, [x("span", {
549
+ class: w([r.loading ? "el-icon-loading" : e.icon(r, n), "node-icon"])
550
+ }, null, 2)) : v("v-if", !0),
551
+ b("span", X, [b("span", {
548
552
  class: "ellipsis-1 absolute-box et-tree-label",
549
553
  title: n.label
550
- }, [O(e.$slots, "label", {
554
+ }, [D(e.$slots, "label", {
551
555
  data: r,
552
556
  node: n
553
- }, () => [S(k(n.label), 1)])], 8, Q)]),
554
- O(e.$slots, "label-suffix", {
557
+ }, () => [x(O(n.label), 1)])], 8, Z)]),
558
+ D(e.$slots, "label-suffix", {
555
559
  node: n,
556
560
  data: r
557
561
  })
558
562
  ]),
559
- !e.contextMenu && !e.readonly ? N((D(), b("span", $, [
560
- C(s, {
563
+ !e.contextMenu && !e.readonly ? M((E(), y("span", Q, [
564
+ S(s, {
561
565
  type: "text",
562
- onClick: P((e) => o.appendChildNode(n, r), ["stop"])
566
+ onClick: N((e) => o.appendChildNode(n, r), ["stop"])
563
567
  }, {
564
- default: M(() => [...t[9] || (t[9] = [S("添加", -1)])]),
568
+ default: j(() => [...t[9] || (t[9] = [x("添加", -1)])]),
565
569
  _: 1
566
570
  }, 8, ["onClick"]),
567
- C(s, {
571
+ S(s, {
568
572
  type: "text",
569
- onClick: P((e) => o.editNode(n, r), ["stop"])
573
+ onClick: N((e) => o.editNode(n, r), ["stop"])
570
574
  }, {
571
- default: M(() => [...t[10] || (t[10] = [S("修改", -1)])]),
575
+ default: j(() => [...t[10] || (t[10] = [x("修改", -1)])]),
572
576
  _: 1
573
577
  }, 8, ["onClick"]),
574
- C(c, {
578
+ S(c, {
575
579
  class: "pop-confirm",
576
580
  "icon-color": "red",
577
581
  title: "你确定要删除吗?",
578
582
  onConfirm: (e) => o.removeNode(n, r)
579
583
  }, {
580
- reference: M(() => [N(C(s, {
584
+ reference: j(() => [M(S(s, {
581
585
  style: { "margin-left": "4px" },
582
586
  type: "text",
583
- onClick: t[1] || (t[1] = P(() => {}, ["stop"]))
587
+ onClick: t[1] || (t[1] = N(() => {}, ["stop"]))
584
588
  }, {
585
- default: M(() => [...t[11] || (t[11] = [S(" 删除 ", -1)])]),
589
+ default: j(() => [...t[11] || (t[11] = [x(" 删除 ", -1)])]),
586
590
  _: 1
587
- }, 512), [[j, n.isLeaf]])]),
591
+ }, 512), [[A, n.isLeaf]])]),
588
592
  _: 2
589
593
  }, 1032, ["onConfirm"])
590
- ], 512)), [[j, !r.loading && !a.loading]]) : y("v-if", !0),
591
- e.contextMenuIcon && e.contextMenu && !e.readonly ? N((D(), b("span", ee, [C(s, {
594
+ ], 512)), [[A, !r.loading && !a.loading]]) : v("v-if", !0),
595
+ e.contextMenuIcon && e.contextMenu && !e.readonly ? M((E(), y("span", $, [S(s, {
592
596
  style: { padding: "6px 10px 0" },
593
597
  type: "text",
594
- onClick: P((e) => o.showContextMenu(e, r, n), ["stop"])
598
+ onClick: N((e) => o.showContextMenu(e, r, n), ["stop"])
595
599
  }, {
596
- default: M(() => [...t[12] || (t[12] = [S(" . . . ", -1)])]),
600
+ default: j(() => [...t[12] || (t[12] = [x(" . . . ", -1)])]),
597
601
  _: 1
598
- }, 8, ["onClick"])], 512)), [[j, !r.loading && !a.loading]]) : y("v-if", !0)
599
- ], 8, Y))])]),
602
+ }, 8, ["onClick"])], 512)), [[A, !r.loading && !a.loading]]) : v("v-if", !0)
603
+ ], 8, J))])]),
600
604
  _: 3
601
605
  }, 16, [
602
606
  "default-expand-all",
@@ -611,46 +615,46 @@ function re(e, t, n, i, a, o) {
611
615
  "onNodeExpand",
612
616
  "onNodeCollapse"
613
617
  ])),
614
- e.contextMenu && !e.readonly ? N((D(), b("div", {
618
+ e.contextMenu && !e.readonly ? M((E(), y("div", {
615
619
  key: 1,
616
620
  ref: "contextMenu",
617
- style: E(a.position),
621
+ style: T(a.position),
618
622
  class: "menu"
619
- }, [x("ul", ne, [O(e.$slots, "context-menu", {
623
+ }, [b("ul", te, [D(e.$slots, "context-menu", {
620
624
  curNode: a.curNode,
621
625
  curData: a.curData
622
626
  }, () => [
623
- N(x("li", {
627
+ M(b("li", {
624
628
  class: "menu-item",
625
629
  onClick: t[4] || (t[4] = (e) => o.appendPeerNode(a.curNode, a.curData))
626
- }, [t[15] || (t[15] = x("i", {
630
+ }, [t[15] || (t[15] = b("i", {
627
631
  class: "menu-item-icon el-icon-lx-add",
628
632
  style: { color: "#228b22" }
629
- }, null, -1)), S(" " + k(e.menuLabel.appendPeer), 1)], 512), [[j, a.curData.id > -1]]),
630
- x("li", {
633
+ }, null, -1)), x(" " + O(e.menuLabel.appendPeer), 1)], 512), [[A, a.curData.id > -1]]),
634
+ b("li", {
631
635
  class: "menu-item",
632
636
  onClick: t[5] || (t[5] = (e) => o.appendChildNode(a.curNode, a.curData))
633
- }, [t[16] || (t[16] = x("i", {
637
+ }, [t[16] || (t[16] = b("i", {
634
638
  class: "menu-item-icon el-icon-lx-add",
635
639
  style: { color: "#228b22" }
636
- }, null, -1)), S(" " + k(e.menuLabel.appendChild), 1)]),
637
- N(x("li", {
640
+ }, null, -1)), x(" " + O(e.menuLabel.appendChild), 1)]),
641
+ M(b("li", {
638
642
  class: "menu-item",
639
643
  onClick: t[6] || (t[6] = (e) => o.editNode(a.curNode, a.curData))
640
- }, [t[17] || (t[17] = x("i", {
644
+ }, [t[17] || (t[17] = b("i", {
641
645
  class: "menu-item-icon el-icon-edit-outline",
642
646
  style: { color: "#ffa500" }
643
- }, null, -1)), S(" " + k(e.menuLabel.editNode), 1)], 512), [[j, a.curData.id > -1]]),
644
- N(x("li", {
647
+ }, null, -1)), x(" " + O(e.menuLabel.editNode), 1)], 512), [[A, a.curData.id > -1]]),
648
+ M(b("li", {
645
649
  class: "menu-item",
646
650
  onClick: t[7] || (t[7] = (e) => o.removeNodeModal(a.curNode, a.curData))
647
- }, [t[18] || (t[18] = x("i", {
651
+ }, [t[18] || (t[18] = b("i", {
648
652
  class: "menu-item-icon el-icon-delete",
649
653
  style: { color: "#f00" }
650
- }, null, -1)), S(" " + k(e.menuLabel.removeNode), 1)], 512), [[j, a.curNode.isLeaf]])
651
- ])])], 4)), [[j, a.showMenu]]) : y("v-if", !0)
654
+ }, null, -1)), x(" " + O(e.menuLabel.removeNode), 1)], 512), [[A, a.curNode.isLeaf]])
655
+ ])])], 4)), [[A, a.showMenu]]) : v("v-if", !0)
652
656
  ], 512)]);
653
657
  }
654
- var ie = /* @__PURE__ */ i(G, [["render", re]]);
658
+ var re = /* @__PURE__ */ r(W, [["render", ne]]);
655
659
  //#endregion
656
- export { ie as t };
660
+ export { re as t };
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./BvsmTC3G.mjs";
2
- import { n } from "./D7hD-ppq.mjs";
1
+ import { i as e, n as t } from "./Cj59E77g.mjs";
2
+ import { n } from "./CSyJ-vEx.mjs";
3
3
  import { useDictionary as r } from "../hook/useDictionary.mjs";
4
4
  import { computed as i, createVNode as a, isVNode as o, mergeProps as s, useModel as c } from "vue";
5
5
  import { ElRadio as l, ElRadioButton as u, ElRadioGroup as d } from "element-plus/es";
@@ -83,29 +83,25 @@ var f = {
83
83
  disabled: !0,
84
84
  type: !0,
85
85
  options: !0
86
- }, m = ["change"], h = (e) => n[e] === void 0 && p[e] !== !0;
86
+ }, m = (e) => n[e] === void 0 && p[e] !== !0;
87
87
  //#endregion
88
88
  //#region src/components/form/FormRadioGroup.vue?vue&type=script&lang.jsx
89
- function g(e) {
89
+ function h(e) {
90
90
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !o(e);
91
91
  }
92
92
  //#endregion
93
93
  //#region src/components/form/FormRadioGroup.vue
94
- var _ = {
94
+ var g = {
95
95
  name: "FormRadioGroup",
96
96
  inheritAttrs: !1,
97
97
  props: { ...f },
98
- emits: {
99
- ...t,
100
- change: null
101
- },
102
- setup(t, { emit: n, slots: o, attrs: f }) {
103
- let p = c(t, "modelValue"), { render: _, disabled: v, autoBind: y } = e(t, {
104
- emit: n,
105
- slots: o,
106
- attrs: f,
107
- events: m,
108
- predicate: h,
98
+ emits: { ...t },
99
+ setup(t, { slots: n, attrs: o, emit: f }) {
100
+ let p = c(t, "modelValue"), { render: g, disabled: _, listeners: v, inputProps: y } = e(t, {
101
+ emit: f,
102
+ slots: n,
103
+ attrs: o,
104
+ predicate: m,
109
105
  messagePrefix: "请选择"
110
106
  }), b = i(() => t.classic ? "label" : t.labelProp), x = i(() => t.classic ? "value" : t.valueProp), { dictItems: S } = r(t), C = i(() => t.dictType ? S.value : t.gender ? [{
111
107
  [b.value]: "男",
@@ -120,26 +116,26 @@ var _ = {
120
116
  [b.value]: "否",
121
117
  [x.value]: t.chinese ? "否" : t.english ? "N" : t.typing ? 0 : "0"
122
118
  }] : t.options);
123
- return () => _({ vNodes: a(d, s(y.value, {
119
+ return () => g({ vNodes: a(d, s(v.value, y.value, {
124
120
  modelValue: p.value,
125
121
  "onUpdate:modelValue": (e) => p.value = e,
126
- disabled: v.value
122
+ disabled: _.value
127
123
  }), {
128
- ...o,
129
- default: o.default || (() => {
124
+ ...n,
125
+ default: n.default || (() => {
130
126
  var e;
131
127
  return (e = C.value) == null ? void 0 : e.map(({ value: e, label: n, disabled: r }) => t.type === "button" || t.radioType === "button" ? a(u, {
132
128
  key: e,
133
129
  value: e,
134
130
  disabled: r
135
- }, g(n) ? n : { default: () => [n] }) : a(l, {
131
+ }, h(n) ? n : { default: () => [n] }) : a(l, {
136
132
  key: e,
137
133
  value: e,
138
134
  disabled: r
139
- }, g(n) ? n : { default: () => [n] }));
135
+ }, h(n) ? n : { default: () => [n] }));
140
136
  })
141
137
  }) });
142
138
  }
143
139
  };
144
140
  //#endregion
145
- export { _ as t };
141
+ export { g as t };