vft 0.0.511 → 0.0.514

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 (137) hide show
  1. package/dist/index.css +1 -1
  2. package/es/components/cascader/cascader.vue2.js +202 -203
  3. package/es/components/cascader-panel/menu.vue2.js +49 -50
  4. package/es/components/clamp-toggle/clamp-toggle.vue2.js +18 -19
  5. package/es/components/color-picker/color-picker.vue2.js +133 -134
  6. package/es/components/config-provider/config-provider.vue.d.ts +0 -2
  7. package/es/components/config-provider/config-provider.vue2.js +4 -5
  8. package/es/components/config-provider/constants.d.ts +0 -1
  9. package/es/components/config-provider/constants.js +2 -3
  10. package/es/components/config-provider/hooks/use-global-config.js +30 -33
  11. package/es/components/config-provider/index.d.ts +0 -9
  12. package/es/components/config-provider/index.js +5 -6
  13. package/es/components/date-picker/composables/use-basic-date-table.js +82 -83
  14. package/es/components/date-picker/composables/use-month-range-header.js +14 -15
  15. package/es/components/date-picker/composables/use-panel-date-range.js +23 -24
  16. package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +38 -39
  17. package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +38 -39
  18. package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +183 -184
  19. package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +224 -225
  20. package/es/components/date-time-select/date-time-select.vue2.js +36 -39
  21. package/es/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
  22. package/es/components/dropdown/dropdown-item.vue.d.ts +1 -1
  23. package/es/components/dropdown/dropdown.vue.d.ts +1 -1
  24. package/es/components/dropdown/dropdown.vue2.js +67 -68
  25. package/es/components/dropdown/index.d.ts +33 -33
  26. package/es/components/empty/empty.vue2.js +38 -39
  27. package/es/components/full-screen/full-screen.vue2.js +17 -18
  28. package/es/components/image/image.vue2.js +59 -60
  29. package/es/components/image-viewer/image-viewer.vue2.js +44 -45
  30. package/es/components/index.js +97 -98
  31. package/es/components/md-container/md-container.vue2.js +74 -75
  32. package/es/components/md-container/toc.js +36 -37
  33. package/es/components/message-box/message-box.vue2.js +3 -3
  34. package/es/components/message-box/method.js +47 -48
  35. package/es/components/modal/modal-footer-action.vue2.js +24 -25
  36. package/es/components/multiple-tabs/multiple-tabs.vue2.js +15 -16
  37. package/es/components/multiple-tabs/use/use-tab-dropdown.js +53 -54
  38. package/es/components/popconfirm/popconfirm.vue2.js +39 -40
  39. package/es/components/search/search.vue2.js +50 -51
  40. package/es/components/select/useSelect.js +231 -232
  41. package/es/components/super-form/super-form-item.vue2.js +66 -66
  42. package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +65 -66
  43. package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +133 -134
  44. package/es/components/transfer/transfer-panel.vue2.js +56 -57
  45. package/es/components/transfer/transfer.vue2.js +69 -70
  46. package/es/components/tree/tree.vue2.js +59 -60
  47. package/es/components/upload/upload-content.vue2.js +49 -50
  48. package/es/components/upload/upload-list.vue2.js +45 -46
  49. package/es/components/upload/upload.vue2.js +99 -100
  50. package/es/hooks/use-z-index/index.js +3 -3
  51. package/es/index.d.ts +0 -1
  52. package/es/index.js +1 -5
  53. package/es/package.json.d.ts +1 -1
  54. package/es/package.json.js +1 -1
  55. package/lib/components/cascader/cascader.vue2.cjs +1 -1
  56. package/lib/components/cascader-panel/menu.vue2.cjs +4 -4
  57. package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
  58. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  59. package/lib/components/config-provider/config-provider.vue.d.ts +0 -2
  60. package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
  61. package/lib/components/config-provider/constants.cjs +1 -1
  62. package/lib/components/config-provider/constants.d.ts +0 -1
  63. package/lib/components/config-provider/hooks/use-global-config.cjs +1 -1
  64. package/lib/components/config-provider/index.cjs +1 -1
  65. package/lib/components/config-provider/index.d.ts +0 -9
  66. package/lib/components/date-picker/composables/use-basic-date-table.cjs +1 -1
  67. package/lib/components/date-picker/composables/use-month-range-header.cjs +1 -1
  68. package/lib/components/date-picker/composables/use-panel-date-range.cjs +1 -1
  69. package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
  70. package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
  71. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
  72. package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
  73. package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
  74. package/lib/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
  75. package/lib/components/dropdown/dropdown-item.vue.d.ts +1 -1
  76. package/lib/components/dropdown/dropdown.vue.d.ts +1 -1
  77. package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
  78. package/lib/components/dropdown/index.d.ts +33 -33
  79. package/lib/components/empty/empty.vue2.cjs +1 -1
  80. package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
  81. package/lib/components/image/image.vue2.cjs +1 -1
  82. package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
  83. package/lib/components/index.cjs +1 -1
  84. package/lib/components/md-container/md-container.vue2.cjs +1 -1
  85. package/lib/components/md-container/toc.cjs +1 -1
  86. package/lib/components/message-box/message-box.vue2.cjs +1 -1
  87. package/lib/components/message-box/method.cjs +1 -1
  88. package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
  89. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  90. package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
  91. package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
  92. package/lib/components/search/search.vue2.cjs +1 -1
  93. package/lib/components/select/useSelect.cjs +1 -1
  94. package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
  95. package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
  96. package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
  97. package/lib/components/transfer/transfer-panel.vue2.cjs +1 -1
  98. package/lib/components/transfer/transfer.vue2.cjs +1 -1
  99. package/lib/components/tree/tree.vue2.cjs +1 -1
  100. package/lib/components/upload/upload-content.vue2.cjs +1 -1
  101. package/lib/components/upload/upload-list.vue2.cjs +1 -1
  102. package/lib/components/upload/upload.vue2.cjs +1 -1
  103. package/lib/index.cjs +1 -1
  104. package/lib/index.d.ts +0 -1
  105. package/lib/package.json.cjs +1 -1
  106. package/lib/package.json.d.ts +1 -1
  107. package/package.json +3 -3
  108. package/theme-style/index.css +1 -1
  109. package/theme-style/src/image-viewer.scss +12 -0
  110. package/theme-style/src/message-box.scss +2 -2
  111. package/theme-style/src/table.scss +6 -0
  112. package/theme-style/vft-image-viewer.css +1 -1
  113. package/theme-style/vft-message-box.css +1 -1
  114. package/theme-style/vft-table.css +1 -1
  115. package/web-types.json +1 -1
  116. package/es/locale/index.d.js +0 -1
  117. package/es/locale/index.d.ts +0 -26
  118. package/es/locale/index.js +0 -10
  119. package/es/locale/lang/en.d.ts +0 -183
  120. package/es/locale/lang/en.js +0 -241
  121. package/es/locale/lang/zh-cn.d.ts +0 -183
  122. package/es/locale/lang/zh-cn.js +0 -241
  123. package/es/locale/lang/zh-tw.d.ts +0 -183
  124. package/es/locale/lang/zh-tw.js +0 -241
  125. package/es/locale/use-locale.d.ts +0 -17
  126. package/es/locale/use-locale.js +0 -56
  127. package/lib/locale/index.cjs +0 -1
  128. package/lib/locale/index.d.cjs +0 -1
  129. package/lib/locale/index.d.ts +0 -26
  130. package/lib/locale/lang/en.cjs +0 -1
  131. package/lib/locale/lang/en.d.ts +0 -183
  132. package/lib/locale/lang/zh-cn.cjs +0 -1
  133. package/lib/locale/lang/zh-cn.d.ts +0 -183
  134. package/lib/locale/lang/zh-tw.cjs +0 -1
  135. package/lib/locale/lang/zh-tw.d.ts +0 -183
  136. package/lib/locale/use-locale.cjs +0 -1
  137. package/lib/locale/use-locale.d.ts +0 -17
