@solar-taro/ui-vant 2.5.0 → 2.5.2

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 (136) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/cascader/index.scss +6 -0
  3. package/directives/binding.d.ts +10 -0
  4. package/directives/index.d.ts +1 -0
  5. package/index.js +18 -16
  6. package/index10.js +213 -196
  7. package/index100.js +7 -10
  8. package/index101.js +9 -6
  9. package/index102.js +6 -17
  10. package/index103.js +17 -4
  11. package/index104.js +4 -4
  12. package/index105.js +4 -3
  13. package/index106.js +3 -3
  14. package/index107.js +3 -14
  15. package/index108.js +14 -7
  16. package/index109.js +8 -6
  17. package/index110.js +5 -5
  18. package/index111.js +5 -5
  19. package/index112.js +5 -5
  20. package/index113.js +5 -5
  21. package/index114.js +6 -3
  22. package/index115.js +3 -18
  23. package/index116.js +17 -5
  24. package/index117.js +5 -3
  25. package/index118.js +3 -3
  26. package/index119.js +3 -9
  27. package/index12.js +3 -28
  28. package/index120.js +9 -5
  29. package/index121.js +5 -4
  30. package/index122.js +4 -5
  31. package/index123.js +6 -3
  32. package/index124.js +3 -5
  33. package/index125.js +4 -4
  34. package/index126.js +4 -10
  35. package/index127.js +10 -6
  36. package/index128.js +6 -6
  37. package/index129.js +6 -4
  38. package/index13.js +28 -4
  39. package/index130.js +4 -7
  40. package/index131.js +8 -3
  41. package/index132.js +5 -0
  42. package/index14.js +5 -64
  43. package/index15.js +64 -2
  44. package/index16.js +1 -1
  45. package/index17.js +1 -1
  46. package/index18.js +1 -1
  47. package/index19.js +1 -1
  48. package/index2.js +1 -1
  49. package/index20.js +1 -1
  50. package/index21.js +1 -1
  51. package/index22.js +1 -1
  52. package/index23.js +2 -6
  53. package/index24.js +5 -3
  54. package/index25.js +3 -62
  55. package/index26.js +62 -3
  56. package/index27.js +4 -8
  57. package/index28.js +7 -6
  58. package/index29.js +6 -3
  59. package/index3.js +62 -59
  60. package/index30.js +4 -2
  61. package/index31.js +2 -6
  62. package/index32.js +5 -9
  63. package/index33.js +9 -4
  64. package/index34.js +5 -4
  65. package/index35.js +4 -3
  66. package/index36.js +3 -4
  67. package/index37.js +3 -7
  68. package/index38.js +7 -4
  69. package/index39.js +5 -5
  70. package/index4.js +1 -1
  71. package/index40.js +5 -7
  72. package/index41.js +6 -5
  73. package/index42.js +6 -9
  74. package/index43.js +9 -5
  75. package/index44.js +5 -7
  76. package/index45.js +6 -4
  77. package/index46.js +5 -10
  78. package/index47.js +9 -6
  79. package/index48.js +6 -17
  80. package/index49.js +17 -11
  81. package/index5.js +1 -1
  82. package/index50.js +11 -6
  83. package/index51.js +6 -12
  84. package/index52.js +12 -3
  85. package/index53.js +3 -11
  86. package/index54.js +11 -7
  87. package/index55.js +7 -9
  88. package/index56.js +9 -5
  89. package/index58.js +1 -1
  90. package/index59.js +5 -15
  91. package/index60.js +15 -5
  92. package/index61.js +5 -5
  93. package/index62.js +5 -8
  94. package/index63.js +8 -6
  95. package/index64.js +6 -5
  96. package/index65.js +4 -4
  97. package/index66.js +5 -6
  98. package/index67.js +5 -5
  99. package/index68.js +7 -26
  100. package/index69.js +26 -6
  101. package/index7.js +25 -19
  102. package/index70.js +5 -39
  103. package/index71.js +39 -6
  104. package/index72.js +6 -5
  105. package/index73.js +6 -15
  106. package/index74.js +14 -7
  107. package/index75.js +8 -2
  108. package/index76.js +2 -3
  109. package/index77.js +3 -13
  110. package/index78.js +12 -4
  111. package/index79.js +5 -3
  112. package/index8.js +1 -1
  113. package/index80.js +3 -4
  114. package/index81.js +4 -4
  115. package/index82.js +4 -4
  116. package/index83.js +4 -4
  117. package/index84.js +4 -4
  118. package/index85.js +3 -14
  119. package/index86.js +14 -13
  120. package/index87.js +13 -8
  121. package/index88.js +9 -3
  122. package/index89.js +3 -6
  123. package/index90.js +5 -5
  124. package/index91.js +5 -5
  125. package/index92.js +5 -7
  126. package/index93.js +7 -17
  127. package/index94.js +17 -10
  128. package/index95.js +9 -4
  129. package/index96.js +5 -4
  130. package/index97.js +4 -4
  131. package/index98.js +4 -5
  132. package/index99.js +5 -6
  133. package/modal/index.vue.d.ts +1 -0
  134. package/package.json +1 -1
  135. package/selector/index.scss +11 -0
  136. package/selector/index.vue.d.ts +2 -1
