orion-design 1.0.2 → 1.0.4

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 (46) hide show
  1. package/dist/LovInput.vue_vue_type_script_setup_true_lang-QrvjS12n.js +401 -0
  2. package/dist/LovInput.vue_vue_type_script_setup_true_lang-QrvjS12n.js.map +1 -0
  3. package/dist/TableSelect.vue_vue_type_script_setup_true_lang-DmAuOipe.js +313 -0
  4. package/dist/TableSelect.vue_vue_type_script_setup_true_lang-DmAuOipe.js.map +1 -0
  5. package/dist/components/Edittable/Edittable.d.ts +9 -2
  6. package/dist/components/Edittable/hooks/useEdittable.d.ts +2 -1
  7. package/dist/components/Edittable/hooks/useEdittable.js +60 -63
  8. package/dist/components/Edittable/hooks/useEdittable.js.map +1 -1
  9. package/dist/components/Edittable/index.d.ts +5 -0
  10. package/dist/components/Edittable/index.js +360 -324
  11. package/dist/components/Edittable/index.js.map +1 -1
  12. package/dist/components/Edittable/utils/index.d.ts +2 -0
  13. package/dist/components/Edittable/utils/index.js +47 -37
  14. package/dist/components/Edittable/utils/index.js.map +1 -1
  15. package/dist/components/Form/LovInput/LovInput.vue.d.ts +7 -1
  16. package/dist/components/Form/index.js +371 -377
  17. package/dist/components/Form/index.js.map +1 -1
  18. package/dist/components/Input/DateInput/DateInput.d.ts +0 -1
  19. package/dist/components/Input/DateInput/DateInput.vue.d.ts +3 -0
  20. package/dist/components/Input/FileInput/FileInput.vue.d.ts +6 -3
  21. package/dist/components/Input/LovInput/LovInput.d.ts +0 -1
  22. package/dist/components/Input/LovInput/LovInput.js.map +1 -1
  23. package/dist/components/Input/LovInput/LovInput.vue.d.ts +6 -6
  24. package/dist/components/Input/NumberInput/NumberInput.d.ts +0 -1
  25. package/dist/components/Input/NumberInput/NumberInput.vue.d.ts +3 -0
  26. package/dist/components/Input/PasswordInput/PasswordInput.d.ts +0 -1
  27. package/dist/components/Input/PasswordInput/PasswordInput.vue.d.ts +3 -0
  28. package/dist/components/Input/StringInput/StringInput.d.ts +0 -1
  29. package/dist/components/Input/StringInput/StringInput.vue.d.ts +3 -0
  30. package/dist/components/Input/TableSelect/TableSelect.d.ts +0 -1
  31. package/dist/components/Input/TableSelect/TableSelect.js.map +1 -1
  32. package/dist/components/Input/TableSelect/TableSelect.vue.d.ts +6 -6
  33. package/dist/components/Input/Textarea/Textarea.d.ts +0 -1
  34. package/dist/components/Input/Textarea/Textarea.vue.d.ts +3 -0
  35. package/dist/components/Input/index.d.ts +35 -9
  36. package/dist/components/Input/index.js +2 -2
  37. package/dist/request/leaf7/index.js +21 -21
  38. package/dist/request/leaf7/index.js.map +1 -1
  39. package/dist/version/version.d.ts +1 -1
  40. package/dist/version/version.js +1 -1
  41. package/dist/version/version.js.map +1 -1
  42. package/package.json +1 -1
  43. package/dist/LovInput.vue_vue_type_script_setup_true_lang-C__ELopU.js +0 -400
  44. package/dist/LovInput.vue_vue_type_script_setup_true_lang-C__ELopU.js.map +0 -1
  45. package/dist/TableSelect.vue_vue_type_script_setup_true_lang-0WMTwNxX.js +0 -310
  46. package/dist/TableSelect.vue_vue_type_script_setup_true_lang-0WMTwNxX.js.map +0 -1