@@ -1,4 +1,4 @@
1
- import { defineComponent as me, ref as G, computed as H, watch as J, onMounted as Pe, nextTick as O, unref as d, useSlots as ke, createVNode as f, mergeProps as U, withDirectives as Ce, vShow as Se, isVNode as ve, createTextVNode as ie, resolveComponent as X } from "vue";
1
+ import { defineComponent as fe, ref as G, computed as H, watch as J, onMounted as ke, nextTick as O, unref as d, useSlots as Ce, createVNode as f, mergeProps as U, withDirectives as Se, vShow as ve, isVNode as xe, createTextVNode as ie, resolveComponent as X } from "vue";
2
2
  import "../alert/index.js";
3
3
  import "../avatar/index.js";
4
4
  import "../avatar-stack/index.js";
@@ -18,9 +18,9 @@ import "../collapse-transition/index.js";
18
18
  import "../color-picker/index.js";
19
19
  import "../config-provider/index.js";
20
20
  import "../container/index.js";
21
- import { isBoolean as Z, isFunction as k, singleAttrToObj as ae, isNullOrUndefined as xe, isArray as _, cloneDeep as Ae, isNull as Re, upperFirst as we, isString as Me } from "@vft/utils";
21
+ import { isBoolean as Z, isFunction as k, singleAttrToObj as ae, isNullOrUndefined as Ae, isArray as _, cloneDeep as Re, isString as le, isNull as we, upperFirst as Me } from "@vft/utils";
22
22
  import "../context-menu/context-menu.vue2.js";
23
- import { VftIcon as le } from "../icon/index.js";
23
+ import { VftIcon as se } from "../icon/index.js";
24
24
  import "../date-picker/index.js";
25
25
  import "../date-time-select/index.js";
26
26
  import "../descriptions/index.js";
@@ -100,7 +100,7 @@ import "../md-container/index.js";
100
100
  import "../md-tabs/index.js";
101
101
  import "../md-vue-playground/index.js";
102
102
  import "../infinite-scroll/index.js";
103
- import { FormCompEnum as t, getComponent as se } from "../../utils/form-register.js";
103
+ import { FormCompEnum as t, getComponent as ce } from "../../utils/form-register.js";
104
104
  import "@vueuse/core";
105
105
  import "../config-provider/hooks/use-global-config.js";