package/index14.js CHANGED
@@ -1,66 +1,7 @@
1
- const i = {};
2
- function e(r) {
3
- Object.assign(i, r);
4
- }
5
- class a {
6
- constructor() {
7
- this.duration = 2e3;
8
- }
9
- primary(n, t = "#van-notify") {
10
- return i.notify({ type: "primary", message: n, duration: this.duration, selector: t });
11
- }
12
- success(n, t = "#van-notify") {
13
- return i.notify({ type: "success", message: n, duration: this.duration, selector: t });
14
- }
15
- warning(n, t = "#van-notify") {
16
- return i.notify({ type: "warning", message: n, duration: this.duration, selector: t });
17
- }
18
- danger(n, t = "#van-notify") {
19
- return i.notify({ type: "danger", message: n, duration: this.duration, selector: t });
20
- }
21
- dismiss() {
22
- return i.notify.clear();
23
- }
24
- }
25
- class s {
26
- /**
27
- * 展示确认对话框
28
- * @param title
29
- * @param message
30
- * @param options 其他 dialog 选项
31
- */
32
- confirm(n, t, o) {
33
- return i.dialog.confirm({
34
- title: n,
35
- message: t,
36
- ...o
37
- });
38
- }
39
- /**
40
- * 展示警告对话框
41
- * @param title
42
- * @param message
43
- * @param options 其他 dialog 选项
44
- */
45
- alert(n, t, o) {
46
- return i.dialog.alert({
47
- title: n,
48
- message: t,
49
- ...o
50
- });
51
- }
52
- /**
53
- * 关闭对话框
54
- */
55
- dismiss() {
56
- return i.dialog.close();
57
- }
58
- }
59
- const u = new s(), c = new a();
1
+ const r = (t, o) => {
2
+ var e;
3
+ t.setAttribute("readonly", (e = o.value) != null ? e : !0);
4
+ };
60
5
  export {
61
- s as Dialog,
62
- a as Notify,
63
- u as dialog,
64
- c as notify,
65
- e as setupOverlay
6
+ r as vReadonly
66
7
  };
