@dazhicheng/ui 1.5.94 → 1.5.96

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.
@@ -101,6 +101,10 @@ export interface FormItemDependencies {
101
101
  * 触发字段
102
102
  */
103
103
  triggerFields: string[];
104
+ /**
105
+ * 是否立刻触发
106
+ */
107
+ immediate?: boolean;
104
108
  }
105
109
  type ComponentProps = ((value: Partial<Record<string, any>>, actions: FormActions) => MaybeComponentProps) | MaybeComponentProps;
106
110
  export interface FormCommonConfig {
package/dist/index.js CHANGED
@@ -22395,30 +22395,31 @@ function $x(e, t) {
22395
22395
  return os(e, t);
22396
22396
  }
22397
22397
  function Wx(e) {
22398
+ var A;
22398
22399
  const t = Xi(), o = gi().form;
22399
22400
  if (!t)
22400
22401
  throw new Error("useDependencies should be used within <TtForm>");
22401
22402
  const n = U(!0), i = U(!1), a = U(!0), l = U(!1), c = U({}), s = U(), u = S(() => {
22402
- var g;
22403
- return (((g = e()) == null ? void 0 : g.triggerFields) ?? []).map((h) => $x(t.value, h));
22403
+ var h;
22404
+ return (((h = e()) == null ? void 0 : h.triggerFields) ?? []).map((p) => $x(t.value, p));
22404
22405
  }), f = () => {
22405
22406
  i.value = !1, n.value = !0, a.value = !0, l.value = !1, s.value = void 0, c.value = {};
22406
22407
  };
22407
22408
  return ue(
22408
22409
  [u, e],
22409
- async ([A, g]) => {
22410
- var y;
22411
- if (!g || !((y = g == null ? void 0 : g.triggerFields) != null && y.length))
22410
+ async ([g, h]) => {
22411
+ var w;
22412
+ if (!h || !((w = h == null ? void 0 : h.triggerFields) != null && w.length))
22412
22413
  return;
22413
22414
  f();
22414
- const { componentProps: h, disabled: p, if: m, required: v, rules: b, show: I, trigger: B } = g, E = t.value;
22415
- if (xe(m)) {
22416
- if (n.value = !!await m(E, o), !n.value) return;
22417
- } else if (Hn(m) && (n.value = m, !n.value))
22415
+ const { componentProps: p, disabled: m, if: v, required: b, rules: I, show: B, trigger: E } = h, y = t.value;
22416
+ if (xe(v)) {
22417
+ if (n.value = !!await v(y, o), !n.value) return;
22418
+ } else if (Hn(v) && (n.value = v, !n.value))
22418
22419
  return;
22419
- xe(I) ? a.value = !!await I(E, o) : Hn(I) && (a.value = I), xe(h) && (c.value = await h(E, o)), xe(b) && (s.value = await b(E, o)), xe(p) ? i.value = !!await p(E, o) : Hn(p) && (i.value = p), xe(v) && (l.value = !!await v(E, o)), xe(B) && await B(E, o);
22420
+ xe(B) ? a.value = !!await B(y, o) : Hn(B) && (a.value = B), xe(p) && (c.value = await p(y, o)), xe(I) && (s.value = await I(y, o)), xe(m) ? i.value = !!await m(y, o) : Hn(m) && (i.value = m), xe(b) && (l.value = !!await b(y, o)), xe(E) && await E(y, o);
22420
22421
  },
22421
- { deep: !0, immediate: !0 }
22422
+ { deep: !0, immediate: ((A = e()) == null ? void 0 : A.immediate) ?? !0 }
22422
22423
  ), {
22423
22424
  dynamicComponentProps: c,
22424
22425
  dynamicRules: s,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dazhicheng/ui",
3
- "version": "1.5.94",
3
+ "version": "1.5.96",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -46,8 +46,8 @@
46
46
  "sortablejs": "^1.15.7",
47
47
  "vee-validate": "^4.15.1",
48
48
  "zod": "^4.3.6",
49
- "@dazhicheng/hooks": "1.4.31",
50
- "@dazhicheng/utils": "1.3.31"
49
+ "@dazhicheng/hooks": "1.4.32",
50
+ "@dazhicheng/utils": "1.3.32"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "@element-plus/icons-vue": "^2.3.0",