106
106
  import { debounce as qe } from "lodash-es";
@@ -113,13 +113,13 @@ import "../message-box/index.js";
113
113
  import "../progress-i/index.js";
114
114
  import "./index.js";
115
115
  import { isRangePicker as Fe, isInput as Le, isDatePicker as Ve } from "./component-map.js";
116
- import { createPlaceholderMessage as ce } from "./use/helper.js";
116
+ import { createPlaceholderMessage as me } from "./use/helper.js";
117
117
  function ee(e) {
118
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ve(e);
118
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !xe(e);
119
119
  }
120
- const je = me({
120
+ const je = fe({
121
121
  inheritAttrs: !1
122
- }), Jo = /* @__PURE__ */ me({
122
+ }), Jo = /* @__PURE__ */ fe({
123
123
  ...je,
124
124
  __name: "super-form-item",
125
125
  props: {
@@ -148,10 +148,10 @@ const je = me({
148
148
  elRef: F,
149
149
  formActionType: e.formActionType
150
150
  };
151
- }), fe = /* @__PURE__ */ new Set([t.Select, t.Radio, t.Checkbox, t.RadioButton, t.CheckboxButton, t.Cascader, t.AutoComplete]), L = /* @__PURE__ */ new Set([t.Select, t.Radio, t.RadioButton, t.Checkbox, t.CheckboxButton, t.Cascader, t.AutoComplete]), z = /* @__PURE__ */ new Set([t.Tree, t.TreeSelect]), Y = () => e.schema.type && fe.has(e.schema.type) ? {
151
+ }), ue = /* @__PURE__ */ new Set([t.Select, t.Radio, t.Checkbox, t.RadioButton, t.CheckboxButton, t.Cascader, t.AutoComplete]), L = /* @__PURE__ */ new Set([t.Select, t.Radio, t.RadioButton, t.Checkbox, t.CheckboxButton, t.Cascader, t.AutoComplete]), z = /* @__PURE__ */ new Set([t.Tree, t.TreeSelect]), Y = () => e.schema.type && ue.has(e.schema.type) ? {
152
152
  options: []
153
153
  } : {}, p = G(Y());
154
- async function ue() {
154
+ async function de() {
155
155
  const {
156
156
  componentProps: r = {}
157
157
  } = e.schema;
@@ -174,9 +174,9 @@ const je = me({
174
174
  } else
175
175
  p.value = r, L.has(e.schema.type) && (!p.value.options || !Array.isArray(p.value.options)) && (p.value.options = []);
176
176
  }
177
- J(() => e.schema.componentProps, (r, o) => (r || o) && ue(), {
177
+ J(() => e.schema.componentProps, (r, o) => (r || o) && de(), {
178
178
  immediate: !0
179
- }), Pe(() => {
179
+ }), ke(() => {
180
180
  if (e.schema.type === t.Tree) {
181
181
  const r = e.formModel[e.schema.field], o = p.value, i = o?.defaultCheckedKeys, n = o?.includeHalfChecked;
182
182
  i && Array.isArray(i) && i.length > 0 && (!r || !Array.isArray(r) || r.length === 0) && (n ? O(() => {
@@ -194,7 +194,7 @@ const je = me({
194
194
  }
195
195
  });
196
196
  let A = null;
197
- const N = G(!1), $ = async (r, o) => {
197
+ const N = G(!1), B = async (r, o) => {
198
198
  try {
199
199
  const i = {
200
200
  ...p.value
@@ -247,7 +247,7 @@ const je = me({
247
247
  const r = p.value?.request;
248
248
  if (r)
249
249
  if (k(r))
250
- $(r);
250
+ B(r);
251
251
  else {
252
252
  const {
253
253
  watchFields: o = [],
@@ -259,21 +259,21 @@ const je = me({
259
259
  if (!a) return;
260
260
  const u = Array.isArray(o) && o.length > 0;
261
261
  if (i?.immediate && !u) {
262
- N.value || (N.value = !0, $(a, m));
262
+ N.value || (N.value = !0, B(a, m));
263
263
  return;
264
264
  }
265
265
  const {
266
266
  immediate: C,
267
267
  ...h
268
- } = i, y = o.map((s) => () => e.formModel[s]), g = n > 0 ? qe(() => {
269
- $(a, m);
268
+ } = i, g = o.map((s) => () => e.formModel[s]), y = n > 0 ? qe(() => {
269
+ B(a, m);
270
270
  }, n) : () => {
271
- $(a, m);
271
+ B(a, m);
272
272
  };
273
- A = J(y, g, h), i?.immediate && (N.value || (N.value = !0, $(a, m)));
273
+ A = J(g, y, h), i?.immediate && (N.value || (N.value = !0, B(a, m)));
274
274
  }
275
- }, de = H(() => E());
276
- J(de, (r, o) => {
275
+ }, he = H(() => E());
276
+ J(he, (r, o) => {
277
277
  r.isIfShow && r.isShow && (o == null || !o.isIfShow || !o.isShow) ? O(() => {
278
278
  A && (A(), A = null), te();
279
279
  }) : (!r.isIfShow || !r.isShow) && (N.value = !1, A && (A(), A = null));
@@ -347,7 +347,7 @@ const je = me({
347
347
  e.schema.type && o.has(e.schema.type) && (r = Object.assign(o.get(e.schema.type) || {}, r));
348
348
  const i = r;
349
349
  return e.formProps.inputMaxLength && e.schema.type === t.Input && !i?.maxlength && (i.maxlength = e.formProps.inputMaxLength), L.has(e.schema.type) && (!i.options || !Array.isArray(i.options)) && (i.options = []), z.has(e.schema.type) && (!i.data || !Array.isArray(i.data)) && (i.data = []), i;
350
- }), he = H(() => {
350
+ }), pe = H(() => {
351
351
  const {
352
352
  disabled: r
353
353
  } = e.formProps, {
@@ -369,7 +369,7 @@ const je = me({
369
369
  isIfShow: n
370
370
  };
371
371
  }
372
- function pe() {
372
+ function ye() {
373
373
  const {
374
374
  rules: r = [],
375
375
  type: o = t.Input,
@@ -379,19 +379,19 @@ const je = me({
379
379
  dynamicRule: m,
380
380
  required: u,
381
381
  dynamicRuleAdd: C = !0
382
- } = e.schema, h = k(u) ? u(d(P)) : u, y = e.formModel[e.schema.field];
383
- if (!h && (xe(y) || y === "" || _(y) && !y.length))
382
+ } = e.schema, h = k(u) ? u(d(P)) : u, g = e.formModel[e.schema.field];
383
+ if (!h && (Ae(g) || g === "" || _(g) && !g.length))
384
384
  return [];
385
- const g = n || a;
385
+ const y = n || a;
386
386
  if (k(m) && !C)
387
387
  return m(d(P));
388
- let s = Ae(_(r) ? r : [r]);
388
+ let s = Re(_(r) ? r : [r]);
389
389
  const {
390
390
  rulesMessageJoinLabel: R
391
- } = e.formProps, b = Reflect.has(e.schema, "rulesMessageJoinLabel") ? i : R, w = ce(o, `${b ? g : ""}`);
391
+ } = e.formProps, b = Reflect.has(e.schema, "rulesMessageJoinLabel") ? i : R, w = me(o, b && le(y) ? y : "");
392
392
  function M(l, c) {
393
393
  const x = l.message || w;
394
- return c === void 0 || Re(c) || o === t.CheckboxSingle && !c || Array.isArray(c) && c.length === 0 || typeof c == "string" && c.trim() === "" || typeof c == "object" && Reflect.has(c, "checked") && Reflect.has(c, "halfChecked") && Array.isArray(c.checked) && Array.isArray(c.halfChecked) && c.checked.length === 0 && c.halfChecked.length === 0 ? Promise.reject(x) : Promise.resolve();
394
+ return c === void 0 || we(c) || o === t.CheckboxSingle && !c || Array.isArray(c) && c.length === 0 || typeof c == "string" && c.trim() === "" || typeof c == "object" && Reflect.has(c, "checked") && Reflect.has(c, "halfChecked") && Array.isArray(c.checked) && Array.isArray(c.halfChecked) && c.checked.length === 0 && c.halfChecked.length === 0 ? Promise.reject(x) : Promise.resolve();
395
395
  }
396
396
  const V = [t.Radio, t.Select, t.RadioSingle, t.RadioButton, t.Checkbox, t.CheckboxSingle, t.CheckboxButton, t.AutoComplete, t.Cascader, t.ColorPicker, t.Upload, t.Slider].includes(o);
397
397
  (!s || s.length === 0 || h) && (s = [{
@@ -408,18 +408,18 @@ const je = me({
408
408
  }
409
409
  const v = s.findIndex((l) => l.min), D = s.findIndex((l) => l.max);
410
410
  function j(l, c, x = "all") {
411
- const S = s[c], B = S.isNumber ? isNaN(l) ? l?.length || 0 : Number(l) : l?.length || 0;
412
- return ["min", "all"].includes(x) && B < S.min ? Promise.reject(`${g}至少${S.min}个字符`) : ["max", "all"].includes(x) && B > S.max ? Promise.reject(`${g}最多${S.max}个字符`) : Promise.resolve();
411
+ const S = s[c], $ = S.isNumber ? isNaN(l) ? l?.length || 0 : Number(l) : l?.length || 0;
412
+ return ["min", "all"].includes(x) && $ < S.min ? Promise.reject(`${y}至少${S.min}个字符`) : ["max", "all"].includes(x) && $ > S.max ? Promise.reject(`${y}最多${S.max}个字符`) : Promise.resolve();
413
413
  }
414
414
  (v !== -1 || D !== -1) && (v !== -1 && D !== -1 && !s[v].validator && !s[v].message ? s[v].validator = (l, c) => j(c, v) : v !== -1 && !s[v].validator && !s[v].message ? s[v].validator = (l, c) => j(c, v, "min") : D !== -1 && !s[D].validator && !s[D].message && (s[D].validator = (l, c) => j(c, D, "max")));
415
415
  const T = s.findIndex((l) => l.len);
416
- if (T !== -1 && (s[T].validator = (l, c) => c?.length !== s[T].len ? Promise.reject(`${g}必须为${s[T].len}个字符`) : Promise.resolve()), k(m) && C) {
416
+ if (T !== -1 && (s[T].validator = (l, c) => c?.length !== s[T].len ? Promise.reject(`${y}必须为${s[T].len}个字符`) : Promise.resolve()), k(m) && C) {
417
417
  let l = m(d(P));
418
418
  l = _(l) ? l : [l], s = s.concat(l);
419
419
  }
420
420
  return s;
421
421
  }
422
- const ye = () => {
422
+ const ge = () => {
423
423
  const {
424
424
  renderComponentContent: r,
425
425
  type: o = t.Input,
@@ -432,26 +432,26 @@ const je = me({
432
432
  } = e.schema;
433
433
  let h = n;
434
434
  Le(o) ? h = "input" : Ve(o) || o === t.TimePicker || o === t.InputTag || o === t.AutoComplete || o === t.Cascader || o === t.ColorPicker || o === t.Slider || o === t.TreeSelect ? h = "update:modelValue" : o === t.Upload ? h = "update:fileList" : o === t.Tree && (h = "check");
435
- const y = `on${we(h)}`, g = se(o), {
435
+ const g = `on${Me(h)}`, y = ce(o), {
436
436
  autoSetPlaceHolder: s,
437
437
  size: R
438
438
  } = e.formProps, b = {
439
439
  clearable: !0,
440
440
  ...d(K)
441
441
  };
442
- if (o !== t.Search && (b.size = d(K)?.size || R, b.disabled = d(he)), !b.disabled && s && !Fe(o) && o) {
442
+ if (o !== t.Search && (b.size = d(K)?.size || R, b.disabled = d(pe)), !b.disabled && s && !Fe(o) && o) {
443
443
  const l = m || u;
444
- b.placeholder = d(K)?.placeholder || ce(o, C && Me(l) ? l : "");
444
+ b.placeholder = d(K)?.placeholder || me(o, C && le(l) ? l : "");
445
445
  }
446
- const M = b[y], I = b.onClear, V = {
447
- [y]: (...l) => {
446
+ const M = b[g], I = b.onClear, V = {
447
+ [g]: (...l) => {
448
448
  const [c] = l;
449
449
  let x;
450
450
  if (o === t.Tree && h === "check") {
451
- const [, S] = l, B = d(K)?.includeHalfChecked;
452
- if (B ? x = [...S?.halfCheckedKeys || [], ...S?.checkedKeys || []] : x = S?.checkedKeys || [], B) {
453
- const be = Symbol.for(`${i}_checkedKeys`);
454
- e.formModel[be] = S?.checkedKeys || [];
451
+ const [, S] = l, $ = d(K)?.includeHalfChecked;
452
+ if ($ ? x = [...S?.halfCheckedKeys || [], ...S?.checkedKeys || []] : x = S?.checkedKeys || [], $) {
453
+ const Pe = Symbol.for(`${i}_checkedKeys`);
454
+ e.formModel[Pe] = S?.checkedKeys || [];
455
455
  }
456
456
  } else {
457
457
  const S = c ? c.target : null;
@@ -473,7 +473,7 @@ const je = me({
473
473
  }, W = o === t.Tree ? {} : {
474
474
  [a || "model-value"]: e.formModel[i]
475
475
  }, {
476
- [y]: v,
476
+ [g]: v,
477
477
  ...D
478
478
  } = b, j = {
479
479
  ...D,
@@ -481,7 +481,7 @@ const je = me({
481
481
  ...W
482
482
  };
483
483
  if (!r && o !== t.Upload)
484
- return f(g, U({
484
+ return f(y, U({
485
485
  ref: F
486
486
  }, j), null);
487
487
  let T;
@@ -510,7 +510,7 @@ const je = me({
510
510
  })
511
511
  };
512
512
  }
513
- return f(g, U({
513
+ return f(y, U({
514
514
  ref: F
515
515
  }, j), ee(T) ? T : {
516
516
  default: () => [T]
@@ -528,11 +528,11 @@ const je = me({
528
528
  labelSuffix: C
529
529
  } = e.schema, {
530
530
  labelSuffix: h = ""
531
- } = e.formProps, y = C ?? h, g = o || i, s = g ? f("span", null, [a && f("span", {
531
+ } = e.formProps, g = C ?? h, y = o || i, s = y ? f("span", null, [a && f("span", {
532
532
  class: "label-required"
533
- }, [ie("*")]), f("span", null, [g]), y && f("span", {
533
+ }, [ie("*")]), f("span", null, [y]), g && f("span", {
534
534
  class: q.m("label-suffix")
535
- }, [y])]) : null, R = () => {
535
+ }, [g])]) : null, R = () => {
536
536
  if (!m && !u) return null;
537
537
  const b = H(() => ae(m, "icon", {
538
538
  size: 20,
@@ -546,10 +546,10 @@ const je = me({
546
546
  return f(De, U({
547
547
  className: "box-item"
548
548
  }, w.value), {
549
- default: () => [f(le, b.value, null)]
549
+ default: () => [f(se, b.value, null)]
550
550
  });
551
551
  }
552
- return f(le, b.value, null);
552
+ return f(se, b.value, null);
553
553
  };
554
554
  return r && s ? n ? f("div", {
555
555
  class: "label-content"
@@ -559,7 +559,7 @@ const je = me({
559
559
  class: "label-content"
560
560
  }, [f("div", null, [s]), R()]) : void 0;
561
561
  }
562
- const oe = ke();
562
+ const oe = Ce();
563
563
  function re(r, o = "default", i) {
564
564
  if (!r || !Reflect.has(r, o))
565
565
  return null;
@@ -568,7 +568,7 @@ const je = me({
568
568
  const n = r[o];
569
569
  return n ? n(i) : null;
570
570
  }
571
- function ge() {
571
+ function be() {
572
572
  const {
573
573
  required: r,
574
574
  itemProps: o,
@@ -580,8 +580,8 @@ const je = me({
580
580
  prefixParentStyle: C
581
581
  } = e.schema, {
582
582
  autoCleanErrorMessage: h,
583
- compFullWidth: y
584
- } = e.formProps, g = () => i ? re(oe, i, d(P)) : n ? n(d(P)) : ye(), s = !!m, R = !!u, b = k(m) ? m(d(P)) : m, w = k(u) ? u(d(P)) : u, M = () => {
583
+ compFullWidth: g
584
+ } = e.formProps, y = () => i ? re(oe, i, d(P)) : n ? n(d(P)) : ge(), s = !!m, R = !!u, b = k(m) ? m(d(P)) : m, w = k(u) ? u(d(P)) : u, M = () => {
585
585
  e.updateSchema([{
586
586
  field: a,
587
587
  itemProps: {
@@ -596,20 +596,20 @@ const je = me({
596
596
  class: [{
597
597
  [q.is("suffix")]: s
598
598
  }, {
599
- [q.is("comp-full-width")]: y
599
+ [q.is("comp-full-width")]: g
600
600
  }, q.e("item")]
601
601
  }, o, {
602
602
  label: o?.label || o?.title,
603
603
  "onUpdate:error": h ? M : () => {
604
604
  },
605
- rules: pe(),
605
+ rules: ye(),
606
606
  required: I
607
607
  }), {
608
608
  default: () => [f("div", {
609
609
  class: q.e("container")
610
610
  }, [f("div", {
611
611
  class: q.e("content")
612
- }, [g(), s && f("span", {
612
+ }, [y(), s && f("span", {
613
613
  class: q.m("suffix")
614
614
  }, [b])])])],
615
615
  label: Q() ? () => Q() : void 0
@@ -630,41 +630,41 @@ const je = me({
630
630
  render: m,
631
631
  quickColSpan: u
632
632
  } = e.schema;
633
- if (!se(a) && !n && !m)
633
+ if (!ce(a) && !n && !m)
634
634
  return null;
635
635
  const {
636
636
  baseColProps: C = {},
637
637
  quickColSpan: h
638
- } = e.formProps, y = h ? {
638
+ } = e.formProps, g = h ? {
639
639
  span: Math.ceil(24 / h),
640
640
  ...C
641
641
  } : {
642
642
  ...C
643
- }, g = u ? {
643
+ }, y = u ? {
644
644
  span: Math.ceil(24 / u),
645
645
  ...o
646
646
  } : {
647
647
  ...o
648
648
  }, s = {
649
- ...y,
650
- ...g
649
+ ...g,
650
+ ...y
651
651
  }, {
652
652
  isIfShow: R,
653
653
  isShow: b
654
- } = E(), w = d(P), M = () => i ? re(oe, i, w) : n ? n(w) : ge();
654
+ } = E(), w = d(P), M = () => i ? re(oe, i, w) : n ? n(w) : be();
655
655
  if (a === t.Divider) {
656
656
  let I;
657
657
  return f(ne, U({
658
658
  span: 24
659
- }, g), {
659
+ }, y), {
660
660
  default: () => [f(Ie, d(K), ee(I = Q()) ? I : {
661
661
  default: () => [I]
662
662
  })]
663
663
  });
664
664
  }
665
- return R && (e.formProps.customLayout ? M() : Ce(f(ne, s, ee(r = M()) ? r : {
665
+ return R && (e.formProps.customLayout ? M() : Se(f(ne, s, ee(r = M()) ? r : {
666
666
  default: () => [r]
667
- }), [[Se, b]]));
667
+ }), [[ve, b]]));
668
668
  };
669
669
  }
670
670
  });
@@ -1,110 +1,109 @@
1
- import { defineComponent as Q, inject as W, ref as w, computed as d, openBlock as T, createBlock as X, Transition as Z, withCtx as ee, createElementBlock as te, normalizeClass as r, unref as n, createElementVNode as p, createVNode as ne, toDisplayString as A, createCommentVNode as oe } from "vue";
1
+ import { defineComponent as F, inject as L, ref as C, computed as d, openBlock as w, createBlock as Q, Transition as W, withCtx as X, createElementBlock as Z, normalizeClass as r, unref as s, createElementVNode as p, createVNode as ee, createCommentVNode as te } from "vue";
2
2
  import f from "dayjs";
3
- import { EVENT_CODE as se } from "../../../constants/aria.js";
3
+ import { EVENT_CODE as ne } from "../../../constants/aria.js";
4
4
  import "@vueuse/core";
5
- import { isUndefined as ae } from "@vft/utils";
5
+ import { isUndefined as oe } from "@vft/utils";
6
6
  import "../../config-provider/hooks/use-global-config.js";
7
7
  import "lodash-es";
8
8
  import "../../form/index.js";
9
- import { useNamespace as ie } from "../../../hooks/use-namespace/index.js";
9
+ import { useNamespace as se } from "../../../hooks/use-namespace/index.js";
10
10
  import "../../../hooks/use-model-toggle/index.js";
11
11
  import "@popperjs/core";
12
12
  import "../../../hooks/use-z-index/index.js";
13
- import re from "../../../locale/use-locale.js";
14
- import { PICKER_BASE_INJECTION_KEY as le } from "../constants.js";
15
- import { panelTimePickerProps as ce } from "../props/panel-time-picker.js";
16
- import { useTimePanel as pe } from "../composables/use-time-panel.js";
17
- import { useOldValue as me, buildAvailableTimeSlotGetter as ue } from "../composables/use-time-picker.js";
18
- import de from "./basic-time-spinner.vue2.js";
19
- const Pe = /* @__PURE__ */ Q({
13
+ import { PICKER_BASE_INJECTION_KEY as ae } from "../constants.js";
14
+ import { panelTimePickerProps as ie } from "../props/panel-time-picker.js";
15
+ import { useTimePanel as re } from "../composables/use-time-panel.js";
16
+ import { useOldValue as le, buildAvailableTimeSlotGetter as ce } from "../composables/use-time-picker.js";
17
+ import pe from "./basic-time-spinner.vue2.js";
18
+ const _e = /* @__PURE__ */ F({
20
19
  __name: "panel-time-pick",
21
- props: ce,
20
+ props: ie,
22
21
  emits: ["pick", "select-range", "set-picker-option"],
23
- setup(R, { emit: E }) {
24
- const o = R, s = E, _ = W(le), {
25
- arrowControl: D,
22
+ setup(T, { emit: A }) {
23
+ const n = T, o = A, R = L(ae), {
24
+ arrowControl: E,
26
25
  disabledHours: b,
27
26
  disabledMinutes: g,
28
27
  disabledSeconds: v,
29
- defaultValue: N
30
- } = _.props, { getAvailableHours: O, getAvailableMinutes: P, getAvailableSeconds: y } = ue(b, g, v), i = ie("time"), { t: k } = re(), m = w("zh-cn"), h = w([0, 2]), I = me(o), B = d(() => ae(o.actualVisible) ? `${i.namespace.value}-zoom-in-top` : ""), l = d(() => o.format.includes("ss")), K = d(() => o.format.includes("A") ? "A" : o.format.includes("a") ? "a" : ""), x = (e) => {
31
- const t = f(e).locale(m.value), a = u(t);
28
+ defaultValue: _
29
+ } = R.props, { getAvailableHours: N, getAvailableMinutes: O, getAvailableSeconds: D } = ce(b, g, v), i = se("time"), u = C("zh-cn"), k = C([0, 2]), y = le(n), I = d(() => oe(n.actualVisible) ? `${i.namespace.value}-zoom-in-top` : ""), l = d(() => n.format.includes("ss")), P = d(() => n.format.includes("A") ? "A" : n.format.includes("a") ? "a" : ""), B = (e) => {
30
+ const t = f(e).locale(u.value), a = m(t);
32
31
  return t.isSame(a);
33
- }, z = () => {
34
- s("pick", I.value, !1);
35
- }, M = (e = !1, t = !1) => {
36
- t || s("pick", o.parsedValue, e);
37
- }, U = (e) => {
38
- if (!o.visible)
32
+ }, K = () => {
33
+ o("pick", y.value, !1);
34
+ }, x = (e = !1, t = !1) => {
35
+ t || o("pick", n.parsedValue, e);
36
+ }, z = (e) => {
37
+ if (!n.visible)
39
38
  return;
40
- const t = u(e).millisecond(0);
41
- s("pick", t, !0);
42
- }, $ = (e, t) => {
43
- s("select-range", e, t), h.value = [e, t];
44
- }, j = (e) => {
39
+ const t = m(e).millisecond(0);
40
+ o("pick", t, !0);
41
+ }, M = (e, t) => {
42
+ o("select-range", e, t), k.value = [e, t];
43
+ }, U = (e) => {
45
44
  const t = [0, 3].concat(l.value ? [6] : []), a = ["hours", "minutes"].concat(
46
45
  l.value ? ["seconds"] : []
47
- ), c = (t.indexOf(h.value[0]) + e + t.length) % t.length;
48
- V.start_emitSelectRange(a[c]);
49
- }, H = (e) => {
50
- const t = e.code, { left: a, right: S, up: c, down: F } = se;
51
- if ([a, S].includes(t)) {
52
- j(t === a ? -1 : 1), e.preventDefault();
46
+ ), c = (t.indexOf(k.value[0]) + e + t.length) % t.length;
47
+ h.start_emitSelectRange(a[c]);
48
+ }, $ = (e) => {
49
+ const t = e.code, { left: a, right: V, up: c, down: q } = ne;
50
+ if ([a, V].includes(t)) {
51
+ U(t === a ? -1 : 1), e.preventDefault();
53
52
  return;
54
53
  }
55
- if ([c, F].includes(t)) {
56
- const C = t === c ? -1 : 1;
57
- V.start_scrollDown(C), e.preventDefault();
54
+ if ([c, q].includes(t)) {
55
+ const S = t === c ? -1 : 1;
56
+ h.start_scrollDown(S), e.preventDefault();
58
57
  }
59
- }, { timePickerOptions: V, onSetOption: G, getAvailableTime: J } = pe({
60
- getAvailableHours: O,
61
- getAvailableMinutes: P,
62
- getAvailableSeconds: y
63
- }), u = (e) => J(e, o.datetimeRole || "", !0), L = (e) => e ? f(e, o.format).locale(m.value) : null, Y = (e) => e ? e.format(o.format) : null, q = () => f(N).locale(m.value);
64
- return s("set-picker-option", ["isValidValue", x]), s("set-picker-option", ["formatToString", Y]), s("set-picker-option", ["parseUserInput", L]), s("set-picker-option", ["handleKeydownInput", H]), s("set-picker-option", ["getRangeAvailableTime", u]), s("set-picker-option", ["getDefaultValue", q]), (e, t) => (T(), X(Z, { name: B.value }, {
65
- default: ee(() => [
66
- e.actualVisible || e.visible ? (T(), te("div", {
58
+ }, { timePickerOptions: h, onSetOption: j, getAvailableTime: H } = re({
59
+ getAvailableHours: N,
60
+ getAvailableMinutes: O,
61
+ getAvailableSeconds: D
62
+ }), m = (e) => H(e, n.datetimeRole || "", !0), G = (e) => e ? f(e, n.format).locale(u.value) : null, J = (e) => e ? e.format(n.format) : null, Y = () => f(_).locale(u.value);
63
+ return o("set-picker-option", ["isValidValue", B]), o("set-picker-option", ["formatToString", J]), o("set-picker-option", ["parseUserInput", G]), o("set-picker-option", ["handleKeydownInput", $]), o("set-picker-option", ["getRangeAvailableTime", m]), o("set-picker-option", ["getDefaultValue", Y]), (e, t) => (w(), Q(W, { name: I.value }, {
64
+ default: X(() => [
65
+ e.actualVisible || e.visible ? (w(), Z("div", {
67
66
  key: 0,
68
- class: r(n(i).b("panel"))
67
+ class: r(s(i).b("panel"))
69
68
  }, [
70
69
  p("div", {
71
- class: r([n(i).be("panel", "content"), { "has-seconds": l.value }])
70
+ class: r([s(i).be("panel", "content"), { "has-seconds": l.value }])
72
71
  }, [
73
- ne(de, {
72
+ ee(pe, {
74
73
  ref: "spinner",
75
74
  role: e.datetimeRole || "start",
76
- "arrow-control": n(D),
75
+ "arrow-control": s(E),
77
76
  "show-seconds": l.value,
78
- "am-pm-mode": K.value,
77
+ "am-pm-mode": P.value,
79
78
  "spinner-date": e.parsedValue,
80
- "disabled-hours": n(b),
81
- "disabled-minutes": n(g),
82
- "disabled-seconds": n(v),
83
- onChange: U,
84
- onSetOption: n(G),
85
- onSelectRange: $
79
+ "disabled-hours": s(b),
80
+ "disabled-minutes": s(g),
81
+ "disabled-seconds": s(v),
82
+ onChange: z,
83
+ onSetOption: s(j),
84
+ onSelectRange: M
86
85
  }, null, 8, ["role", "arrow-control", "show-seconds", "am-pm-mode", "spinner-date", "disabled-hours", "disabled-minutes", "disabled-seconds", "onSetOption"])
87
86
  ], 2),
88
87
  p("div", {
89
- class: r(n(i).be("panel", "footer"))
88
+ class: r(s(i).be("panel", "footer"))
90
89
  }, [
91
90
  p("button", {
92
91
  type: "button",
93
- class: r(["cancel", [n(i).be("panel", "btn")]]),
94
- onClick: z
95
- }, A(n(k)("vft.timePicker.cancel")), 3),
92
+ class: r(["cancel", [s(i).be("panel", "btn")]]),
93
+ onClick: K
94
+ }, " 取消 ", 2),
96
95
  p("button", {
97
96
  type: "button",
98
- class: r(["confirm", [n(i).be("panel", "btn")]]),
99
- onClick: t[0] || (t[0] = (a) => M())
100
- }, A(n(k)("vft.timePicker.confirm")), 3)
97
+ class: r(["confirm", [s(i).be("panel", "btn")]]),
98
+ onClick: t[0] || (t[0] = (a) => x())
99
+ }, " 确认 ", 2)
101
100
  ], 2)
102
- ], 2)) : oe("", !0)
101
+ ], 2)) : te("", !0)
103
102
  ]),
104
103
  _: 1
105
104
  }, 8, ["name"]));
106
105
  }
107
106
  });
108
107
  export {
109
- Pe as default
108
+ _e as default
110
109
  };