package/index15.js CHANGED
@@ -1,4 +1,66 @@
1
- import f from "./index7.js";
1
+ const i = {};
2
+ function e(r) {
3
+ Object.assign(i, r);
4
+ }
5
+ class a {
6
+ constructor() {
7
+ this.duration = 2e3;
8
+ }
9
+ primary(n, t = "#van-notify") {
10
+ return i.notify({ type: "primary", message: n, duration: this.duration, selector: t });
11
+ }
12
+ success(n, t = "#van-notify") {
13
+ return i.notify({ type: "success", message: n, duration: this.duration, selector: t });
14
+ }
15
+ warning(n, t = "#van-notify") {
16
+ return i.notify({ type: "warning", message: n, duration: this.duration, selector: t });
17
+ }
18
+ danger(n, t = "#van-notify") {
19
+ return i.notify({ type: "danger", message: n, duration: this.duration, selector: t });
20
+ }
21
+ dismiss() {
22
+ return i.notify.clear();
23
+ }
24
+ }
25
+ class s {
26
+ /**
27
+ * 展示确认对话框
28
+ * @param title
29
+ * @param message
30
+ * @param options 其他 dialog 选项
31
+ */
32
+ confirm(n, t, o) {
33
+ return i.dialog.confirm({
34
+ title: n,
35
+ message: t,
36
+ ...o
37
+ });
38
+ }
39
+ /**
40
+ * 展示警告对话框
41
+ * @param title
42
+ * @param message
43
+ * @param options 其他 dialog 选项
44
+ */
45
+ alert(n, t, o) {
46
+ return i.dialog.alert({
47
+ title: n,
48
+ message: t,
49
+ ...o
50
+ });
51
+ }
52
+ /**
53
+ * 关闭对话框
54
+ */
55
+ dismiss() {
56
+ return i.dialog.close();
57
+ }
58
+ }
59
+ const u = new s(), c = new a();
2
60
  export {
3
- f as default
61
+ s as Dialog,
62
+ a as Notify,
63
+ u as dialog,
64
+ c as notify,
65
+ e as setupOverlay
4
66
  };