@@ -1,20 +1,20 @@
1
- import { isString as z, isArray as me, isFunction as ge } from "lodash-es";
2
- import { defineComponent as O, ref as he, computed as be, createVNode as r, createTextVNode as fe, isVNode as G } from "vue";
3
- import { withInstall as Se } from "../_util/vue/install.js";
4
- import { ElTable as we, ElTableColumn as v, ElButton as Ce } from "element-plus";
5
- import ye from "../_antd_util/classNames.js";
6
- import { number2string as xe, formatDate as H, getSingleCodeContent as Ae, getMultiCodeContent as Ee } from "./utils/index.js";
7
- import Be from "dayjs";
8
- import { S as Oe } from "../../index-CvcZkdiG.js";
9
- import ve from "../../error/OrionError.js";
10
- import Ne from "./hooks/useColumns.js";
11
- import De from "../Pagetable/hooks/useCode.js";
12
- import { _ as Re, e as Ve, c as Te, f as ke, d as _e, a as Ie, b as Pe } from "../../LovInput.vue_vue_type_script_setup_true_lang-C__ELopU.js";
13
- import { default as Rt } from "./hooks/useEdittable.js";
14
- function Q(l) {
15
- return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !G(l);
1
+ import { isString as H, isArray as Ae, isFunction as Ee } from "lodash-es";
2
+ import { defineComponent as O, ref as Be, computed as Oe, createVNode as r, createTextVNode as Ne, isVNode as le, nextTick as ve } from "vue";
3
+ import { withInstall as De } from "../_util/vue/install.js";
4
+ import { ElTable as Re, ElTableColumn as v, ElButton as Te } from "element-plus";
5
+ import ke from "../_antd_util/classNames.js";
6
+ import { createRowData as X, number2string as Ve, formatDate as Z, getSingleCodeContent as Ie, getMultiCodeContent as _e } from "./utils/index.js";
7
+ import $e from "dayjs";
8
+ import { S as je } from "../../index-CvcZkdiG.js";
9
+ import Pe from "../../error/OrionError.js";
10
+ import Me from "./hooks/useColumns.js";
11
+ import Fe from "../Pagetable/hooks/useCode.js";
12
+ import { _ as Ue, e as Le, c as ze, f as Ye, d as He, a as qe, b as Qe } from "../../LovInput.vue_vue_type_script_setup_true_lang-QrvjS12n.js";
13
+ import { default as $t } from "./hooks/useEdittable.js";
14
+ function ee(n) {
15
+ return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !le(n);
16
16
  }
17
- const je = () => ({
17
+ const Ge = () => ({
18
18
  data: Array,
19
19
  showRowNumber: {
20
20
  type: Boolean,
@@ -32,45 +32,60 @@ const je = () => ({
32
32
  rowClassName: [String, Function],
33
33
  rowStyle: [Object, Function],
34
34
  cellClassName: [String, Function],
35
- cellStyle: [Object, Function]
36
- }), k = (l = !0, h, A) => l ? h ? h(A) : !0 : !1, q = (l, h) => z(l) || me(l) ? De(l).value : ge(l) ? l(h) : null, Me = /* @__PURE__ */ O({
35
+ cellStyle: [Object, Function],
36
+ fakeTailRow: Boolean,
37
+ tailRowTemplate: [Object, Function]
38
+ }), I = (n = !0, h, A) => n ? h ? h(A) : !0 : !1, te = (n, h) => H(n) || Ae(n) ? Fe(n).value : Ee(n) ? n(h) : null, Je = /* @__PURE__ */ O({
37
39
  name: "OEdittable",
38
40
  inheritAttrs: !1,
39
- props: je(),
41
+ props: Ge(),
40
42
  emits: ["selectionChange", "currentRowChange", "rowClick", "rowDblclick", "cellClick", "cellDblclick"],
41
- setup(l, {
43
+ setup(n, {
42
44
  slots: h,
43
45
  attrs: A,
44
46
  emit: S,
45
47
  expose: B
46
48
  }) {
47
- const R = he(), _ = be(() => ({})), I = Ne(h);
49
+ const T = Be(), _ = Oe(() => ({})), $ = Me(h), j = () => {
50
+ T.value.clearSelection();
51
+ }, ne = () => T.value.getSelectionRows(), oe = (...D) => T.value.toggleRowSelection(...D), re = () => T.value.toggleAllSelection(), ie = (...D) => T.value.setCurrentRow(...D), q = (D) => {
52
+ T.value.$el.querySelectorAll(".el-table__row")[D].scrollIntoViewIfNeeded();
53
+ };
48
54
  return B({
49
- clearSelection: () => {
50
- R.value.clearSelection();
51
- },
52
- getSelectionRows: () => R.value.getSelectionRows(),
53
- toggleRowSelection: (...V) => R.value.toggleRowSelection(...V),
54
- toggleAllSelection: () => R.value.toggleAllSelection(),
55
- setCurrentRow: (...V) => R.value.setCurrentRow(...V),
56
- scrollTo: (...V) => R.value.scrollTo(...V)
55
+ clearSelection: j,
56
+ getSelectionRows: ne,
57
+ toggleRowSelection: oe,
58
+ toggleAllSelection: re,
59
+ setCurrentRow: ie,
60
+ scrollToRow: q
57
61
  }), () => {
58
62
  const {
59
- data: V
60
- } = l, {
61
- selectionMode: J = !1
62
- } = l, {
63
- showRowNumber: K = !0
64
- } = l, {
65
- currentRowMode: W = !1
66
- } = l, {
67
- size: X = "default"
68
- } = l, {
63
+ data: D
64
+ } = n, {
65
+ selectionMode: Q = !1
66
+ } = n, {
67
+ showRowNumber: G = !0
68
+ } = n, {
69
+ currentRowMode: ae = !1
70
+ } = n, {
71
+ size: se = "default"
72
+ } = n, {
69
73
  rowClassName: P,
70
- rowStyle: j,
71
- cellClassName: M,
72
- cellStyle: $
73
- } = l, Z = ye("orion-edittable"), ee = () => r(v, {
74
+ rowStyle: M,
75
+ cellClassName: F,
76
+ cellStyle: U
77
+ } = n, {
78
+ fakeTailRow: J = !1,
79
+ tailRowTemplate: K
80
+ } = n, de = ke("orion-edittable"), L = [...D];
81
+ J && L.push(X(K));
82
+ const k = async (e) => {
83
+ const {
84
+ row: t,
85
+ $index: i
86
+ } = e;
87
+ J && L.length == i + 1 && (D == null || D.push(t), L.push(X(K)), await ve(), q(i + 1));
88
+ }, ue = () => r(v, {
74
89
  type: "index",
75
90
  label: "No",
76
91
  headerAlign: "center",
@@ -79,193 +94,202 @@ const je = () => ({
79
94
  fixed: "left",
80
95
  showOverflowTooltip: !0,
81
96
  index: (e) => e + 1
82
- }, null), te = () => r(v, {
97
+ }, null), ce = () => r(v, {
83
98
  type: "selection",
84
99
  headerAlign: "center",
85
100
  align: "center",
86
101
  width: 40,
87
102
  fixed: "left"
88
- }, null), le = (e) => {
103
+ }, null), pe = (e) => {
89
104
  const {
90
105
  name: t,
91
106
  head: i,
92
- headAlign: m = "center",
107
+ headAlign: p = "center",
93
108
  bodyAlign: C,
94
109
  width: x,
95
- fixed: g,
96
- editable: s,
97
- cellEditable: d,
98
- maxlength: c,
110
+ fixed: m,
111
+ editable: d,
112
+ cellEditable: u,
113
+ maxlength: s,
99
114
  placeholder: b
100
115
  } = e;
101
116
  return r(v, {
102
117
  label: i,
103
- headerAlign: m,
118
+ headerAlign: p,
104
119
  align: C,
105
120
  prop: t,
106
121
  width: x,
107
- fixed: g,
122
+ fixed: m,
108
123
  showOverflowTooltip: !0
109
124
  }, {
110
125
  header: () => {
111
- var u, a;
112
- return (a = (u = e.children) == null ? void 0 : u.head) == null ? void 0 : a.call(u);
126
+ var c, a;
127
+ return (a = (c = e.children) == null ? void 0 : c.head) == null ? void 0 : a.call(c);
113
128
  },
114
- default: (u) => {
129
+ default: (c) => {
115
130
  const {
116
131
  row: a,
117
- column: n
118
- } = u, o = k(s, d, a), p = a[n.property];
119
- return o ? r(Re, {
120
- modelValue: p,
121
- "onUpdate:modelValue": (E) => {
122
- a[n.property] = E;
132
+ column: l,
133
+ $index: o
134
+ } = c, g = I(d, u, a), E = a[l.property];
135
+ return g ? r(Ue, {
136
+ modelValue: E,
137
+ "onUpdate:modelValue": (N) => {
138
+ a[l.property] = N;
123
139
  },
124
- maxlength: c,
125
- placeholder: b
140
+ maxlength: s,
141
+ placeholder: b,
142
+ onChange: () => {
143
+ k(c);
144
+ }
126
145
  }, null) : r("div", {
127
146
  class: "cell-stringinput"
128
- }, [p]);
147
+ }, [E]);
129
148
  }
130
149
  });
131
- }, ne = (e) => {
150
+ }, me = (e) => {
132
151
  const {
133
152
  name: t,
134
153
  head: i,
135
- headAlign: m = "center",
154
+ headAlign: p = "center",
136
155
  bodyAlign: C,
137
156
  width: x,
138
- fixed: g,
139
- editable: s,
140
- cellEditable: d,
141
- maxlength: c,
157
+ fixed: m,
158
+ editable: d,
159
+ cellEditable: u,
160
+ maxlength: s,
142
161
  placeholder: b,
143
- fillMapping: u
162
+ fillMapping: c
144
163
  } = e;
145
164
  return r(v, {
146
165
  label: i,
147
- headerAlign: m,
166
+ headerAlign: p,
148
167
  align: C,
149
168
  prop: t,
150
169
  width: x,
151
- fixed: g,
170
+ fixed: m,
152
171
  showOverflowTooltip: !0
153
172
  }, {
154
173
  header: () => {
155
- var a, n;
156
- return (n = (a = e.children) == null ? void 0 : a.head) == null ? void 0 : n.call(a);
174
+ var a, l;
175
+ return (l = (a = e.children) == null ? void 0 : a.head) == null ? void 0 : l.call(a);
157
176
  },
158
177
  default: (a) => {
159
178
  var f, w;
160
179
  const {
161
- row: n,
180
+ row: l,
162
181
  column: o
163
- } = a, p = (w = (f = e.children) == null ? void 0 : f.default) == null ? void 0 : w.call(f, {
164
- rowData: n,
182
+ } = a, g = (w = (f = e.children) == null ? void 0 : f.default) == null ? void 0 : w.call(f, {
183
+ rowData: l,
165
184
  column: o,
166
185
  rowIndex: a.$index
167
- }), E = k(s, d, n), N = n[o.property];
168
- return E ? r(Ve, {
186
+ }), E = I(d, u, l), N = l[o.property];
187
+ return E ? r(Le, {
169
188
  modelValue: N,
170
189
  "onUpdate:modelValue": (y) => {
171
- n[o.property] = y;
190
+ l[o.property] = y;
172
191
  },
173
- maxlength: c,
192
+ maxlength: s,
174
193
  placeholder: b,
175
194
  onClear: () => {
176
- if (z(u)) {
177
- const y = u.split(",");
178
- for (let D = 0; D < y.length; D++) {
179
- const T = y[D].split(":")[0].trim();
180
- n[T] = void 0;
195
+ if (H(c)) {
196
+ const y = c.split(",");
197
+ for (let R = 0; R < y.length; R++) {
198
+ const V = y[R].split(":")[0].trim();
199
+ l[V] = void 0;
181
200
  }
201
+ k(a);
182
202
  }
183
203
  },
184
204
  onSelect: (y) => {
185
- if (z(u)) {
186
- const D = u.split(",");
187
- for (let T = 0; T < D.length; T++) {
188
- const F = D[T].split(":")[0].trim(), L = D[T].split(":")[1].trim(), pe = y[L];
189
- n[F] = pe;
205
+ if (H(c)) {
206
+ const R = c.split(",");
207
+ for (let V = 0; V < R.length; V++) {
208
+ const z = R[V].split(":")[0].trim(), Y = R[V].split(":")[1].trim(), xe = y[Y];
209
+ l[z] = xe;
190
210
  }
191
211
  } else
192
- u && u(n, y);
212
+ c && c(l, y);
213
+ k(a);
193
214
  }
194
- }, Q(p) ? p : {
195
- default: () => [p]
215
+ }, ee(g) ? g : {
216
+ default: () => [g]
196
217
  }) : r("div", {
197
218
  class: "cell-lovinput"
198
219
  }, [N]);
199
220
  }
200
221
  });
201
- }, oe = (e) => {
222
+ }, ge = (e) => {
202
223
  const {
203
224
  name: t,
204
225
  head: i,
205
- headAlign: m = "center",
226
+ headAlign: p = "center",
206
227
  bodyAlign: C = "center",
207
228
  width: x,
208
- fixed: g,
209
- editable: s,
210
- cellEditable: d
229
+ fixed: m,
230
+ editable: d,
231
+ cellEditable: u
211
232
  } = e;
212
233
  return r(v, {
213
234
  label: i,
214
- headerAlign: m,
235
+ headerAlign: p,
215
236
  align: C,
216
237
  prop: t,
217
238
  width: x,
218
- fixed: g,
239
+ fixed: m,
219
240
  showOverflowTooltip: !0
220
241
  }, {
221
242
  header: () => {
222
- var c, b;
223
- return (b = (c = e.children) == null ? void 0 : c.head) == null ? void 0 : b.call(c);
243
+ var s, b;
244
+ return (b = (s = e.children) == null ? void 0 : s.head) == null ? void 0 : b.call(s);
224
245
  },
225
- default: (c) => {
246
+ default: (s) => {
226
247
  const {
227
248
  row: b,
228
- column: u
229
- } = c, a = k(s, d, b), n = b[u.property];
249
+ column: c
250
+ } = s, a = I(d, u, b), l = b[c.property];
230
251
  return r("div", {
231
252
  class: "cell-checkbox"
232
- }, [r(Te, {
233
- modelValue: n,
253
+ }, [r(ze, {
254
+ modelValue: l,
234
255
  "onUpdate:modelValue": (o) => {
235
- b[u.property] = o;
256
+ b[c.property] = o;
236
257
  },
237
- disabled: !a
258
+ disabled: !a,
259
+ onChange: () => {
260
+ k(s);
261
+ }
238
262
  }, null)]);
239
263
  }
240
264
  });
241
- }, re = (e) => {
265
+ }, he = (e) => {
242
266
  const {
243
267
  name: t,
244
268
  head: i,
245
- headAlign: m = "center",
269
+ headAlign: p = "center",
246
270
  bodyAlign: C = "right",
247
271
  width: x,
248
- fixed: g,
249
- thousandsSeparator: s = !0,
250
- percentage: d = !1,
251
- editable: c,
272
+ fixed: m,
273
+ thousandsSeparator: d = !0,
274
+ percentage: u = !1,
275
+ editable: s,
252
276
  cellEditable: b,
253
- placeholder: u,
277
+ placeholder: c,
254
278
  min: a,
255
- max: n,
279
+ max: l,
256
280
  step: o,
257
- stepStrictly: p,
281
+ stepStrictly: g,
258
282
  precision: E,
259
283
  controls: N = !1,
260
284
  controlsPosition: f
261
285
  } = e;
262
286
  return r(v, {
263
287
  label: i,
264
- headerAlign: m,
288
+ headerAlign: p,
265
289
  align: C,
266
290
  prop: t,
267
291
  width: x,
268
- fixed: g,
292
+ fixed: m,
269
293
  showOverflowTooltip: !0
270
294
  }, {
271
295
  header: () => {
@@ -275,292 +299,304 @@ const je = () => ({
275
299
  default: (w) => {
276
300
  const {
277
301
  row: y,
278
- column: D
279
- } = w, T = k(c, b, y), F = y[D.property];
280
- return T ? r(ke, {
281
- modelValue: F,
282
- "onUpdate:modelValue": (L) => {
283
- y[D.property] = L;
302
+ column: R
303
+ } = w, V = I(s, b, y), z = y[R.property];
304
+ return V ? r(Ye, {
305
+ modelValue: z,
306
+ "onUpdate:modelValue": (Y) => {
307
+ y[R.property] = Y;
284
308
  },
285
- placeholder: u,
309
+ placeholder: c,
286
310
  min: a,
287
- max: n,
311
+ max: l,
288
312
  step: o,
289
- stepStrictly: p,
313
+ stepStrictly: g,
290
314
  precision: E,
291
315
  controls: N,
292
- controlsPosition: f
316
+ controlsPosition: f,
317
+ onChange: () => {
318
+ k(w);
319
+ }
293
320
  }, null) : r("div", {
294
321
  class: "cell-numberinput"
295
- }, [xe(F, s, E, d === !0 || d === "")]);
322
+ }, [Ve(z, d, E, u === !0 || u === "")]);
296
323
  }
297
324
  });
298
- }, ie = (e) => {
325
+ }, be = (e) => {
299
326
  const {
300
327
  name: t,
301
328
  head: i,
302
- headAlign: m = "center",
329
+ headAlign: p = "center",
303
330
  bodyAlign: C = "center",
304
331
  width: x,
305
- fixed: g,
306
- editable: s,
307
- cellEditable: d,
308
- maxlength: c,
332
+ fixed: m,
333
+ editable: d,
334
+ cellEditable: u,
335
+ maxlength: s,
309
336
  placeholder: b,
310
- clearable: u = !1,
337
+ clearable: c = !1,
311
338
  format: a = "YYYYMMDDHHmmss",
312
- sourceFormat: n
339
+ sourceFormat: l
313
340
  } = e;
314
341
  return r(v, {
315
342
  label: i,
316
- headerAlign: m,
343
+ headerAlign: p,
317
344
  align: C,
318
345
  prop: t,
319
346
  width: x,
320
- fixed: g,
347
+ fixed: m,
321
348
  showOverflowTooltip: !0
322
349
  }, {
323
350
  header: () => {
324
- var o, p;
325
- return (p = (o = e.children) == null ? void 0 : o.head) == null ? void 0 : p.call(o);
351
+ var o, g;
352
+ return (g = (o = e.children) == null ? void 0 : o.head) == null ? void 0 : g.call(o);
326
353
  },
327
354
  default: (o) => {
328
355
  const {
329
- row: p,
356
+ row: g,
330
357
  column: E
331
- } = o, N = k(s, d, p), f = p[E.property];
332
- return N ? r(_e, {
333
- modelValue: p[E.property],
358
+ } = o, N = I(d, u, g), f = g[E.property];
359
+ return N ? r(He, {
360
+ modelValue: g[E.property],
334
361
  "onUpdate:modelValue": (w) => {
335
- p[E.property] = w;
362
+ g[E.property] = w;
336
363
  },
337
- maxlength: c,
364
+ maxlength: s,
338
365
  placeholder: b,
339
- clearable: u,
366
+ clearable: c,
340
367
  format: a,
341
- sourceFormat: n
342
- }, null) : f instanceof Date || Be.isDayjs(f) ? r("div", {
368
+ sourceFormat: l,
369
+ onChange: () => {
370
+ k(o);
371
+ }
372
+ }, null) : f instanceof Date || $e.isDayjs(f) ? r("div", {
343
373
  class: "cell-dateinput"
344
- }, [H(f, a)]) : n && a ? r("div", {
374
+ }, [Z(f, a)]) : l && a ? r("div", {
345
375
  class: "cell-dateinput"
346
- }, [H(f, n, a)]) : r("div", {
376
+ }, [Z(f, l, a)]) : r("div", {
347
377
  class: "cell-dateinput"
348
378
  }, [f]);
349
379
  }
350
380
  });
351
- }, ae = (e) => {
381
+ }, fe = (e) => {
352
382
  const {
353
383
  name: t,
354
384
  head: i,
355
- headAlign: m = "center",
385
+ headAlign: p = "center",
356
386
  bodyAlign: C,
357
387
  width: x,
358
- fixed: g,
359
- editable: s,
360
- cellEditable: d,
361
- code: c,
388
+ fixed: m,
389
+ editable: d,
390
+ cellEditable: u,
391
+ code: s,
362
392
  placeholder: b,
363
- clearable: u,
393
+ clearable: c,
364
394
  filterable: a
365
395
  } = e;
366
396
  return r(v, {
367
397
  label: i,
368
- headerAlign: m,
398
+ headerAlign: p,
369
399
  align: C,
370
400
  prop: t,
371
401
  width: x,
372
- fixed: g,
402
+ fixed: m,
373
403
  showOverflowTooltip: !0
374
404
  }, {
375
405
  header: () => {
376
- var n, o;
377
- return (o = (n = e.children) == null ? void 0 : n.head) == null ? void 0 : o.call(n);
406
+ var l, o;
407
+ return (o = (l = e.children) == null ? void 0 : l.head) == null ? void 0 : o.call(l);
378
408
  },
379
- default: (n) => {
409
+ default: (l) => {
380
410
  const {
381
411
  row: o,
382
- column: p
383
- } = n, E = k(s, d, o), N = o[p.property];
412
+ column: g
413
+ } = l, E = I(d, u, o), N = o[g.property];
384
414
  let f;
385
- const w = q(c, o);
386
- return w ? f = Ae(w, N) : f = null, E ? r(Ie, {
387
- modelValue: o[p.property],
415
+ const w = te(s, o);
416
+ return w ? f = Ie(w, N) : f = null, E ? r(qe, {
417
+ modelValue: o[g.property],
388
418
  "onUpdate:modelValue": (y) => {
389
- o[p.property] = y;
419
+ o[g.property] = y;
390
420
  },
391
421
  code: w,
392
422
  placeholder: b,
393
- clearable: u,
394
- filterable: a
423
+ clearable: c,
424
+ filterable: a,
425
+ onChange: () => {
426
+ k(l);
427
+ }
395
428
  }, null) : r("div", {
396
429
  class: "cell-singleselect"
397
430
  }, [f]);
398
431
  }
399
432
  });
400
- }, se = (e) => {
433
+ }, we = (e) => {
401
434
  const {
402
435
  name: t,
403
436
  head: i,
404
- headAlign: m = "center",
437
+ headAlign: p = "center",
405
438
  bodyAlign: C,
406
439
  width: x,
407
- fixed: g,
408
- editable: s,
409
- cellEditable: d,
410
- code: c,
440
+ fixed: m,
441
+ editable: d,
442
+ cellEditable: u,
443
+ code: s,
411
444
  placeholder: b,
412
- collapseTags: u = !0,
445
+ collapseTags: c = !0,
413
446
  collapseTagsTooltip: a
414
447
  } = e;
415
448
  return r(v, {
416
449
  label: i,
417
- headerAlign: m,
450
+ headerAlign: p,
418
451
  align: C,
419
452
  prop: t,
420
453
  width: x,
421
- fixed: g,
454
+ fixed: m,
422
455
  showOverflowTooltip: !0
423
456
  }, {
424
457
  header: () => {
425
- var n, o;
426
- return (o = (n = e.children) == null ? void 0 : n.head) == null ? void 0 : o.call(n);
458
+ var l, o;
459
+ return (o = (l = e.children) == null ? void 0 : l.head) == null ? void 0 : o.call(l);
427
460
  },
428
- default: (n) => {
461
+ default: (l) => {
429
462
  const {
430
463
  row: o,
431
- column: p
432
- } = n, E = k(s, d, o), N = o[p.property];
464
+ column: g
465
+ } = l, E = I(d, u, o), N = o[g.property];
433
466
  let f;
434
- const w = q(c, o);
435
- return w ? f = Ee(w, N) : f = null, E ? r(Pe, {
436
- modelValue: o[p.property],
467
+ const w = te(s, o);
468
+ return w ? f = _e(w, N) : f = null, E ? r(Qe, {
469
+ modelValue: o[g.property],
437
470
  "onUpdate:modelValue": (y) => {
438
- o[p.property] = y;
471
+ o[g.property] = y;
439
472
  },
440
473
  code: w,
441
474
  placeholder: b,
442
- collapseTags: u,
443
- collapseTagsTooltip: a
475
+ collapseTags: c,
476
+ collapseTagsTooltip: a,
477
+ onChange: () => {
478
+ k(l);
479
+ }
444
480
  }, null) : r("div", {
445
481
  class: "cell-multiselect"
446
482
  }, [f]);
447
483
  }
448
484
  });
449
- }, de = (e) => {
485
+ }, Se = (e) => {
450
486
  const {
451
487
  name: t,
452
488
  head: i,
453
- headAlign: m = "center",
489
+ headAlign: p = "center",
454
490
  bodyAlign: C,
455
491
  width: x,
456
- fixed: g
492
+ fixed: m
457
493
  } = e;
458
494
  return r(v, {
459
495
  label: i,
460
- headerAlign: m,
496
+ headerAlign: p,
461
497
  align: C,
462
498
  prop: t,
463
499
  width: x,
464
- fixed: g
500
+ fixed: m
465
501
  }, {
466
- default: (s) => {
467
- var c, b;
468
- const d = (b = (c = e.children) == null ? void 0 : c.default) == null ? void 0 : b.call(c, {
469
- rowData: s.row,
502
+ default: (d) => {
503
+ var s, b;
504
+ const u = (b = (s = e.children) == null ? void 0 : s.default) == null ? void 0 : b.call(s, {
505
+ rowData: d.row,
470
506
  column: e,
471
- rowIndex: s.$index
507
+ rowIndex: d.$index
472
508
  });
473
509
  return r("div", {
474
510
  class: "cell-buttongroup"
475
- }, [r(Oe, null, Q(d) ? d : {
476
- default: () => [d]
511
+ }, [r(je, null, ee(u) ? u : {
512
+ default: () => [u]
477
513
  })]);
478
514
  },
479
515
  header: () => {
480
- var s, d;
481
- return (d = (s = e.children) == null ? void 0 : s.head) == null ? void 0 : d.call(s);
516
+ var d, u;
517
+ return (u = (d = e.children) == null ? void 0 : d.head) == null ? void 0 : u.call(d);
482
518
  }
483
519
  });
484
- }, ce = (e) => {
520
+ }, Ce = (e) => {
485
521
  const {
486
522
  head: t,
487
523
  headAlign: i = "center"
488
524
  } = e, {
489
- children: m
525
+ children: p
490
526
  } = e;
491
527
  return r(v, {
492
528
  label: t,
493
529
  headerAlign: i
494
530
  }, {
495
- default: (C) => Y(m)
531
+ default: (C) => W(p)
496
532
  });
497
- }, ue = (e) => {
533
+ }, ye = (e) => {
498
534
  const {
499
535
  name: t,
500
536
  head: i,
501
- headAlign: m = "center",
537
+ headAlign: p = "center",
502
538
  width: C,
503
539
  fixed: x
504
540
  } = e;
505
541
  return r(v, {
506
542
  label: i,
507
- headerAlign: m,
543
+ headerAlign: p,
508
544
  prop: t,
509
545
  width: C,
510
546
  fixed: x
511
547
  }, {
512
- default: (g) => {
513
- var d, c;
514
- const s = (c = (d = e.children) == null ? void 0 : d.default) == null ? void 0 : c.call(d, {
515
- rowData: g.row,
548
+ default: (m) => {
549
+ var u, s;
550
+ const d = (s = (u = e.children) == null ? void 0 : u.default) == null ? void 0 : s.call(u, {
551
+ rowData: m.row,
516
552
  column: e,
517
- rowIndex: g.$index
553
+ rowIndex: m.$index
518
554
  });
519
555
  return r("div", {
520
556
  class: "cell-diy"
521
- }, [s, fe(" ")]);
557
+ }, [d, Ne(" ")]);
522
558
  },
523
559
  header: () => {
524
- var g, s;
525
- return (s = (g = e.children) == null ? void 0 : g.head) == null ? void 0 : s.call(g);
560
+ var m, d;
561
+ return (d = (m = e.children) == null ? void 0 : m.head) == null ? void 0 : d.call(m);
526
562
  }
527
563
  });
528
- }, Y = (e) => e == null ? void 0 : e.map((t) => {
564
+ }, W = (e) => e == null ? void 0 : e.map((t) => {
529
565
  if (t.type === "OEdittableColumnString")
530
- return le(t);
566
+ return pe(t);
531
567
  if (t.type === "OEdittableColumnLov")
532
- return ne(t);
568
+ return me(t);
533
569
  if (t.type === "OEdittableColumnCheckbox")
534
- return oe(t);
570
+ return ge(t);
535
571
  if (t.type === "OEdittableColumnNumber")
536
- return re(t);
572
+ return he(t);
537
573
  if (t.type === "OEdittableColumnDate")
538
- return ie(t);
574
+ return be(t);
539
575
  if (t.type === "OEdittableColumnSingleselect")
540
- return ae(t);
576
+ return fe(t);
541
577
  if (t.type === "OEdittableColumnMultiselect")
542
- return se(t);
578
+ return we(t);
543
579
  if (t.type === "OEdittableColumnButtongroup")
544
- return de(t);
580
+ return Se(t);
545
581
  if (t.type === "OEdittableColumngroup")
546
- return ce(t);
582
+ return Ce(t);
547
583
  if (t.type === "OEdittableColumnDiy")
548
- return ue(t);
549
- throw new ve(`OEdittable不能正确渲染'${t.type}'子组件。`);
584
+ return ye(t);
585
+ throw new Pe(`OEdittable不能正确渲染'${t.type}'子组件。`);
550
586
  });
551
587
  return r("div", {
552
- class: [Z, A.class],
588
+ class: [de, A.class],
553
589
  style: [_.value, A.style]
554
- }, [r(we, {
555
- ref: R,
590
+ }, [r(Re, {
591
+ ref: T,
556
592
  border: !0,
557
- data: V,
593
+ data: L,
558
594
  height: "100%",
559
595
  style: {
560
596
  width: "100%"
561
597
  },
562
598
  "onSelection-change": (e) => S("selectionChange", e),
563
- "highlight-current-row": W,
599
+ "highlight-current-row": ae,
564
600
  "onCurrent-change": (e, t) => S("currentRowChange", e, t),
565
601
  "onRow-click": (e, t, i) => S("rowClick", e, {
566
602
  name: t.property,
@@ -570,24 +606,24 @@ const je = () => ({
570
606
  name: t.property,
571
607
  head: t.label
572
608
  }, i),
573
- "onCell-click": (e, t, i, m) => S("cellClick", e, {
609
+ "onCell-click": (e, t, i, p) => S("cellClick", e, {
574
610
  name: t.property,
575
611
  head: t.label
576
- }, i, m),
577
- "onCell-dblclick": (e, t, i, m) => S("cellDblclick", e, {
612
+ }, i, p),
613
+ "onCell-dblclick": (e, t, i, p) => S("cellDblclick", e, {
578
614
  name: t.property,
579
615
  head: t.label
580
- }, i, m),
581
- size: X,
616
+ }, i, p),
617
+ size: se,
582
618
  rowClassName: (e) => typeof P == "string" ? P : typeof P == "function" ? P({
583
619
  rowData: e.row,
584
620
  rowIndex: e.rowIndex
585
621
  }) : "row-class-name_not_valid",
586
- rowStyle: (e) => typeof j == "function" ? j({
622
+ rowStyle: (e) => typeof M == "function" ? M({
587
623
  rowData: e.row,
588
624
  rowIndex: e.rowIndex
589
- }) : typeof j == "object" ? j : {},
590
- cellClassName: (e) => typeof M == "string" ? M : typeof M == "function" ? M({
625
+ }) : typeof M == "object" ? M : {},
626
+ cellClassName: (e) => typeof F == "string" ? F : typeof F == "function" ? F({
591
627
  rowData: e.row,
592
628
  column: {
593
629
  name: e.column.property,
@@ -596,7 +632,7 @@ const je = () => ({
596
632
  rowIndex: e.rowIndex,
597
633
  columnIndex: e.columnIndex
598
634
  }) : "cell-class-name_not_valid",
599
- cellStyle: (e) => typeof $ == "function" ? $({
635
+ cellStyle: (e) => typeof U == "function" ? U({
600
636
  rowData: e.row,
601
637
  column: {
602
638
  name: e.column.property,
@@ -604,17 +640,17 @@ const je = () => ({
604
640
  },
605
641
  rowIndex: e.rowIndex,
606
642
  columnIndex: e.columnIndex
607
- }) : typeof $ == "object" ? $ : {}
643
+ }) : typeof U == "object" ? U : {}
608
644
  }, {
609
- default: () => [K && ee(), J && te(), Y(I.value)]
645
+ default: () => [G && ue(), Q && ce(), W($.value)]
610
646
  })]);
611
647
  };
612
648
  }
613
- }), $e = () => ({}), Fe = /* @__PURE__ */ O({
649
+ }), Ke = () => ({}), We = /* @__PURE__ */ O({
614
650
  name: "OQuerytableColumnIndex",
615
651
  inheritAttrs: !1,
616
- props: $e(),
617
- setup(l, {
652
+ props: Ke(),
653
+ setup(n, {
618
654
  slots: h,
619
655
  attrs: A,
620
656
  emit: S,
@@ -622,7 +658,7 @@ const je = () => ({
622
658
  }) {
623
659
  return () => null;
624
660
  }
625
- }), Ue = () => ({
661
+ }), Xe = () => ({
626
662
  head: String,
627
663
  headAlign: String,
628
664
  bodyAlign: String,
@@ -635,11 +671,11 @@ const je = () => ({
635
671
  // input属性
636
672
  maxlength: [String, Number],
637
673
  placeholder: String
638
- }), Le = /* @__PURE__ */ O({
674
+ }), Ze = /* @__PURE__ */ O({
639
675
  name: "OEdittableColumnString",
640
676
  inheritAttrs: !1,
641
- props: Ue(),
642
- setup(l, {
677
+ props: Xe(),
678
+ setup(n, {
643
679
  slots: h,
644
680
  attrs: A,
645
681
  emit: S,
@@ -647,7 +683,7 @@ const je = () => ({
647
683
  }) {
648
684
  return () => null;
649
685
  }
650
- }), ze = () => ({
686
+ }), et = () => ({
651
687
  head: String,
652
688
  headAlign: String,
653
689
  bodyAlign: String,
@@ -661,12 +697,12 @@ const je = () => ({
661
697
  maxlength: [String, Number],
662
698
  placeholder: String,
663
699
  fillMapping: [String, Function]
664
- }), Ye = /* @__PURE__ */ O({
700
+ }), tt = /* @__PURE__ */ O({
665
701
  name: "OEdittableColumnLov",
666
702
  inheritAttrs: !1,
667
- props: ze(),
703
+ props: et(),
668
704
  slots: Object,
669
- setup(l, {
705
+ setup(n, {
670
706
  slots: h,
671
707
  attrs: A,
672
708
  emit: S,
@@ -674,7 +710,7 @@ const je = () => ({
674
710
  }) {
675
711
  return () => null;
676
712
  }
677
- }), He = () => ({
713
+ }), lt = () => ({
678
714
  head: String,
679
715
  headAlign: String,
680
716
  bodyAlign: String,
@@ -684,11 +720,11 @@ const je = () => ({
684
720
  // 是否可编辑
685
721
  editable: Boolean,
686
722
  cellEditable: Boolean
687
- }), Qe = /* @__PURE__ */ O({
723
+ }), nt = /* @__PURE__ */ O({
688
724
  name: "OEdittableColumnCheckbox",
689
725
  inheritAttrs: !1,
690
- props: He(),
691
- setup(l, {
726
+ props: lt(),
727
+ setup(n, {
692
728
  slots: h,
693
729
  attrs: A,
694
730
  emit: S,
@@ -696,7 +732,7 @@ const je = () => ({
696
732
  }) {
697
733
  return () => null;
698
734
  }
699
- }), qe = () => ({
735
+ }), ot = () => ({
700
736
  head: String,
701
737
  headAlign: String,
702
738
  bodyAlign: String,
@@ -725,11 +761,11 @@ const je = () => ({
725
761
  precision: Number,
726
762
  controls: Boolean,
727
763
  controlsPosition: String
728
- }), Ge = /* @__PURE__ */ O({
764
+ }), rt = /* @__PURE__ */ O({
729
765
  name: "OEdittableColumnNumber",
730
766
  inheritAttrs: !1,
731
- props: qe(),
732
- setup(l, {
767
+ props: ot(),
768
+ setup(n, {
733
769
  slots: h,
734
770
  attrs: A,
735
771
  emit: S,
@@ -737,7 +773,7 @@ const je = () => ({
737
773
  }) {
738
774
  return () => null;
739
775
  }
740
- }), Je = () => ({
776
+ }), it = () => ({
741
777
  head: String,
742
778
  headAlign: String,
743
779
  bodyAlign: String,
@@ -753,11 +789,11 @@ const je = () => ({
753
789
  clearable: Boolean,
754
790
  format: String,
755
791
  sourceFormat: String
756
- }), Ke = /* @__PURE__ */ O({
792
+ }), at = /* @__PURE__ */ O({
757
793
  name: "OEdittableColumnDate",
758
794
  inheritAttrs: !1,
759
- props: Je(),
760
- setup(l, {
795
+ props: it(),
796
+ setup(n, {
761
797
  slots: h,
762
798
  attrs: A,
763
799
  emit: S,
@@ -765,7 +801,7 @@ const je = () => ({
765
801
  }) {
766
802
  return () => null;
767
803
  }
768
- }), We = () => ({
804
+ }), st = () => ({
769
805
  head: String,
770
806
  headAlign: String,
771
807
  bodyAlign: String,
@@ -781,11 +817,11 @@ const je = () => ({
781
817
  placeholder: String,
782
818
  clearable: Boolean,
783
819
  filterable: Boolean
784
- }), Xe = /* @__PURE__ */ O({
820
+ }), dt = /* @__PURE__ */ O({
785
821
  name: "OEdittableColumnSingleselect",
786
822
  inheritAttrs: !1,
787
- props: We(),
788
- setup(l, {
823
+ props: st(),
824
+ setup(n, {
789
825
  slots: h,
790
826
  attrs: A,
791
827
  emit: S,
@@ -793,7 +829,7 @@ const je = () => ({
793
829
  }) {
794
830
  return () => null;
795
831
  }
796
- }), Ze = () => ({
832
+ }), ut = () => ({
797
833
  head: String,
798
834
  headAlign: String,
799
835
  bodyAlign: String,
@@ -809,11 +845,11 @@ const je = () => ({
809
845
  placeholder: String,
810
846
  collapseTags: Boolean,
811
847
  collapseTagsTooltip: Boolean
812
- }), et = /* @__PURE__ */ O({
848
+ }), ct = /* @__PURE__ */ O({
813
849
  name: "OEdittableColumnMultiselect",
814
850
  inheritAttrs: !1,
815
- props: Ze(),
816
- setup(l, {
851
+ props: ut(),
852
+ setup(n, {
817
853
  slots: h,
818
854
  attrs: A,
819
855
  emit: S,
@@ -821,19 +857,19 @@ const je = () => ({
821
857
  }) {
822
858
  return () => null;
823
859
  }
824
- }), tt = () => ({
860
+ }), pt = () => ({
825
861
  head: String,
826
862
  headAlign: String,
827
863
  bodyAlign: String,
828
864
  name: String,
829
865
  width: [String, Number],
830
866
  fixed: [Boolean, String]
831
- }), lt = /* @__PURE__ */ O({
867
+ }), mt = /* @__PURE__ */ O({
832
868
  name: "OEdittableColumnButtongroup",
833
869
  inheritAttrs: !1,
834
- props: tt(),
870
+ props: pt(),
835
871
  slots: Object,
836
- setup(l, {
872
+ setup(n, {
837
873
  slots: h,
838
874
  attrs: A,
839
875
  emit: S,
@@ -842,48 +878,48 @@ const je = () => ({
842
878
  return () => null;
843
879
  }
844
880
  });
845
- function nt(l) {
846
- return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !G(l);
881
+ function gt(n) {
882
+ return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !le(n);
847
883
  }
848
- const ot = () => ({
884
+ const ht = () => ({
849
885
  type: String
850
- }), rt = /* @__PURE__ */ O({
886
+ }), bt = /* @__PURE__ */ O({
851
887
  name: "OEdittableCellButton",
852
888
  inheritAttrs: !1,
853
- props: ot(),
889
+ props: ht(),
854
890
  emits: ["click"],
855
- setup(l, {
891
+ setup(n, {
856
892
  slots: h,
857
893
  attrs: A,
858
894
  emit: S,
859
895
  expose: B
860
896
  }) {
861
- const R = (_) => {
897
+ const T = (_) => {
862
898
  S("click", _);
863
899
  };
864
900
  return () => {
865
- var U;
901
+ var j;
866
902
  const {
867
903
  type: _
868
- } = l, I = (U = h.default) == null ? void 0 : U.call(h);
869
- return r(Ce, {
904
+ } = n, $ = (j = h.default) == null ? void 0 : j.call(h);
905
+ return r(Te, {
870
906
  link: !0,
871
907
  type: _,
872
908
  size: "small",
873
- onClick: R
874
- }, nt(I) ? I : {
875
- default: () => [I]
909
+ onClick: T
910
+ }, gt($) ? $ : {
911
+ default: () => [$]
876
912
  });
877
913
  };
878
914
  }
879
- }), it = () => ({
915
+ }), ft = () => ({
880
916
  head: String,
881
917
  headAlign: String
882
- }), at = /* @__PURE__ */ O({
918
+ }), wt = /* @__PURE__ */ O({
883
919
  name: "OEdittableColumngroup",
884
920
  inheritAttrs: !1,
885
- props: it(),
886
- setup(l, {
921
+ props: ft(),
922
+ setup(n, {
887
923
  slots: h,
888
924
  attrs: A,
889
925
  emit: S,
@@ -891,18 +927,18 @@ const ot = () => ({
891
927
  }) {
892
928
  return () => null;
893
929
  }
894
- }), st = () => ({
930
+ }), St = () => ({
895
931
  head: String,
896
932
  headAlign: String,
897
933
  name: String,
898
934
  width: [String, Number],
899
935
  fixed: [Boolean, String]
900
- }), dt = /* @__PURE__ */ O({
936
+ }), Ct = /* @__PURE__ */ O({
901
937
  name: "OEdittableColumnDiy",
902
938
  inheritAttrs: !1,
903
- props: st(),
939
+ props: St(),
904
940
  slots: Object,
905
- setup(l, {
941
+ setup(n, {
906
942
  slots: h,
907
943
  attrs: A,
908
944
  emit: S,
@@ -910,23 +946,23 @@ const ot = () => ({
910
946
  }) {
911
947
  return () => null;
912
948
  }
913
- }), vt = Se(Me, {
914
- EdittableColumnIndex: Fe,
915
- EdittableColumnString: Le,
916
- EdittableColumnLov: Ye,
917
- EdittableColumnCheckbox: Qe,
918
- EdittableColumnNumber: Ge,
919
- EdittableColumnDate: Ke,
920
- EdittableColumnSingleselect: Xe,
921
- EdittableColumnMultiselect: et,
922
- EdittableColumnButtongroup: lt,
923
- EdittableCellButton: rt,
924
- EdittableColumngroup: at,
925
- EdittableColumnDiy: dt
949
+ }), Vt = De(Je, {
950
+ EdittableColumnIndex: We,
951
+ EdittableColumnString: Ze,
952
+ EdittableColumnLov: tt,
953
+ EdittableColumnCheckbox: nt,
954
+ EdittableColumnNumber: rt,
955
+ EdittableColumnDate: at,
956
+ EdittableColumnSingleselect: dt,
957
+ EdittableColumnMultiselect: ct,
958
+ EdittableColumnButtongroup: mt,
959
+ EdittableCellButton: bt,
960
+ EdittableColumngroup: wt,
961
+ EdittableColumnDiy: Ct
926
962
  });
927
963
  export {
928
- vt as default,
929
- je as edittableProps,
930
- Rt as useEdittable
964
+ Vt as default,
965
+ Ge as edittableProps,
966
+ $t as useEdittable
931
967
  };
932
968
  //# sourceMappingURL=index.js.map