@vtj/ui 0.8.107 → 0.8.109

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 yd, RouterView as Sb, useRoute as Sh, 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.107
11
+ * @version 0.8.109
12
12
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
13
13
  */
14
- const RI = "0.8.107", Ob = {
14
+ const RI = "0.8.109", Ob = {
15
15
  default: 14,
16
16
  small: 12,
17
17
  large: 18
@@ -23050,7 +23050,8 @@ function hR(e = []) {
23050
23050
  function Vs(e, t) {
23051
23051
  const { row: n, column: o } = t, { props: r = {}, events: l = {} } = e, { parser: i, stringify: a } = r, s = q({
23052
23052
  get() {
23053
- return i ? i(n[o.field]) : n[o.field];
23053
+ const m = n[o.field];
23054
+ return i ? i(m) : m;
23054
23055
  },
23055
23056
  set(m) {
23056
23057
  n[o.field] = a ? a(m) : m;
@@ -23886,6 +23887,7 @@ const j0 = /* @__PURE__ */ nt({
23886
23887
  }, w = () => {
23887
23888
  a.value?.blur();
23888
23889
  }, S = async (M) => {
23890
+ if (o.disabled) return;
23889
23891
  const A = M.target.value;
23890
23892
  if (o.queryKey && (g.value[o.queryKey] = A), D(), !o.multiple && o.preload) {
23891
23893
  const $ = await y({});
@@ -24162,6 +24164,13 @@ const DR = {
24162
24164
  */
24163
24165
  hidden: {
24164
24166
  type: Boolean
24167
+ },
24168
+ /**
24169
+ * 默认值
24170
+ */
24171
+ defaultValue: {
24172
+ type: [String, Number, Boolean, Object, Array],
24173
+ default: void 0
24165
24174
  }
24166
24175
  };
24167
24176
  async function MR(e, t) {
@@ -24221,7 +24230,7 @@ const RR = {
24221
24230
  props: DR,
24222
24231
  emits: ["update:modelValue", "change", "focus", "blur"],
24223
24232
  setup(e, { expose: t, emit: n }) {
24224
- const o = e, r = n, l = xt(U0, null), i = xt(I2, null), a = xt(G0, null), s = q(() => !l?.proxy || !a ? o.visible : typeof o.visible == "function" ? o.visible(a) : bd(o.visible) ? Object.entries(o.visible).every(([P, B]) => Ma(a, P) === B) : o.visible), c = () => l?.proxy && a && o.name ? Ma(a, o.name) ?? o.modelValue : o.modelValue, u = Ce(c()), { editor: m } = _R(
24233
+ const o = e, r = n, l = xt(U0, null), i = xt(I2, null), a = xt(G0, null), s = q(() => !l?.proxy || !a ? o.visible : typeof o.visible == "function" ? o.visible(a) : bd(o.visible) ? Object.entries(o.visible).every(([P, B]) => Ma(a, P) === B) : o.visible), c = () => l?.proxy && a && o.name ? Ma(a, o.name) ?? o.modelValue ?? o.defaultValue : o.modelValue ?? o.defaultValue, u = Ce(c()), { editor: m } = _R(
24225
24234
  o,
24226
24235
  r,
24227
24236
  s,
@@ -24265,7 +24274,7 @@ const RR = {
24265
24274
  ), tt(
24266
24275
  s,
24267
24276
  ($) => {
24268
- l?.proxy && a && o.name && ($ ? (u.value = c(), Hc(a, o.name, u.value)) : (u.value = void 0, Hc(a, o.name, void 0)));
24277
+ l?.proxy && a && o.name ? $ ? (u.value = c(), Hc(a, o.name, u.value)) : (u.value = void 0, Hc(a, o.name, void 0)) : u.value = o.modelValue ?? o.defaultValue;
24269
24278
  },
24270
24279
  {
24271
24280
  immediate: !0