package/index16.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index5.js";
1
+ import f from "./index6.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index17.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index3.js";
1
+ import f from "./index4.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index18.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index4.js";
1
+ import f from "./index5.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index19.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index6.js";
1
+ import f from "./index9.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index2.js CHANGED
@@ -1,4 +1,4 @@
1
- import { vReadonly as r } from "./index13.js";
1
+ import { vReadonly as r } from "./index14.js";
2
2
  const a = {
3
3
  install(o) {
4
4
  o.directive("readonly", r);
package/index20.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index8.js";
1
+ import f from "./index7.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index21.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index10.js";
1
+ import f from "./index8.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index22.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index9.js";
1
+ import f from "./index3.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index23.js CHANGED
@@ -1,8 +1,4 @@
1
- import o from "./index25.js";
2
- var r = 1, n = 4;
3
- function L(e) {
4
- return o(e, r | n);
5
- }
1
+ import f from "./index10.js";
6
2
  export {
7
- L as default
3
+ f as default
8
4
  };
package/index24.js CHANGED
@@ -1,6 +1,8 @@
1
- function n(l) {
2
- return l == null;
1
+ import o from "./index26.js";
2
+ var r = 1, n = 4;
3
+ function L(e) {
4
+ return o(e, r | n);
3
5
  }
4
6
  export {
5
- n as default
7
+ L as default
6
8
  };
package/index25.js CHANGED
@@ -1,65 +1,6 @@
1
- import S from "./index59.js";
2
- import L from "./index57.js";
3
- import B from "./index54.js";
4
- import I from "./index60.js";
5
- import O from "./index61.js";
6
- import _ from "./index62.js";
7
- import M from "./index63.js";
8
- import l from "./index64.js";
9
- import w from "./index65.js";
10
- import D from "./index66.js";
11
- import G from "./index67.js";
12
- import N from "./index68.js";
13
- import U from "./index69.js";
14
- import h from "./index70.js";
15
- import x from "./index71.js";
16
- import K from "./index30.js";
17
- import P from "./index34.js";
18
- import R from "./index39.js";
19
- import W from "./index38.js";
20
- import Y from "./index43.js";
21
- import q from "./index47.js";
22
- import H from "./index50.js";
23
- var J = 1, Q = 2, V = 4, A = "[object Arguments]", X = "[object Array]", Z = "[object Boolean]", $ = "[object Date]", u = "[object Error]", d = "[object Function]", z = "[object GeneratorFunction]", k = "[object Map]", v = "[object Number]", E = "[object Object]", rr = "[object RegExp]", or = "[object Set]", tr = "[object String]", er = "[object Symbol]", ir = "[object WeakMap]", nr = "[object ArrayBuffer]", fr = "[object DataView]", ar = "[object Float32Array]", mr = "[object Float64Array]", cr = "[object Int8Array]", gr = "[object Int16Array]", pr = "[object Int32Array]", br = "[object Uint8Array]", Tr = "[object Uint8ClampedArray]", jr = "[object Uint16Array]", yr = "[object Uint32Array]", o = {};
24
- o[A] = o[X] = o[nr] = o[fr] = o[Z] = o[$] = o[ar] = o[mr] = o[cr] = o[gr] = o[pr] = o[k] = o[v] = o[E] = o[rr] = o[or] = o[tr] = o[er] = o[br] = o[Tr] = o[jr] = o[yr] = !0;
25
- o[u] = o[d] = o[ir] = !1;
26
- function p(r, f, g, sr, b, i) {
27
- var t, m = f & J, c = f & Q, F = f & V;
28
- if (t !== void 0)
29
- return t;
30
- if (!W(r))
31
- return r;
32
- var T = K(r);
33
- if (T) {
34
- if (t = U(r), !m)
35
- return M(r, t);
36
- } else {
37
- var a = N(r), j = a == d || a == z;
38
- if (P(r))
39
- return _(r, m);
40
- if (a == E || a == A || j && !b) {
41
- if (t = c || j ? {} : x(r), !m)
42
- return c ? w(r, O(t, r)) : l(r, I(t, r));
43
- } else {
44
- if (!o[a])
45
- return b ? r : {};
46
- t = h(r, a, m);
47
- }
48
- }
49
- i || (i = new S());
50
- var y = i.get(r);
51
- if (y)
52
- return y;
53
- i.set(r, t), Y(r) ? r.forEach(function(e) {
54
- t.add(p(e, f, g, e, r, i));
55
- }) : R(r) && r.forEach(function(e, n) {
56
- t.set(n, p(e, f, g, n, r, i));
57
- });
58
- var C = F ? c ? G : D : c ? H : q, s = T ? void 0 : C(r);
59
- return L(s || r, function(e, n) {
60
- s && (n = e, e = r[n]), B(t, n, p(e, f, g, n, r, i));
61
- }), t;
1
+ function n(l) {
2
+ return l == null;
62
3
  }
63
4
  export {
64
- p as default
5
+ n as default
65
6
  };
package/index26.js CHANGED
@@ -1,6 +1,65 @@
1
- function t(n, f) {
2
- return n === f || n !== n && f !== f;
1
+ import S from "./index60.js";
2
+ import L from "./index57.js";
3
+ import B from "./index55.js";
4
+ import I from "./index61.js";
5
+ import O from "./index62.js";
6
+ import _ from "./index63.js";
7
+ import M from "./index64.js";
8
+ import l from "./index65.js";
9
+ import w from "./index66.js";
10
+ import D from "./index67.js";
11
+ import G from "./index68.js";
12
+ import N from "./index69.js";
13
+ import U from "./index70.js";
14
+ import h from "./index71.js";
15
+ import x from "./index72.js";
16
+ import K from "./index31.js";
17
+ import P from "./index35.js";
18
+ import R from "./index40.js";
19
+ import W from "./index39.js";
20
+ import Y from "./index44.js";
21
+ import q from "./index48.js";
22
+ import H from "./index51.js";
23
+ var J = 1, Q = 2, V = 4, A = "[object Arguments]", X = "[object Array]", Z = "[object Boolean]", $ = "[object Date]", u = "[object Error]", d = "[object Function]", z = "[object GeneratorFunction]", k = "[object Map]", v = "[object Number]", E = "[object Object]", rr = "[object RegExp]", or = "[object Set]", tr = "[object String]", er = "[object Symbol]", ir = "[object WeakMap]", nr = "[object ArrayBuffer]", fr = "[object DataView]", ar = "[object Float32Array]", mr = "[object Float64Array]", cr = "[object Int8Array]", gr = "[object Int16Array]", pr = "[object Int32Array]", br = "[object Uint8Array]", Tr = "[object Uint8ClampedArray]", jr = "[object Uint16Array]", yr = "[object Uint32Array]", o = {};
24
+ o[A] = o[X] = o[nr] = o[fr] = o[Z] = o[$] = o[ar] = o[mr] = o[cr] = o[gr] = o[pr] = o[k] = o[v] = o[E] = o[rr] = o[or] = o[tr] = o[er] = o[br] = o[Tr] = o[jr] = o[yr] = !0;
25
+ o[u] = o[d] = o[ir] = !1;
26
+ function p(r, f, g, sr, b, i) {
27
+ var t, m = f & J, c = f & Q, F = f & V;
28
+ if (t !== void 0)
29
+ return t;
30
+ if (!W(r))
31
+ return r;
32
+ var T = K(r);
33
+ if (T) {
34
+ if (t = U(r), !m)
35
+ return M(r, t);
36
+ } else {
37
+ var a = N(r), j = a == d || a == z;
38
+ if (P(r))
39
+ return _(r, m);
40
+ if (a == E || a == A || j && !b) {
41
+ if (t = c || j ? {} : x(r), !m)
42
+ return c ? w(r, O(t, r)) : l(r, I(t, r));
43
+ } else {
44
+ if (!o[a])
45
+ return b ? r : {};
46
+ t = h(r, a, m);
47
+ }
48
+ }
49
+ i || (i = new S());
50
+ var y = i.get(r);
51
+ if (y)
52
+ return y;
53
+ i.set(r, t), Y(r) ? r.forEach(function(e) {
54
+ t.add(p(e, f, g, e, r, i));
55
+ }) : R(r) && r.forEach(function(e, n) {
56
+ t.set(n, p(e, f, g, n, r, i));
57
+ });
58
+ var C = F ? c ? G : D : c ? H : q, s = T ? void 0 : C(r);
59
+ return L(s || r, function(e, n) {
60
+ s && (n = e, e = r[n]), B(t, n, p(e, f, g, n, r, i));
61
+ }), t;
3
62
  }
4
63
  export {
5
- t as default
64
+ p as default
6
65
  };
package/index27.js CHANGED
@@ -1,10 +1,6 @@
1
- import e from "./index28.js";
2
- import o from "./index29.js";
3
- var t = Object.prototype, a = t.hasOwnProperty, n = t.propertyIsEnumerable, c = e(/* @__PURE__ */ function() {
4
- return arguments;
5
- }()) ? e : function(r) {
6
- return o(r) && a.call(r, "callee") && !n.call(r, "callee");
7
- };
1
+ function t(n, f) {
2
+ return n === f || n !== n && f !== f;
3
+ }
8
4
  export {
9
- c as default
5
+ t as default
10
6
  };
package/index28.js CHANGED
@@ -1,9 +1,10 @@
1
- import t from "./index37.js";
2
1
  import e from "./index29.js";
3
- var s = "[object Arguments]";
4
- function m(r) {
5
- return e(r) && t(r) == s;
6
- }
2
+ import o from "./index30.js";
3
+ var t = Object.prototype, a = t.hasOwnProperty, n = t.propertyIsEnumerable, c = e(/* @__PURE__ */ function() {
4
+ return arguments;
5
+ }()) ? e : function(r) {
6
+ return o(r) && a.call(r, "callee") && !n.call(r, "callee");
7
+ };
7
8
  export {
8
- m as default
9
+ c as default
9
10
  };
package/index29.js CHANGED
@@ -1,6 +1,9 @@
1
- function e(t) {
2
- return t != null && typeof t == "object";
1
+ import t from "./index38.js";
2
+ import e from "./index30.js";
3
+ var s = "[object Arguments]";
4
+ function m(r) {
5
+ return e(r) && t(r) == s;
3
6
  }
4
7
  export {
5
- e as default
8
+ m as default
6
9
  };
package/index3.js CHANGED
@@ -1,16 +1,11 @@
1
- import { defineComponent as J, mergeModels as T, useModel as O, computed as n, ref as D, renderSlot as Q, openBlock as W, createElementBlock as X, createCommentVNode as Y, mergeProps as Z, resolveDirective as x, withDirectives as ee, unref as le, renderList as ae, Fragment as te, toDisplayString as ne, createElementVNode as oe, createTextVNode as se, normalizeClass as re, withCtx as ue, createSlots as ie, createBlock as de, normalizeStyle as ce, createVNode as ve } from "vue";
2
- import { tree2list as me } from "@solar-kit/core";
3
- import { SunLazyRender as pe, SunItem as _ } from "@solar-taro/ui-sun";
4
- import { SunModal as fe } from "@solar-taro/ui-vant";
5
- import { linkedRef as q, untracked as he } from "@solar-vue/core";
6
- const ye = Q, t = W, o = X, b = Y, be = Z, ke = x, ge = ee, d = le, k = ae, m = te, z = ne, g = oe, E = se, we = re, c = ue, Ke = ie, M = de, I = ce, L = ve, Ne = ["label", "value", "placeholder", "required", "disabled"], Ve = ["active"], Ce = ["title"], Se = {
7
- key: 0,
8
- class: "sun-cascader-tab",
9
- title: "请选择",
10
- "title-style": "color:#94a3b8"
11
- }, ze = /* @__PURE__ */ J({
1
+ import { defineComponent as O, mergeModels as D, useModel as Q, computed as n, ref as _, renderSlot as W, openBlock as X, createElementBlock as Y, createCommentVNode as Z, mergeProps as x, resolveDirective as ee, withDirectives as le, unref as ae, renderList as te, Fragment as ne, toDisplayString as oe, createElementVNode as se, createTextVNode as re, normalizeClass as ue, withCtx as ie, createSlots as de, createBlock as ce, normalizeStyle as ve, createVNode as me } from "vue";
2
+ import { tree2list as pe } from "@solar-kit/core";
3
+ import { SunLazyRender as fe, SunItem as q } from "@solar-taro/ui-sun";
4
+ import { SunModal as he } from "@solar-taro/ui-vant";
5
+ import { linkedRef as z, untracked as ye } from "@solar-vue/core";
6
+ const be = W, t = X, o = Y, b = Z, ke = x, ge = ee, we = le, d = ae, k = te, m = ne, E = oe, g = se, M = re, Ke = ue, c = ie, Ne = de, I = ce, L = ve, F = me, Ve = ["label", "value", "placeholder", "required", "disabled"], Ce = ["active"], Se = ["name", "title"], Be = ["name"], Ee = /* @__PURE__ */ O({
12
7
  __name: "index",
13
- props: /* @__PURE__ */ T({
8
+ props: /* @__PURE__ */ D({
14
9
  label: {},
15
10
  placeholder: { default: "请选择" },
16
11
  options: {},
@@ -24,109 +19,111 @@ const ye = Q, t = W, o = X, b = Y, be = Z, ke = x, ge = ee, d = le, k = ae, m =
24
19
  modelValue: {},
25
20
  modelModifiers: {}
26
21
  }),
27
- emits: /* @__PURE__ */ T(["select", "clear", "close"], ["update:modelValue"]),
28
- setup(w, { emit: F }) {
29
- const p = F, s = w, r = O(w, "modelValue"), P = n(() => r.value && !s.required), u = D(!1), K = D(0), R = n(() => me(s.options)), f = n(() => R.value.find((e) => e.parent && !e.children && e[s.valueKey] === r.value)), j = n(() => {
22
+ emits: /* @__PURE__ */ D(["select", "clear", "close"], ["update:modelValue"]),
23
+ setup(w, { emit: P }) {
24
+ const p = P, s = w, r = Q(w, "modelValue"), R = n(() => r.value && !s.required), u = _(!1), K = _(0), j = n(() => pe(s.options)), f = n(() => j.value.find((e) => e.parent && !e.children && e[s.valueKey] === r.value)), U = n(() => {
30
25
  const e = [];
31
26
  let l = f.value;
32
27
  for (; l; )
33
28
  e.unshift(l), l = l.parent;
34
29
  return e;
35
- }), v = q(() => f.value), N = n(() => {
30
+ }), v = z(() => f.value), h = n(() => {
36
31
  const e = [];
37
32
  let l = v.value;
38
33
  for (; l; )
39
34
  e.unshift(l), l = l.parent;
40
35
  return e;
41
- }), V = n(() => {
36
+ }), N = n(() => {
42
37
  const e = v.value;
43
38
  return e ? !e.children : !1;
44
- }), C = n(() => j.value.map((e) => e[s.labelKey]).join(` ${s.delimiter} `)), h = q(
39
+ }), V = n(() => U.value.map((e) => e[s.labelKey]).join(` ${s.delimiter} `)), y = z(
45
40
  () => (
46
41
  // 如果有值,则取 currentNodes 的最后索引,否则为 0
47
- f.value ? he(() => N.value.length - 1) : 0
42
+ f.value ? ye(() => h.value.length - 1) : 0
48
43
  )
49
- ), S = n(() => s.options.filter((e) => !e.parent)), U = n(() => {
44
+ ), C = n(() => s.options.filter((e) => !e.parent)), A = n(() => {
50
45
  const e = v.value;
51
- return e ? e.children : S.value;
46
+ return e ? e.children : C.value;
52
47
  });
53
- function B() {
48
+ function S() {
54
49
  s.disabled || (u.value = !0, K.value++);
55
50
  }
56
- function A() {
51
+ function G() {
57
52
  u.value = !1, p("close");
58
53
  }
59
- function G() {
54
+ function H() {
60
55
  p("clear", r.value), r.value = null;
61
56
  }
62
- function $(e) {
63
- v.value = e, p("select", e), V.value ? (r.value = e[s.valueKey], u.value = !1) : h.value++;
57
+ function B(e) {
58
+ v.value = e, p("select", e), N.value ? (r.value = e[s.valueKey], u.value = !1) : y.value++;
64
59
  }
65
60
  return (e, l) => {
66
- const H = ke("readonly");
61
+ const J = ge("readonly");
67
62
  return t(), o(m, null, [
68
- ye(e.$slots, "default", {
69
- present: B,
70
- label: C.value
63
+ be(e.$slots, "default", {
64
+ present: S,
65
+ label: V.value
71
66
  }, () => [
72
- ge((t(), o("van-field", be(e.$attrs, {
67
+ we((t(), o("van-field", ke(e.$attrs, {
73
68
  class: "sun-cascader",
74
69
  label: e.label,
75
- value: C.value,
70
+ value: V.value,
76
71
  placeholder: e.placeholder,
77
72
  required: e.required,
78
73
  disabled: e.disabled,
79
- onClickInput: l[1] || (l[1] = (a) => B())
74
+ onClickInput: l[1] || (l[1] = (a) => S())
80
75
  }), [
81
- P.value ? (t(), o("van-icon", {
76
+ R.value ? (t(), o("van-icon", {
82
77
  key: 0,
83
78
  slot: "right-icon",
79
+ class: "sun-cascader-clear-icon",
84
80
  name: "clear",
85
- onTap: l[0] || (l[0] = (a) => G())
81
+ onTap: l[0] || (l[0] = (a) => H())
86
82
  }, null, 32)) : b("", !0)
87
- ], 16, Ne)), [
88
- [H]
83
+ ], 16, Ve)), [
84
+ [J]
89
85
  ])
90
86
  ]),
91
- L(d(pe), { hook: "created" }, {
87
+ F(d(fe), { hook: "created" }, {
92
88
  default: c(() => [
93
- L(d(fe), {
89
+ F(d(he), {
94
90
  show: u.value,
95
91
  "onUpdate:show": l[3] || (l[3] = (a) => u.value = a),
96
92
  class: "sun-cascader-modal",
97
93
  title: e.placeholder,
98
94
  "show-buttons": !1,
99
- onClose: l[4] || (l[4] = (a) => A())
95
+ onClose: l[4] || (l[4] = (a) => G())
100
96
  }, {
101
97
  default: c(() => [
102
98
  K.value ? (t(), o("van-tabs", {
103
99
  key: 0,
104
100
  class: "sun-cascader-tabs",
105
- active: d(h),
101
+ active: d(y),
106
102
  "line-width": "30px",
107
103
  "line-height": "4px",
108
104
  animated: "true",
109
- onChange: l[2] || (l[2] = (a) => h.value = a.detail.index)
105
+ onChange: l[2] || (l[2] = (a) => y.value = a.detail.index)
110
106
  }, [
111
- (t(!0), o(m, null, k(N.value, (a) => {
112
- var y;
107
+ (t(!0), o(m, null, k(h.value, (a, $) => {
108
+ var T;
113
109
  return t(), o("van-tab", {
114
110
  key: a[e.valueKey],
111
+ name: $,
115
112
  class: "sun-cascader-tab",
116
113
  title: a[e.labelKey]
117
114
  }, [
118
115
  g("view", {
119
116
  class: "sun-cascader-list",
120
- style: I({ height: e.height })
117
+ style: L({ height: e.height })
121
118
  }, [
122
- (t(!0), o(m, null, k(((y = a.parent) == null ? void 0 : y.children) || S.value, (i) => (t(), M(d(_), {
119
+ (t(!0), o(m, null, k(((T = a.parent) == null ? void 0 : T.children) || C.value, (i) => (t(), I(d(q), {
123
120
  key: i[e.valueKey],
124
- class: we(["sun-cascader-option", { "sun-cascader-option-active": a[e.valueKey] === i[e.valueKey] }]),
121
+ class: Ke(["sun-cascader-option", { "sun-cascader-option-active": a[e.valueKey] === i[e.valueKey] }]),
125
122
  clickable: !0,
126
- onTap: (Be) => $(i)
127
- }, Ke({
123
+ onTap: ($e) => B(i)
124
+ }, Ne({
128
125
  default: c(() => [
129
- E(z(i[e.labelKey]) + " ", 1)
126
+ M(E(i[e.labelKey]) + " ", 1)
130
127
  ]),
131
128
  _: 2
132
129
  }, [
@@ -142,27 +139,33 @@ const ye = Q, t = W, o = X, b = Y, be = Z, ke = x, ge = ee, d = le, k = ae, m =
142
139
  } : void 0
143
140
  ]), 1032, ["class", "onTap"]))), 128))
144
141
  ], 4)
145
- ], 8, Ce);
142
+ ], 8, Se);
146
143
  }), 128)),
147
- V.value ? b("", !0) : (t(), o("van-tab", Se, [
144
+ N.value ? b("", !0) : (t(), o("van-tab", {
145
+ key: 0,
146
+ name: h.value.length,
147
+ class: "sun-cascader-tab",
148
+ title: "请选择",
149
+ "title-style": "color:#94a3b8"
150
+ }, [
148
151
  g("view", {
149
152
  class: "sun-cascader-list",
150
- style: I({ height: e.height })
153
+ style: L({ height: e.height })
151
154
  }, [
152
- (t(!0), o(m, null, k(U.value, (a) => (t(), M(d(_), {
155
+ (t(!0), o(m, null, k(A.value, (a) => (t(), I(d(q), {
153
156
  key: a[e.valueKey],
154
157
  class: "sun-cascader-option",
155
158
  clickable: !0,
156
- onTap: (y) => $(a)
159
+ onTap: ($) => B(a)
157
160
  }, {
158
161
  default: c(() => [
159
- E(z(a[e.labelKey]), 1)
162
+ M(E(a[e.labelKey]), 1)
160
163
  ]),
161
164
  _: 2
162
165
  }, 1032, ["onTap"]))), 128))
163
166
  ], 4)
164
- ]))
165
- ], 40, Ve)) : b("", !0)
167
+ ], 8, Be))
168
+ ], 40, Ce)) : b("", !0)
166
169
  ]),
167
170
  _: 1
168
171
  }, 8, ["show", "title"])
@@ -174,5 +177,5 @@ const ye = Q, t = W, o = X, b = Y, be = Z, ke = x, ge = ee, d = le, k = ae, m =
174
177
  }
175
178
  });
176
179
  export {
177
- ze as default
180
+ Ee as default
178
181
  };
package/index30.js CHANGED
@@ -1,4 +1,6 @@
1
- var r = Array.isArray;
1
+ function e(t) {
2
+ return t != null && typeof t == "object";
3
+ }
2
4
  export {
3
- r as default
5
+ e as default
4
6
  };
package/index31.js CHANGED
@@ -1,8 +1,4 @@
1
- import t from "./index32.js";
2
- import i from "./index33.js";
3
- function e(r) {
4
- return r != null && i(r.length) && !t(r);
5
- }
1
+ var r = Array.isArray;
6
2
  export {
7
- e as default
3
+ r as default
8
4
  };