@me-framework/me-ui-antdv-next 0.0.35 → 0.0.36

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.
@@ -1,11 +1,11 @@
1
1
  import e from "../icon/index.js";
2
2
  import t from "../modal/index.js";
3
- import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as ee, createVNode as c, defineComponent as l, guardReactiveProps as te, nextTick as u, normalizeClass as d, normalizeProps as ne, onMounted as f, openBlock as p, reactive as m, ref as h, resolveComponent as g, resolveDynamicComponent as re, unref as _, watch as v, withCtx as y } from "vue";
4
- import { message as b } from "antdv-next";
5
- import { useDraggable as x } from "vue-draggable-plus";
6
- import S from "dayjs";
3
+ import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as ee, createTextVNode as te, createVNode as s, defineComponent as c, guardReactiveProps as ne, nextTick as l, normalizeClass as re, normalizeProps as ie, onMounted as u, openBlock as d, reactive as f, ref as p, resolveComponent as m, resolveDynamicComponent as ae, unref as h, watch as g, withCtx as _ } from "vue";
4
+ import { message as v } from "antdv-next";
5
+ import { useDraggable as y } from "vue-draggable-plus";
6
+ import b from "dayjs";
7
7
  //#region src/components/input-property/types.ts
8
- var C = [
8
+ var x = [
9
9
  {
10
10
  label: "字符串",
11
11
  value: "string"
@@ -30,7 +30,7 @@ var C = [
30
30
  label: "时间",
31
31
  value: "time"
32
32
  }
33
- ], w = 2, T = "YYYY-MM-DD", E = "HH:mm:ss", ie = [{
33
+ ], S = 2, C = "YYYY-MM-DD", w = "HH:mm:ss", oe = [{
34
34
  label: "是",
35
35
  value: !0
36
36
  }, {
@@ -39,70 +39,70 @@ var C = [
39
39
  }];
40
40
  //#endregion
41
41
  //#region src/components/input-property/validate.ts
42
- function D() {
42
+ function T() {
43
43
  return `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
44
44
  }
45
- var O = /^\d{4}-\d{2}-\d{2}$/, k = /^(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d)?$/;
46
- function A(e) {
45
+ var E = /^\d{4}-\d{2}-\d{2}$/, D = /^(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d)?$/;
46
+ function O(e) {
47
47
  return Math.round((e + 2 ** -52) * 100) / 100;
48
48
  }
49
- function j(e) {
49
+ function k(e) {
50
50
  if (typeof e == "number") return Number.isInteger(e) ? "int" : "float";
51
51
  if (typeof e == "boolean") return "boolean";
52
52
  if (typeof e == "string") {
53
- if (O.test(e)) return "date";
54
- if (k.test(e)) return "time";
53
+ if (E.test(e)) return "date";
54
+ if (D.test(e)) return "time";
55
55
  }
56
56
  return "string";
57
57
  }
58
- function ae(e, t) {
59
- return t === "string" ? e == null ? "" : String(e) : t === "boolean" ? oe(e) : t === "int" || t === "float" ? M(e, t === "float") : F(e, t === "date" ? T : E);
58
+ function se(e, t) {
59
+ return t === "string" ? e == null ? "" : String(e) : t === "boolean" ? N(e) : t === "int" || t === "float" ? A(e, t === "float") : ce(e, t === "date" ? C : w);
60
60
  }
61
- function M(e, t) {
61
+ function A(e, t) {
62
62
  if (e == null) return "";
63
- let n = (e) => t ? A(e) : e;
63
+ let n = (e) => t ? O(e) : e;
64
64
  if (typeof e == "number") return n(e);
65
65
  let r = String(e).trim();
66
66
  if (r === "") return "";
67
67
  let i = Number(r);
68
68
  return Number.isNaN(i) ? e : n(i);
69
69
  }
70
- function N(e, t) {
70
+ function j(e, t) {
71
71
  if (t === "string") return e;
72
- if (t === "boolean") return oe(e);
73
- if (t === "int" || t === "float") return P(e, t === "float");
74
- let n = t === "date" ? T : E;
75
- return e == null || e === "" ? "" : S.isDayjs(e) ? e.format(n) : typeof e == "string" ? e : "";
72
+ if (t === "boolean") return N(e);
73
+ if (t === "int" || t === "float") return M(e, t === "float");
74
+ let n = t === "date" ? C : w;
75
+ return e == null || e === "" ? "" : b.isDayjs(e) ? e.format(n) : typeof e == "string" ? e : "";
76
76
  }
77
- function P(e, t) {
77
+ function M(e, t) {
78
78
  if (e == null) return e;
79
- let n = (e) => t ? A(e) : e;
79
+ let n = (e) => t ? O(e) : e;
80
80
  if (typeof e == "number") return n(e);
81
81
  let r = String(e).trim();
82
82
  if (r === "") return "";
83
83
  let i = Number(r);
84
84
  return Number.isNaN(i) ? e : n(i);
85
85
  }
86
- function oe(e) {
86
+ function N(e) {
87
87
  if (typeof e == "boolean") return e;
88
88
  if (e == null || e === "") return !1;
89
89
  if (typeof e == "number") return e !== 0;
90
90
  let t = String(e).trim().toLowerCase();
91
91
  return t === "true" || t === "1" || t === "yes" || t === "on";
92
92
  }
93
- function F(e, t) {
93
+ function ce(e, t) {
94
94
  if (e == null || e === "") return "";
95
- if (S.isDayjs(e)) return e.format(t);
96
- let n = S(e);
95
+ if (b.isDayjs(e)) return e.format(t);
96
+ let n = b(e);
97
97
  return n.isValid() ? n.format(t) : e;
98
98
  }
99
- function I(e) {
99
+ function P(e) {
100
100
  return e.trim().toLowerCase();
101
101
  }
102
- function se(e) {
102
+ function le(e) {
103
103
  let t = /* @__PURE__ */ new Map(), n = [];
104
104
  for (let r of e) {
105
- let e = I(r.key);
105
+ let e = P(r.key);
106
106
  if (e) {
107
107
  if (t.has(e)) {
108
108
  let i = t.get(e);
@@ -114,12 +114,12 @@ function se(e) {
114
114
  }
115
115
  return n;
116
116
  }
117
- function ce(e, t) {
117
+ function ue(e, t) {
118
118
  if (!e) return !1;
119
- let n = I(e);
120
- return t.some((e) => I(e) === n);
119
+ let n = P(e);
120
+ return t.some((e) => P(e) === n);
121
121
  }
122
- var le = {
122
+ var de = {
123
123
  minLength: ["string"],
124
124
  maxLength: ["string"],
125
125
  pattern: ["string"],
@@ -135,93 +135,93 @@ var le = {
135
135
  "date",
136
136
  "time"
137
137
  ]
138
- }, ue = ["required", "message"];
139
- function L(e, t) {
140
- if (ue.includes(e)) return !0;
141
- let n = le[e];
138
+ }, fe = ["required", "message"];
139
+ function F(e, t) {
140
+ if (fe.includes(e)) return !0;
141
+ let n = de[e];
142
142
  return n ? n.includes(t) : !1;
143
143
  }
144
- function R(e) {
144
+ function I(e) {
145
145
  return typeof e == "number" && Number.isFinite(e);
146
146
  }
147
- function z(e) {
147
+ function L(e) {
148
148
  if (!e) return;
149
149
  let t = {};
150
- return e.required === !0 && (t.required = !0), R(e.minLength) && (t.minLength = e.minLength), R(e.maxLength) && (t.maxLength = e.maxLength), typeof e.pattern == "string" && e.pattern.trim() !== "" && (t.pattern = e.pattern), (R(e.min) || typeof e.min == "string" && e.min.trim() !== "") && (t.min = e.min), (R(e.max) || typeof e.max == "string" && e.max.trim() !== "") && (t.max = e.max), typeof e.message == "string" && e.message.trim() !== "" && (t.message = e.message), Object.keys(t).length > 0 ? t : void 0;
150
+ return e.required === !0 && (t.required = !0), I(e.minLength) && (t.minLength = e.minLength), I(e.maxLength) && (t.maxLength = e.maxLength), typeof e.pattern == "string" && e.pattern.trim() !== "" && (t.pattern = e.pattern), (I(e.min) || typeof e.min == "string" && e.min.trim() !== "") && (t.min = e.min), (I(e.max) || typeof e.max == "string" && e.max.trim() !== "") && (t.max = e.max), typeof e.message == "string" && e.message.trim() !== "" && (t.message = e.message), Object.keys(t).length > 0 ? t : void 0;
151
151
  }
152
- function de(e, t) {
152
+ function pe(e, t) {
153
153
  if (!e) return;
154
154
  let n = {};
155
- return e.required === !0 && (n.required = !0), typeof e.message == "string" && e.message.trim() !== "" && (n.message = e.message), t === "string" ? (R(e.minLength) && (n.minLength = e.minLength), R(e.maxLength) && (n.maxLength = e.maxLength), typeof e.pattern == "string" && e.pattern.trim() !== "" && (n.pattern = e.pattern)) : (t === "int" || t === "float" || t === "date" || t === "time") && ((R(e.min) || typeof e.min == "string" && e.min.trim() !== "") && (n.min = e.min), (R(e.max) || typeof e.max == "string" && e.max.trim() !== "") && (n.max = e.max)), z(n);
155
+ return e.required === !0 && (n.required = !0), typeof e.message == "string" && e.message.trim() !== "" && (n.message = e.message), t === "string" ? (I(e.minLength) && (n.minLength = e.minLength), I(e.maxLength) && (n.maxLength = e.maxLength), typeof e.pattern == "string" && e.pattern.trim() !== "" && (n.pattern = e.pattern)) : (t === "int" || t === "float" || t === "date" || t === "time") && ((I(e.min) || typeof e.min == "string" && e.min.trim() !== "") && (n.min = e.min), (I(e.max) || typeof e.max == "string" && e.max.trim() !== "") && (n.max = e.max)), L(n);
156
156
  }
157
- function B(e, t) {
157
+ function R(e, t) {
158
158
  return typeof e.message == "string" && e.message.trim() !== "" ? e.message : t;
159
159
  }
160
- function V(e, t, n) {
161
- let r = z(n);
160
+ function z(e, t, n) {
161
+ let r = L(n);
162
162
  if (!r) return null;
163
163
  let i = e === "" || e == null;
164
- if (r.required && i) return B(r, "不能为空");
164
+ if (r.required && i) return R(r, "不能为空");
165
165
  if (t === "string") {
166
166
  if (typeof e != "string" || i) return null;
167
- if (r.minLength != null && e.length < r.minLength) return B(r, `最短长度不能小于 ${r.minLength}`);
168
- if (r.maxLength != null && e.length > r.maxLength) return B(r, `最大长度不能大于 ${r.maxLength}`);
167
+ if (r.minLength != null && e.length < r.minLength) return R(r, `最短长度不能小于 ${r.minLength}`);
168
+ if (r.maxLength != null && e.length > r.maxLength) return R(r, `最大长度不能大于 ${r.maxLength}`);
169
169
  if (r.pattern) {
170
170
  let t = null;
171
171
  try {
172
172
  t = new RegExp(r.pattern);
173
173
  } catch {}
174
- if (t && !t.test(e)) return B(r, "格式不正确");
174
+ if (t && !t.test(e)) return R(r, "格式不正确");
175
175
  }
176
176
  }
177
177
  if (t === "int" || t === "float") {
178
178
  if (i) return null;
179
179
  let t = Number(e);
180
180
  if (Number.isNaN(t)) return null;
181
- if (r.min != null && t < Number(r.min)) return B(r, `不能小于 ${r.min}`);
182
- if (r.max != null && t > Number(r.max)) return B(r, `不能大于 ${r.max}`);
181
+ if (r.min != null && t < Number(r.min)) return R(r, `不能小于 ${r.min}`);
182
+ if (r.max != null && t > Number(r.max)) return R(r, `不能大于 ${r.max}`);
183
183
  }
184
184
  if (t === "date" || t === "time") {
185
185
  if (i) return null;
186
186
  let t = String(e);
187
- if (r.min != null && t < String(r.min)) return B(r, `不能早于 ${r.min}`);
188
- if (r.max != null && t > String(r.max)) return B(r, `不能晚于 ${r.max}`);
187
+ if (r.min != null && t < String(r.min)) return R(r, `不能早于 ${r.min}`);
188
+ if (r.max != null && t > String(r.max)) return R(r, `不能晚于 ${r.max}`);
189
189
  }
190
190
  return null;
191
191
  }
192
- function H(e) {
192
+ function B(e) {
193
193
  let t = {};
194
194
  for (let n of e) {
195
195
  let e = n.key.trim();
196
196
  if (!e) continue;
197
- let r = z(n.rules);
197
+ let r = L(n.rules);
198
198
  r && (t[e] = r);
199
199
  }
200
200
  return t;
201
201
  }
202
- function U(e, t, n) {
203
- return V(e, t, n);
202
+ function V(e, t, n) {
203
+ return z(e, t, n);
204
204
  }
205
- function fe(e) {
205
+ function H(e) {
206
206
  let t = {};
207
207
  for (let n of e) {
208
208
  let e = n.key.trim();
209
209
  if (!e) continue;
210
- let r = U(n.value, n.type, n.rules);
210
+ let r = V(n.value, n.type, n.rules);
211
211
  r && (t[e] = r);
212
212
  }
213
213
  return t;
214
214
  }
215
215
  //#endregion
216
216
  //#region src/components/input-property/index.vue?vue&type=script&setup=true&lang.ts
217
- var pe = {
217
+ var me = {
218
218
  key: 0,
219
219
  class: "me-input-property__actions"
220
- }, me = {
220
+ }, he = {
221
221
  key: 0,
222
222
  class: "me-input-property__drag",
223
223
  title: "拖拽排序"
224
- }, W = /* @__PURE__ */ l({
224
+ }, U = /* @__PURE__ */ c({
225
225
  name: "MeInputProperty",
226
226
  __name: "index",
227
227
  props: {
@@ -275,19 +275,33 @@ var pe = {
275
275
  "ok",
276
276
  "cancel"
277
277
  ],
278
- setup(l, { emit: S }) {
279
- let w = l, O = S, k = h([]), A = h([]), M = h("object"), P = !1, oe = r(() => {
278
+ setup(c, { emit: b }) {
279
+ let S = c, E = b, D = p([]), O = p([]), A = p("object"), M = null;
280
+ function N(e, t) {
281
+ if (e === t) return !0;
282
+ if (typeof e != "object" || typeof t != "object" || e == null || t == null || Array.isArray(e) !== Array.isArray(t)) return !1;
283
+ if (Array.isArray(e)) {
284
+ if (e.length !== t.length) return !1;
285
+ for (let n = 0; n < e.length; n++) if (!N(e[n], t[n])) return !1;
286
+ return !0;
287
+ }
288
+ let n = Object.keys(e), r = Object.keys(t);
289
+ if (n.length !== r.length) return !1;
290
+ for (let r of n) if (!Object.prototype.hasOwnProperty.call(t, r) || !N(e[r], t[r])) return !1;
291
+ return !0;
292
+ }
293
+ let ce = r(() => {
280
294
  let e = [{
281
- title: w.keyColumnTitle,
295
+ title: S.keyColumnTitle,
282
296
  key: "key",
283
297
  dataIndex: "key",
284
298
  width: 180
285
299
  }, {
286
- title: w.valueColumnTitle,
300
+ title: S.valueColumnTitle,
287
301
  key: "value",
288
302
  dataIndex: "value"
289
303
  }];
290
- return w.showRules && w.validate && e.push({
304
+ return S.showRules && S.validate && e.push({
291
305
  title: "校验",
292
306
  key: "rules",
293
307
  dataIndex: "rules",
@@ -300,103 +314,102 @@ var pe = {
300
314
  width: 72,
301
315
  align: "center"
302
316
  }), e;
303
- }), F = r(() => w.draggable && !w.disabled);
304
- function I(e) {
305
- M.value = Array.isArray(e) ? "array" : "object";
306
- let t = /* @__PURE__ */ new Map();
307
- for (let e of k.value) {
308
- let n = e.key.trim();
309
- n && t.set(n, e);
317
+ }), P = r(() => S.draggable && !S.disabled);
318
+ function de(e) {
319
+ A.value = Array.isArray(e) ? "array" : "object";
320
+ let t = /* @__PURE__ */ new Map(), n = [];
321
+ for (let e of D.value) {
322
+ let r = e.key.trim();
323
+ r ? t.set(r, e) : n.push(e);
310
324
  }
311
- let n = (e) => t.get(e.trim())?.rules ?? w.rules?.[e.trim()];
312
- M.value === "array" ? k.value = e.map((e) => {
313
- let t = String(e[w.keyField] ?? ""), r = e[w.valueField];
325
+ let r = /* @__PURE__ */ new Set(), i = (e) => {
326
+ let n = t.get(e.trim());
327
+ if (n && !r.has(n.id)) return r.add(n.id), n.id;
328
+ let i = T();
329
+ return r.add(i), i;
330
+ }, a = (e) => t.get(e.trim())?.rules ?? S.rules?.[e.trim()], o = A.value === "array" ? e.map((e) => {
331
+ let t = String(e[S.keyField] ?? ""), n = e[S.valueField];
314
332
  return {
315
- id: D(),
333
+ id: i(t),
316
334
  key: t,
317
- type: j(r),
318
- value: r,
335
+ type: k(n),
336
+ value: n,
319
337
  raw: { ...e },
320
- rules: n(t)
338
+ rules: a(t)
321
339
  };
322
- }) : k.value = Object.entries(e).map(([e, t]) => ({
323
- id: D(),
340
+ }) : Object.entries(e).map(([e, t]) => ({
341
+ id: i(e),
324
342
  key: e,
325
- type: j(t),
343
+ type: k(t),
326
344
  value: t,
327
- rules: n(e)
328
- })), K();
345
+ rules: a(e)
346
+ }));
347
+ D.value = [...o, ...n], G();
329
348
  }
330
- function le() {
349
+ function fe() {
331
350
  let e = {};
332
- for (let t of k.value) {
351
+ for (let t of D.value) {
333
352
  let n = t.key.trim();
334
- n && (e[n] = N(t.value, t.type));
353
+ n && (e[n] = j(t.value, t.type));
335
354
  }
336
355
  return e;
337
356
  }
338
- function ue() {
357
+ function F() {
339
358
  let e = [];
340
- for (let t of k.value) {
359
+ for (let t of D.value) {
341
360
  let n = t.key.trim();
342
361
  if (!n) continue;
343
362
  let r = { ...t.raw };
344
- r[w.keyField] = n, r[w.valueField] = N(t.value, t.type), e.push(r);
363
+ r[S.keyField] = n, r[S.valueField] = j(t.value, t.type), e.push(r);
345
364
  }
346
365
  return e;
347
366
  }
348
- function L() {
349
- let e = M.value === "array" ? ue() : le();
350
- P = !0, O("update:modelValue", e);
351
- let t = w.validate ? {
352
- duplicatedKeys: A.value,
353
- hasEmptyKey: k.value.some((e) => !e.key.trim()),
354
- rowRules: H(k.value),
355
- valueErrors: fe(k.value)
367
+ function I() {
368
+ let e = A.value === "array" ? F() : fe();
369
+ M = e, E("update:modelValue", e);
370
+ let t = S.validate ? {
371
+ duplicatedKeys: O.value,
372
+ hasEmptyKey: D.value.some((e) => !e.key.trim()),
373
+ rowRules: B(D.value),
374
+ valueErrors: H(D.value)
356
375
  } : {
357
376
  duplicatedKeys: [],
358
377
  hasEmptyKey: !1,
359
378
  rowRules: {},
360
379
  valueErrors: {}
361
380
  };
362
- O("change", e, t);
363
- }
364
- v(() => w.modelValue, (e) => {
365
- if (e) {
366
- if (P) {
367
- P = !1;
368
- return;
369
- }
370
- I(e);
371
- }
381
+ E("change", e, t);
382
+ }
383
+ g(() => S.modelValue, (e) => {
384
+ e && (M != null && N(e, M) || (M = null, de(e)));
372
385
  }, { immediate: !0 });
373
- let R = h(!!w.open);
374
- v(() => w.open, (e) => {
386
+ let R = p(!!S.open);
387
+ g(() => S.open, (e) => {
375
388
  R.value = !!e;
376
389
  });
377
- let B = r(() => w.modalMode ? {
390
+ let z = r(() => S.modalMode ? {
378
391
  open: R.value,
379
- title: w.title,
380
- width: w.modalWidth,
392
+ title: S.title,
393
+ width: S.modalWidth,
381
394
  position: "center",
382
- okText: w.okText,
383
- cancelText: w.cancelText,
384
- "onUpdate:open": V,
385
- onOk: ge,
386
- onCancel: W
395
+ okText: S.okText,
396
+ cancelText: S.cancelText,
397
+ "onUpdate:open": U,
398
+ onOk: ve,
399
+ onCancel: ge
387
400
  } : {});
388
- function V(e) {
389
- R.value = e, O("update:open", e);
390
- }
391
- function W() {
392
- O("cancel");
393
- }
394
- function he() {
395
- return w.validate ? {
396
- duplicatedKeys: se(k.value),
397
- hasEmptyKey: k.value.some((e) => !e.key.trim()),
398
- rowRules: H(k.value),
399
- valueErrors: fe(k.value)
401
+ function U(e) {
402
+ R.value = e, E("update:open", e);
403
+ }
404
+ function ge() {
405
+ E("cancel");
406
+ }
407
+ function _e() {
408
+ return S.validate ? {
409
+ duplicatedKeys: le(D.value),
410
+ hasEmptyKey: D.value.some((e) => !e.key.trim()),
411
+ rowRules: B(D.value),
412
+ valueErrors: H(D.value)
400
413
  } : {
401
414
  duplicatedKeys: [],
402
415
  hasEmptyKey: !1,
@@ -404,81 +417,81 @@ var pe = {
404
417
  valueErrors: {}
405
418
  };
406
419
  }
407
- function ge() {
408
- let e = he(), t = [];
420
+ function ve() {
421
+ let e = _e(), t = [];
409
422
  e.hasEmptyKey && t.push("存在为空的 key,请补充或删除该属性"), e.duplicatedKeys.length && t.push(`key 重复(忽略大小写):${e.duplicatedKeys.join("、")}`);
410
423
  for (let [n, r] of Object.entries(e.valueErrors)) t.push(`${n}:${r}`);
411
424
  if (t.length) {
412
- b.error(`校验未通过:${t.join(";")}`);
425
+ v.error(`校验未通过:${t.join(";")}`);
413
426
  return;
414
427
  }
415
- R.value = !1, O("update:open", !1), O("ok", M.value === "array" ? ue() : le());
428
+ R.value = !1, E("update:open", !1), E("ok", A.value === "array" ? F() : fe());
416
429
  }
417
- function _e(e) {
418
- K(), L();
430
+ function ye(e) {
431
+ G(), I();
419
432
  }
420
- function G(e) {
421
- K(), L();
433
+ function W(e) {
434
+ G(), I();
422
435
  }
423
- function ve(e, t) {
424
- e.type !== t && (e.type = t, e.value = ae(e.value, t), e.rules = de(e.rules, t), K(), L());
436
+ function be(e, t) {
437
+ e.type !== t && (e.type = t, e.value = se(e.value, t), e.rules = pe(e.rules, t), G(), I());
425
438
  }
426
- function ye(e, t) {
427
- e.value = t, K(), L();
439
+ function xe(e, t) {
440
+ e.value = t, G(), I();
428
441
  }
429
- function be() {
430
- k.value = [...k.value, {
431
- id: D(),
442
+ function Se() {
443
+ D.value = [...D.value, {
444
+ id: T(),
432
445
  key: "",
433
446
  type: "string",
434
447
  value: "",
435
448
  raw: {}
436
- }], K(), L();
437
- }
438
- function xe(e) {
439
- let t = k.value.indexOf(e);
440
- t !== -1 && (k.value.splice(t, 1), K(), L());
441
- }
442
- function K() {
443
- A.value = se(k.value);
444
- }
445
- function Se(e) {
446
- return ce(e, A.value);
449
+ }], G(), I();
447
450
  }
448
451
  function Ce(e) {
449
- return w.validate ? e.trim() ? Se(e) ? "Key 不能重复(忽略大小写)" : "" : "Key 不能为空" : "";
452
+ let t = D.value.indexOf(e);
453
+ t !== -1 && (D.value.splice(t, 1), G(), I());
454
+ }
455
+ function G() {
456
+ O.value = le(D.value);
450
457
  }
451
458
  function we(e) {
452
- return w.validate ? !e.key.trim() || Se(e.key) : !1;
459
+ return ue(e, O.value);
453
460
  }
454
461
  function Te(e) {
455
- return w.disabled || !w.validate ? "" : U(e.value, e.type, e.rules) ?? "";
462
+ return S.validate ? e.trim() ? we(e) ? "Key 不能重复(忽略大小写)" : "" : "Key 不能为空" : "";
456
463
  }
457
464
  function Ee(e) {
458
- return !!z(e.rules);
465
+ return S.validate ? !e.key.trim() || we(e.key) : !1;
466
+ }
467
+ function K(e) {
468
+ return S.disabled || !S.validate ? "" : V(e.value, e.type, e.rules) ?? "";
469
+ }
470
+ function De(e) {
471
+ return !!L(e.rules);
459
472
  }
460
- let q = h(!1), J = h(null), De = h(), Y = m({}), X = r(() => J.value?.type ?? "string"), Oe = Object.fromEntries(C.map((e) => [e.value, e.label])), ke = r(() => {
473
+ let q = p(!1), J = p(null), Oe = p(), Y = f({}), X = r(() => J.value?.type ?? "string"), ke = Object.fromEntries(x.map((e) => [e.value, e.label])), Ae = r(() => {
461
474
  let e = J.value;
462
- return e ? `校验规则${e.key.trim() ? ` · ${e.key.trim()}` : ""}(${Oe[e.type] ?? e.type})` : "校验规则";
475
+ return e ? `校验规则${e.key.trim() ? ` · ${e.key.trim()}` : ""}(${ke[e.type] ?? e.type})` : "校验规则";
463
476
  });
464
- function Ae(e) {
477
+ function je(e) {
465
478
  return e === "int" || e === "float";
466
479
  }
467
- function je(e) {
468
- J.value = e, Object.keys(Y).forEach((e) => delete Y[e]), Object.assign(Y, z(e.rules) ?? {}), q.value = !0;
480
+ function Me(e) {
481
+ J.value = e, Object.keys(Y).forEach((e) => delete Y[e]), Object.assign(Y, L(e.rules) ?? {}), q.value = !0;
469
482
  }
470
- function Me() {
471
- J.value && De.value?.validate().then(() => {
472
- J.value && (J.value.rules = z(Y), q.value = !1, J.value = null, K(), L());
483
+ function Ne() {
484
+ J.value && Oe.value?.validate().then(() => {
485
+ J.value && (J.value.rules = L(Y), q.value = !1, J.value = null, G(), I());
473
486
  }).catch(() => {});
474
487
  }
475
- function Ne() {
488
+ function Pe() {
476
489
  q.value = !1, J.value = null;
477
490
  }
478
- function Pe(e, t) {
491
+ function Fe(e, t) {
479
492
  return typeof e == "string" && typeof t == "string" ? e < t ? -1 : +(e > t) : Number(e) - Number(t);
480
493
  }
481
- let Fe = r(() => {
494
+ let Ie = r(() => {
482
495
  let e = Y.minLength ?? null, t = Y.maxLength ?? null, n = Y.min ?? null, r = Y.max ?? null;
483
496
  return {
484
497
  minLength: [{ validator: (e, n) => n != null && t != null && n > t ? Promise.reject(/* @__PURE__ */ Error("最短长度不能大于最大长度")) : Promise.resolve() }],
@@ -491,36 +504,36 @@ var pe = {
491
504
  }
492
505
  return Promise.resolve();
493
506
  } }],
494
- min: [{ validator: (e, t) => t != null && r != null && Pe(t, r) > 0 ? Promise.reject(/* @__PURE__ */ Error("最小值不能大于最大值")) : Promise.resolve() }],
495
- max: [{ validator: (e, t) => t != null && n != null && Pe(t, n) < 0 ? Promise.reject(/* @__PURE__ */ Error("最大值不能小于最小值")) : Promise.resolve() }]
507
+ min: [{ validator: (e, t) => t != null && r != null && Fe(t, r) > 0 ? Promise.reject(/* @__PURE__ */ Error("最小值不能大于最大值")) : Promise.resolve() }],
508
+ max: [{ validator: (e, t) => t != null && n != null && Fe(t, n) < 0 ? Promise.reject(/* @__PURE__ */ Error("最大值不能小于最小值")) : Promise.resolve() }]
496
509
  };
497
- }), Z = h(null), Q = h(null);
498
- function Ie() {
510
+ }), Z = p(null), Q = p(null);
511
+ function Le() {
499
512
  Z.value && (Q.value = Z.value.querySelector("tbody"));
500
513
  }
501
- function Le() {
502
- Q.value && (Re && Ue.destroy(), Ue.start(Q.value), Re = !0);
514
+ function Re() {
515
+ Q.value && (ze && We.destroy(), We.start(Q.value), ze = !0);
503
516
  }
504
- let Re = !1;
505
- f(async () => {
506
- await u(), Ie(), Le();
507
- }), v(R, async (e) => {
508
- !e || !w.modalMode || (await u(), Ie(), Le());
517
+ let ze = !1;
518
+ u(async () => {
519
+ await l(), Le(), Re();
520
+ }), g(R, async (e) => {
521
+ !e || !S.modalMode || (await l(), Le(), Re());
509
522
  });
510
- let $ = h(null);
511
- function ze() {
523
+ let $ = p(null);
524
+ function Be() {
512
525
  $.value && ($.value.style.display = "none");
513
526
  }
514
- function Be(e) {
527
+ function Ve(e) {
515
528
  let t = Q.value, n = Z.value, r = $.value, i = e?.related, a = i instanceof Element ? i.closest("tr") : null;
516
529
  if (!t || !n || !r || !a || !t.contains(a)) {
517
- ze();
530
+ Be();
518
531
  return;
519
532
  }
520
- let o = a.getBoundingClientRect(), s = n.getBoundingClientRect(), ee = e.willInsertAfter ? o.bottom : o.top;
521
- r.style.top = `${ee - s.top - 1}px`, r.style.left = "0px", r.style.width = `${n.clientWidth}px`, r.style.display = "block";
533
+ let o = a.getBoundingClientRect(), ee = n.getBoundingClientRect(), te = e.willInsertAfter ? o.bottom : o.top;
534
+ r.style.top = `${te - ee.top - 1}px`, r.style.left = "0px", r.style.width = `${n.clientWidth}px`, r.style.display = "block";
522
535
  }
523
- function Ve(e) {
536
+ function He(e) {
524
537
  if (!e) return;
525
538
  let t = document.querySelector(".me-input-property__drag-fallback");
526
539
  if (!t) return;
@@ -531,57 +544,57 @@ var pe = {
531
544
  r[t].style.width = `${e.getBoundingClientRect().width}px`;
532
545
  });
533
546
  }
534
- let He = m({
547
+ let Ue = f({
535
548
  handle: ".me-input-property__drag",
536
549
  animation: 150,
537
550
  forceFallback: !0,
538
551
  fallbackOnBody: !0,
539
552
  fallbackClass: "me-input-property__drag-fallback",
540
553
  ghostClass: "me-input-property__row--ghost",
541
- disabled: r(() => !F.value),
554
+ disabled: r(() => !P.value),
542
555
  onStart: (e) => {
543
- ze(), Ve(e.item);
556
+ Be(), He(e.item);
544
557
  },
545
- onMove: ((e) => (Be(e), !0)),
558
+ onMove: ((e) => (Ve(e), !0)),
546
559
  onEnd: () => {
547
- ze(), K(), L();
560
+ Be(), G(), I();
548
561
  }
549
- }), Ue = x(Q, k, {
550
- ...He,
562
+ }), We = y(Q, D, {
563
+ ...Ue,
551
564
  immediate: !1
552
565
  });
553
- return v(F, (e) => {
554
- Ue.option("disabled", !e);
555
- }), (r, u) => {
556
- let f = g("a-button"), m = g("a-tooltip"), h = g("a-input"), v = g("a-select"), b = g("a-input-number"), x = g("a-date-picker"), S = g("a-time-picker"), w = g("a-space-compact"), D = g("a-table"), O = g("a-checkbox"), A = g("a-form-item"), j = g("a-form");
557
- return p(), i(re(l.modalMode ? _(t) : "div"), ne(te(B.value)), {
558
- default: y(() => [s("div", {
566
+ return g(P, (e) => {
567
+ We.option("disabled", !e);
568
+ }), (r, l) => {
569
+ let u = m("a-button"), f = m("a-tooltip"), p = m("a-input"), g = m("a-select"), v = m("a-input-number"), y = m("a-date-picker"), b = m("a-time-picker"), S = m("a-space-compact"), T = m("a-table"), E = m("a-checkbox"), O = m("a-form-item"), k = m("a-form");
570
+ return d(), i(ae(c.modalMode ? h(t) : "div"), ie(ne(z.value)), {
571
+ default: _(() => [ee("div", {
559
572
  ref_key: "rootEl",
560
573
  ref: Z,
561
574
  class: "me-input-property"
562
575
  }, [
563
- c(D, {
564
- columns: oe.value,
565
- "data-source": k.value,
576
+ s(T, {
577
+ columns: ce.value,
578
+ "data-source": D.value,
566
579
  "row-key": (e) => e.id,
567
580
  pagination: !1,
568
- size: l.size,
569
- locale: { emptyText: l.emptyText },
581
+ size: c.size,
582
+ locale: { emptyText: c.emptyText },
570
583
  class: "me-input-property__table"
571
584
  }, {
572
- headerCell: y(({ column: t }) => [t.key === "action" ? (p(), i(m, {
585
+ headerCell: _(({ column: t }) => [t.key === "action" ? (d(), i(f, {
573
586
  key: 0,
574
587
  title: "新增"
575
588
  }, {
576
- default: y(() => [c(f, {
589
+ default: _(() => [s(u, {
577
590
  type: "primary",
578
591
  size: "small",
579
592
  shape: "circle",
580
593
  class: "me-input-property__add-btn",
581
- disabled: l.disabled,
582
- onClick: be
594
+ disabled: c.disabled,
595
+ onClick: Se
583
596
  }, {
584
- default: y(() => [c(_(e), {
597
+ default: _(() => [s(h(e), {
585
598
  name: "Plus",
586
599
  size: 14
587
600
  })]),
@@ -589,33 +602,33 @@ var pe = {
589
602
  }, 8, ["disabled"])]),
590
603
  _: 1
591
604
  })) : a("", !0)]),
592
- bodyCell: y(({ column: t, record: n }) => [t.key === "action" ? (p(), o("div", pe, [F.value ? (p(), o("span", me, [c(_(e), {
605
+ bodyCell: _(({ column: t, record: n }) => [t.key === "action" ? (d(), o("div", me, [P.value ? (d(), o("span", he, [s(h(e), {
593
606
  name: "GripVertical",
594
607
  size: 14
595
- })])) : a("", !0), c(f, {
608
+ })])) : a("", !0), s(u, {
596
609
  type: "text",
597
610
  size: "small",
598
611
  class: "me-input-property__del",
599
- disabled: l.disabled,
612
+ disabled: c.disabled,
600
613
  title: "删除该属性",
601
- onClick: (e) => xe(n)
614
+ onClick: (e) => Ce(n)
602
615
  }, {
603
- default: y(() => [c(_(e), {
616
+ default: _(() => [s(h(e), {
604
617
  name: "Trash2",
605
618
  size: 14
606
619
  })]),
607
620
  _: 1
608
- }, 8, ["disabled", "onClick"])])) : t.key === "key" ? (p(), i(m, {
621
+ }, 8, ["disabled", "onClick"])])) : t.key === "key" ? (d(), i(f, {
609
622
  key: 1,
610
- title: l.disabled ? "" : Ce(n.key),
611
- visible: !l.disabled && we(n)
623
+ title: c.disabled ? "" : Te(n.key),
624
+ visible: !c.disabled && Ee(n)
612
625
  }, {
613
- default: y(() => [c(h, {
626
+ default: _(() => [s(p, {
614
627
  value: n.key,
615
- "onUpdate:value": [(e) => n.key = e, (e) => _e(n)],
616
- class: d(["me-input-property__key-input", { "me-input-property__field--error": !l.disabled && we(n) }]),
617
- disabled: l.disabled,
618
- placeholder: l.keyPlaceholder
628
+ "onUpdate:value": [(e) => n.key = e, (e) => ye(n)],
629
+ class: re(["me-input-property__key-input", { "me-input-property__field--error": !c.disabled && Ee(n) }]),
630
+ disabled: c.disabled,
631
+ placeholder: c.keyPlaceholder
619
632
  }, null, 8, [
620
633
  "value",
621
634
  "onUpdate:value",
@@ -624,96 +637,96 @@ var pe = {
624
637
  "placeholder"
625
638
  ])]),
626
639
  _: 2
627
- }, 1032, ["title", "visible"])) : t.key === "value" ? (p(), i(m, {
640
+ }, 1032, ["title", "visible"])) : t.key === "value" ? (d(), i(f, {
628
641
  key: 2,
629
- title: Te(n),
630
- visible: !!Te(n)
642
+ title: K(n),
643
+ visible: !!K(n)
631
644
  }, {
632
- default: y(() => [c(w, {
645
+ default: _(() => [s(S, {
633
646
  block: !0,
634
- class: d(["me-input-property__value", { "me-input-property__field--error": !!Te(n) }])
647
+ class: re(["me-input-property__value", { "me-input-property__field--error": !!K(n) }])
635
648
  }, {
636
- default: y(() => [l.showType ? (p(), i(v, {
649
+ default: _(() => [c.showType ? (d(), i(g, {
637
650
  key: 0,
638
651
  value: n.type,
639
- disabled: l.disabled,
640
- options: _(C),
652
+ disabled: c.disabled,
653
+ options: h(x),
641
654
  class: "me-input-property__value-type",
642
- onChange: (e) => ve(n, e)
655
+ onChange: (e) => be(n, e)
643
656
  }, null, 8, [
644
657
  "value",
645
658
  "disabled",
646
659
  "options",
647
660
  "onChange"
648
- ])) : a("", !0), n.type === "string" ? (p(), i(h, {
661
+ ])) : a("", !0), n.type === "string" ? (d(), i(p, {
649
662
  key: 1,
650
663
  value: n.value,
651
- "onUpdate:value": [(e) => n.value = e, (e) => G(n)],
664
+ "onUpdate:value": [(e) => n.value = e, (e) => W(n)],
652
665
  class: "me-input-property__value-editor",
653
- disabled: l.disabled,
654
- placeholder: l.valuePlaceholder
666
+ disabled: c.disabled,
667
+ placeholder: c.valuePlaceholder
655
668
  }, null, 8, [
656
669
  "value",
657
670
  "onUpdate:value",
658
671
  "disabled",
659
672
  "placeholder"
660
- ])) : n.type === "int" ? (p(), i(b, {
673
+ ])) : n.type === "int" ? (d(), i(v, {
661
674
  key: 2,
662
675
  value: n.value,
663
- "onUpdate:value": [(e) => n.value = e, (e) => G(n)],
676
+ "onUpdate:value": [(e) => n.value = e, (e) => W(n)],
664
677
  class: "me-input-property__value-editor",
665
- disabled: l.disabled,
666
- placeholder: l.valuePlaceholder
678
+ disabled: c.disabled,
679
+ placeholder: c.valuePlaceholder
667
680
  }, null, 8, [
668
681
  "value",
669
682
  "onUpdate:value",
670
683
  "disabled",
671
684
  "placeholder"
672
- ])) : n.type === "float" ? (p(), i(b, {
685
+ ])) : n.type === "float" ? (d(), i(v, {
673
686
  key: 3,
674
687
  value: n.value,
675
- "onUpdate:value": [(e) => n.value = e, (e) => G(n)],
688
+ "onUpdate:value": [(e) => n.value = e, (e) => W(n)],
676
689
  class: "me-input-property__value-editor",
677
- disabled: l.disabled,
678
- placeholder: l.valuePlaceholder,
679
- precision: _(2)
690
+ disabled: c.disabled,
691
+ placeholder: c.valuePlaceholder,
692
+ precision: h(2)
680
693
  }, null, 8, [
681
694
  "value",
682
695
  "onUpdate:value",
683
696
  "disabled",
684
697
  "placeholder",
685
698
  "precision"
686
- ])) : n.type === "date" ? (p(), i(x, {
699
+ ])) : n.type === "date" ? (d(), i(y, {
687
700
  key: 4,
688
701
  value: n.value,
689
- "onUpdate:value": [(e) => n.value = e, (e) => G(n)],
702
+ "onUpdate:value": [(e) => n.value = e, (e) => W(n)],
690
703
  class: "me-input-property__value-editor",
691
- "value-format": _(T),
692
- disabled: l.disabled
704
+ "value-format": h(C),
705
+ disabled: c.disabled
693
706
  }, null, 8, [
694
707
  "value",
695
708
  "onUpdate:value",
696
709
  "value-format",
697
710
  "disabled"
698
- ])) : n.type === "time" ? (p(), i(S, {
711
+ ])) : n.type === "time" ? (d(), i(b, {
699
712
  key: 5,
700
713
  value: n.value,
701
- "onUpdate:value": [(e) => n.value = e, (e) => G(n)],
714
+ "onUpdate:value": [(e) => n.value = e, (e) => W(n)],
702
715
  class: "me-input-property__value-editor",
703
- "value-format": _(E),
704
- disabled: l.disabled
716
+ "value-format": h(w),
717
+ disabled: c.disabled
705
718
  }, null, 8, [
706
719
  "value",
707
720
  "onUpdate:value",
708
721
  "value-format",
709
722
  "disabled"
710
- ])) : n.type === "boolean" ? (p(), i(v, {
723
+ ])) : n.type === "boolean" ? (d(), i(g, {
711
724
  key: 6,
712
725
  value: n.value,
713
726
  class: "me-input-property__value-editor",
714
- disabled: l.disabled,
715
- options: _(ie),
716
- onChange: (e) => ye(n, e)
727
+ disabled: c.disabled,
728
+ options: h(oe),
729
+ onChange: (e) => xe(n, e)
717
730
  }, null, 8, [
718
731
  "value",
719
732
  "disabled",
@@ -723,18 +736,18 @@ var pe = {
723
736
  _: 2
724
737
  }, 1032, ["class"])]),
725
738
  _: 2
726
- }, 1032, ["title", "visible"])) : t.key === "rules" ? (p(), i(m, {
739
+ }, 1032, ["title", "visible"])) : t.key === "rules" ? (d(), i(f, {
727
740
  key: 3,
728
741
  title: "配置校验规则"
729
742
  }, {
730
- default: y(() => [c(f, {
743
+ default: _(() => [s(u, {
731
744
  type: "text",
732
745
  size: "small",
733
- class: d(["me-input-property__rules-btn", { "is-active": Ee(n) }]),
734
- disabled: l.disabled,
735
- onClick: (e) => je(n)
746
+ class: re(["me-input-property__rules-btn", { "is-active": De(n) }]),
747
+ disabled: c.disabled,
748
+ onClick: (e) => Me(n)
736
749
  }, {
737
- default: y(() => [c(_(e), {
750
+ default: _(() => [s(h(e), {
738
751
  name: "WandSparkles",
739
752
  size: 14
740
753
  })]),
@@ -754,44 +767,44 @@ var pe = {
754
767
  "size",
755
768
  "locale"
756
769
  ]),
757
- c(_(t), {
770
+ s(h(t), {
758
771
  open: q.value,
759
- "onUpdate:open": u[11] ||= (e) => q.value = e,
772
+ "onUpdate:open": l[11] ||= (e) => q.value = e,
760
773
  width: 480,
761
774
  fullscreen: !1,
762
- title: ke.value,
775
+ title: Ae.value,
763
776
  "ok-text": "保存",
764
777
  "cancel-text": "取消",
765
- onOk: Me,
766
- onCancel: Ne
778
+ onOk: Ne,
779
+ onCancel: Pe
767
780
  }, {
768
- default: y(() => [c(j, {
781
+ default: _(() => [s(k, {
769
782
  ref_key: "ruleFormRef",
770
- ref: De,
783
+ ref: Oe,
771
784
  model: Y,
772
- rules: Fe.value,
785
+ rules: Ie.value,
773
786
  layout: "vertical",
774
787
  class: "me-input-property__rule-form"
775
788
  }, {
776
- default: y(() => [
777
- c(A, { name: "required" }, {
778
- default: y(() => [c(O, {
789
+ default: _(() => [
790
+ s(O, { name: "required" }, {
791
+ default: _(() => [s(E, {
779
792
  checked: Y.required,
780
- "onUpdate:checked": u[0] ||= (e) => Y.required = e
793
+ "onUpdate:checked": l[0] ||= (e) => Y.required = e
781
794
  }, {
782
- default: y(() => [...u[12] ||= [ee("必填(值不能为空)", -1)]]),
795
+ default: _(() => [...l[12] ||= [te("必填(值不能为空)", -1)]]),
783
796
  _: 1
784
797
  }, 8, ["checked"])]),
785
798
  _: 1
786
799
  }),
787
- X.value === "string" ? (p(), o(n, { key: 0 }, [
788
- c(A, {
800
+ X.value === "string" ? (d(), o(n, { key: 0 }, [
801
+ s(O, {
789
802
  name: "minLength",
790
803
  label: "最短长度"
791
804
  }, {
792
- default: y(() => [c(b, {
805
+ default: _(() => [s(v, {
793
806
  value: Y.minLength,
794
- "onUpdate:value": u[1] ||= (e) => Y.minLength = e,
807
+ "onUpdate:value": l[1] ||= (e) => Y.minLength = e,
795
808
  min: 0,
796
809
  precision: 0,
797
810
  placeholder: "不限",
@@ -799,13 +812,13 @@ var pe = {
799
812
  }, null, 8, ["value"])]),
800
813
  _: 1
801
814
  }),
802
- c(A, {
815
+ s(O, {
803
816
  name: "maxLength",
804
817
  label: "最大长度"
805
818
  }, {
806
- default: y(() => [c(b, {
819
+ default: _(() => [s(v, {
807
820
  value: Y.maxLength,
808
- "onUpdate:value": u[2] ||= (e) => Y.maxLength = e,
821
+ "onUpdate:value": l[2] ||= (e) => Y.maxLength = e,
809
822
  min: 0,
810
823
  precision: 0,
811
824
  placeholder: "不限",
@@ -813,90 +826,90 @@ var pe = {
813
826
  }, null, 8, ["value"])]),
814
827
  _: 1
815
828
  }),
816
- c(A, {
829
+ s(O, {
817
830
  name: "pattern",
818
831
  label: "正则模式",
819
832
  extra: "校验值格式,如 ^[a-zA-Z0-9]+$"
820
833
  }, {
821
- default: y(() => [c(h, {
834
+ default: _(() => [s(p, {
822
835
  value: Y.pattern,
823
- "onUpdate:value": u[3] ||= (e) => Y.pattern = e,
836
+ "onUpdate:value": l[3] ||= (e) => Y.pattern = e,
824
837
  placeholder: "如 ^[a-zA-Z0-9]+$",
825
838
  "allow-clear": ""
826
839
  }, null, 8, ["value"])]),
827
840
  _: 1
828
841
  })
829
842
  ], 64)) : a("", !0),
830
- Ae(X.value) ? (p(), o(n, { key: 1 }, [c(A, {
843
+ je(X.value) ? (d(), o(n, { key: 1 }, [s(O, {
831
844
  name: "min",
832
845
  label: "最小值"
833
846
  }, {
834
- default: y(() => [c(b, {
847
+ default: _(() => [s(v, {
835
848
  value: Y.min,
836
- "onUpdate:value": u[4] ||= (e) => Y.min = e,
837
- precision: X.value === "float" ? _(2) : 0,
849
+ "onUpdate:value": l[4] ||= (e) => Y.min = e,
850
+ precision: X.value === "float" ? h(2) : 0,
838
851
  placeholder: "不限",
839
852
  class: "me-input-property__rule-input"
840
853
  }, null, 8, ["value", "precision"])]),
841
854
  _: 1
842
- }), c(A, {
855
+ }), s(O, {
843
856
  name: "max",
844
857
  label: "最大值"
845
858
  }, {
846
- default: y(() => [c(b, {
859
+ default: _(() => [s(v, {
847
860
  value: Y.max,
848
- "onUpdate:value": u[5] ||= (e) => Y.max = e,
849
- precision: X.value === "float" ? _(2) : 0,
861
+ "onUpdate:value": l[5] ||= (e) => Y.max = e,
862
+ precision: X.value === "float" ? h(2) : 0,
850
863
  placeholder: "不限",
851
864
  class: "me-input-property__rule-input"
852
865
  }, null, 8, ["value", "precision"])]),
853
866
  _: 1
854
867
  })], 64)) : a("", !0),
855
- X.value === "date" || X.value === "time" ? (p(), o(n, { key: 2 }, [c(A, {
868
+ X.value === "date" || X.value === "time" ? (d(), o(n, { key: 2 }, [s(O, {
856
869
  name: "min",
857
870
  label: "最早边界"
858
871
  }, {
859
- default: y(() => [X.value === "date" ? (p(), i(x, {
872
+ default: _(() => [X.value === "date" ? (d(), i(y, {
860
873
  key: 0,
861
874
  value: Y.min,
862
- "onUpdate:value": u[6] ||= (e) => Y.min = e,
863
- "value-format": _(T),
875
+ "onUpdate:value": l[6] ||= (e) => Y.min = e,
876
+ "value-format": h(C),
864
877
  style: { width: "100%" }
865
- }, null, 8, ["value", "value-format"])) : (p(), i(S, {
878
+ }, null, 8, ["value", "value-format"])) : (d(), i(b, {
866
879
  key: 1,
867
880
  value: Y.min,
868
- "onUpdate:value": u[7] ||= (e) => Y.min = e,
869
- "value-format": _(E),
881
+ "onUpdate:value": l[7] ||= (e) => Y.min = e,
882
+ "value-format": h(w),
870
883
  style: { width: "100%" }
871
884
  }, null, 8, ["value", "value-format"]))]),
872
885
  _: 1
873
- }), c(A, {
886
+ }), s(O, {
874
887
  name: "max",
875
888
  label: "最晚边界"
876
889
  }, {
877
- default: y(() => [X.value === "date" ? (p(), i(x, {
890
+ default: _(() => [X.value === "date" ? (d(), i(y, {
878
891
  key: 0,
879
892
  value: Y.max,
880
- "onUpdate:value": u[8] ||= (e) => Y.max = e,
881
- "value-format": _(T),
893
+ "onUpdate:value": l[8] ||= (e) => Y.max = e,
894
+ "value-format": h(C),
882
895
  style: { width: "100%" }
883
- }, null, 8, ["value", "value-format"])) : (p(), i(S, {
896
+ }, null, 8, ["value", "value-format"])) : (d(), i(b, {
884
897
  key: 1,
885
898
  value: Y.max,
886
- "onUpdate:value": u[9] ||= (e) => Y.max = e,
887
- "value-format": _(E),
899
+ "onUpdate:value": l[9] ||= (e) => Y.max = e,
900
+ "value-format": h(w),
888
901
  style: { width: "100%" }
889
902
  }, null, 8, ["value", "value-format"]))]),
890
903
  _: 1
891
904
  })], 64)) : a("", !0),
892
- c(A, {
905
+ s(O, {
893
906
  name: "message",
894
907
  label: "自定义错误提示",
895
908
  extra: "可选,覆盖所有校验规则的默认提示文案"
896
909
  }, {
897
- default: y(() => [c(h, {
910
+ default: _(() => [s(p, {
898
911
  value: Y.message,
899
- "onUpdate:value": u[10] ||= (e) => Y.message = e,
912
+ "onUpdate:value": l[10] ||= (e) => Y.message = e,
900
913
  placeholder: "如:该属性不合法",
901
914
  "allow-clear": ""
902
915
  }, null, 8, ["value"])]),
@@ -907,7 +920,7 @@ var pe = {
907
920
  }, 8, ["model", "rules"])]),
908
921
  _: 1
909
922
  }, 8, ["open", "title"]),
910
- s("div", {
923
+ ee("div", {
911
924
  ref_key: "dropLineEl",
912
925
  ref: $,
913
926
  class: "me-input-property__drop-line"
@@ -920,9 +933,9 @@ var pe = {
920
933
  });
921
934
  //#endregion
922
935
  //#region src/components/input-property/index.ts
923
- W.install = (e) => {
924
- e.component("MeInputProperty", W);
936
+ U.install = (e) => {
937
+ e.component("MeInputProperty", U);
925
938
  };
926
- var he = W;
939
+ var ge = U;
927
940
  //#endregion
928
- export { ie as BOOLEAN_OPTIONS, T as DATE_FORMAT, w as FLOAT_PRECISION, W as MeInputProperty, E as TIME_FORMAT, C as VALUE_TYPE_OPTIONS, se as checkDuplicateKeys, he as default, N as exportValue, D as genId, j as inferValueType, ce as isDuplicateKey, L as isRuleApplicable, I as normalizeKey, z as normalizeRuleSet, ae as normalizeValue, de as sanitizeRulesForType, H as toRuleMap, fe as toValueErrorMap, V as validateValue, U as valueError };
941
+ export { oe as BOOLEAN_OPTIONS, C as DATE_FORMAT, S as FLOAT_PRECISION, U as MeInputProperty, w as TIME_FORMAT, x as VALUE_TYPE_OPTIONS, le as checkDuplicateKeys, ge as default, j as exportValue, T as genId, k as inferValueType, ue as isDuplicateKey, F as isRuleApplicable, P as normalizeKey, L as normalizeRuleSet, se as normalizeValue, pe as sanitizeRulesForType, B as toRuleMap, H as toValueErrorMap, z as validateValue, V as valueError };