@vtj/ui 0.8.126 → 0.8.128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -8,10 +8,10 @@ import { useRouter as Cd, RouterView as Db, useRoute as $h, routeLocationKey as
8
8
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
9
9
  * @name @vtj/ui
10
10
  * @author CHC chenhuachun1549@dingtalk.com
11
- * @version 0.8.126
11
+ * @version 0.8.128
12
12
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
13
13
  */
14
- const AI = "0.8.126", _b = {
14
+ const AI = "0.8.128", _b = {
15
15
  default: 14,
16
16
  small: 12,
17
17
  large: 18
@@ -23809,6 +23809,12 @@ const O7 = {
23809
23809
  */
23810
23810
  valueFormatter: {
23811
23811
  type: Function
23812
+ },
23813
+ /**
23814
+ * 弹窗在打开之前回调
23815
+ */
23816
+ beforeInit: {
23817
+ type: Function
23812
23818
  }
23813
23819
  };
23814
23820
  function M7(e, t) {
@@ -23853,7 +23859,7 @@ function M7(e, t) {
23853
23859
  ), tt(s, (g, C) => {
23854
23860
  if (!ic(g, C)) {
23855
23861
  const v = o ? m(g) : g, y = a ? a(v) : v;
23856
- n && Array.isArray(y) && (u.value = u.value.filter((D) => y.includes(D.value))), t("update:modelValue", y), t("change", y, e.data);
23862
+ n && Array.isArray(v) && (u.value = u.value.filter((D) => v.includes(D.value))), t("update:modelValue", y), t("change", y, e.data);
23857
23863
  }
23858
23864
  }), {
23859
23865
  current: s,
@@ -23912,13 +23918,13 @@ const Y0 = /* @__PURE__ */ nt({
23912
23918
  }, S = async (M) => {
23913
23919
  if (o.disabled) return;
23914
23920
  const A = M.target.value;
23915
- if (o.queryKey && (g.value[o.queryKey] = A), D(), !o.multiple && o.preload) {
23921
+ if (o.queryKey && (g.value[o.queryKey] = A), D(), o.beforeInit && await o.beforeInit(), !o.multiple && o.preload) {
23916
23922
  const $ = await y({});
23917
23923
  $?.list && $.list.length === 1 ? (w(), E($.list[0])) : i.value = !0;
23918
23924
  } else
23919
23925
  w(), i.value = !0;
23920
- }, x = () => {
23921
- o.disabled || (w(), i.value = !0);
23926
+ }, x = async () => {
23927
+ o.disabled || (w(), o.beforeInit && await o.beforeInit(), i.value = !0);
23922
23928
  }, E = async (M) => {
23923
23929
  c(M, o.multiple && o.append), i.value = !1, r("picked", M, o.data), await te(), D();
23924
23930
  };