@solar-taro/ui-vant 2.6.0 → 2.6.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 2.6.1 (2026-02-03)
2
+
3
+ This was a version bump only for ui-vant to align it with other projects, there were no code changes.
4
+
5
+ ## 2.6.0 (2026-02-03)
6
+
7
+ This was a version bump only for ui-vant to align it with other projects, there were no code changes.
8
+
1
9
  ## 2.5.3 (2026-01-24)
2
10
 
3
11
  ### 🩹 Fixes
@@ -25,6 +25,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
25
25
  present: () => void;
26
26
  label: string;
27
27
  }): any;
28
+ end?(_: {}): any;
28
29
  };
29
30
  emit: (((evt: "close") => void) & ((evt: "select", args_0: TreeNode<T>) => void) & ((evt: "clear", args_0: unknown) => void)) & ((evt: "update:modelValue", value: unknown) => void);
30
31
  }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
package/index.scss CHANGED
@@ -156,6 +156,7 @@ van-button {
156
156
 
157
157
  .van-button-container {
158
158
  padding: 12px;
159
+ width: 100%;
159
160
  bottom: var(--safe-bottom);
160
161
  bottom: max(var(--safe-bottom) - 12px, 0px);
161
162
  }
package/index10.js CHANGED
@@ -1,16 +1,10 @@
1
- import { defineComponent as J, ref as F, computed as m, renderSlot as Q, openBlock as X, createElementBlock as Y, createCommentVNode as Z, mergeProps as _, resolveDirective as x, withDirectives as ee, createElementVNode as le, unref as te, toDisplayString as oe, createTextVNode as se, normalizeClass as ae, withCtx as ne, createSlots as re, createVNode as ie, normalizeStyle as ue, createBlock as de, Fragment as pe, renderList as ce } from "vue";
1
+ import { defineComponent as J, ref as F, computed as m, renderSlot as Q, openBlock as X, createElementBlock as Y, createCommentVNode as Z, createElementVNode as _, mergeProps as x, resolveDirective as ee, withDirectives as le, unref as te, toDisplayString as oe, createTextVNode as ne, normalizeClass as re, withCtx as se, createSlots as ae, createVNode as ie, normalizeStyle as ue, createBlock as de, Fragment as pe, renderList as ce } from "vue";
2
2
  import { useFilterList as fe } from "@solar-taro/core";
3
3
  import { SunLazyRender as ve, SunVirtualScroll as me, SunItem as O } from "@solar-taro/ui-sun";
4
4
  import B from "./index25.js";
5
5
  import he from "./index7.js";
6
6
  import ye from "./index6.js";
7
- const d = Q, a = X, i = Y, v = Z, R = _, be = x, I = ee, V = le, p = te, M = oe, ge = se, P = ae, n = ne, C = re, z = ie, T = ue, N = de, W = pe, ke = ce, Ve = ["label", "value", "placeholder", "required", "disabled"], $e = {
8
- key: 1,
9
- name: "right-icon"
10
- }, we = ["label", "value", "placeholder", "use-right-icon-slot", "disabled"], Se = {
11
- key: 1,
12
- name: "right-icon"
13
- }, Ke = ["value"], Be = { class: "sun-selector-option-label" }, De = /* @__PURE__ */ J({
7
+ const u = Q, s = X, d = Y, h = Z, v = _, R = x, be = ee, I = le, p = te, M = oe, ge = ne, P = re, r = se, C = ae, z = ie, T = ue, N = de, q = pe, Ve = ce, ke = ["label", "value", "placeholder", "required", "disabled"], $e = { name: "right-icon" }, we = ["label", "value", "placeholder", "use-right-icon-slot", "disabled"], Se = { name: "right-icon" }, Ke = ["value"], Be = { class: "sun-selector-option-label" }, De = /* @__PURE__ */ J({
14
8
  __name: "index",
15
9
  props: {
16
10
  type: { default: "field" },
@@ -27,7 +21,6 @@ const d = Q, a = X, i = Y, v = Z, R = _, be = x, I = ee, V = le, p = te, M = oe,
27
21
  disabled: { type: Boolean },
28
22
  delimiter: { default: ", " },
29
23
  searchable: { type: Boolean, default: !0 },
30
- clearable: { type: Boolean, default: !0 },
31
24
  searcher: {},
32
25
  virtual: { type: [Boolean, Object] },
33
26
  refresher: { type: Boolean },
@@ -36,129 +29,127 @@ const d = Q, a = X, i = Y, v = Z, R = _, be = x, I = ee, V = le, p = te, M = oe,
36
29
  },
37
30
  emits: ["update:modelValue", "select", "unselect", "clear", "close", "confirm", "refresh"],
38
31
  setup($, { expose: w, emit: j }) {
39
- const o = $, u = j, h = F(!1), y = F(!1), A = m(() => o.searcher || ((e, l) => e[o.labelKey].toLowerCase().includes(l))), { keyword: q, filteredList: S } = fe(() => o.options, A.value), K = m(() => {
32
+ const o = $, i = j, y = F(!1), b = F(!1), A = m(() => o.searcher || ((e, l) => e[o.labelKey].toLowerCase().includes(l))), { keyword: W, filteredList: S } = fe(() => o.options, A.value), K = m(() => {
40
33
  var e;
41
34
  if (c.value) {
42
35
  const l = B(o.modelValue) ? null : o.options.find(
43
- (s) => o.compareWith(s[o.valueKey], o.modelValue)
36
+ (n) => o.compareWith(n[o.valueKey], o.modelValue)
44
37
  );
45
38
  return (l == null ? void 0 : l[o.labelKey]) || "";
46
39
  }
47
40
  return (e = o.modelValue) == null ? void 0 : e.map(
48
41
  (l) => {
49
- var s;
50
- return ((s = o.options.find((t) => o.compareWith(t[o.valueKey], l))) == null ? void 0 : s[o.labelKey]) || "";
42
+ var n;
43
+ return ((n = o.options.find((t) => o.compareWith(t[o.valueKey], l))) == null ? void 0 : n[o.labelKey]) || "";
51
44
  }
52
45
  ).join(o.delimiter);
53
- }), b = m(() => !G(o.modelValue) && o.clearable), c = m(() => o.mode === "single"), U = m(() => {
54
- var s, t;
46
+ }), g = m(() => !G(o.modelValue) && !o.required), c = m(() => o.mode === "single"), U = m(() => {
47
+ var n, t;
55
48
  let e, l = 47;
56
- return typeof o.virtual != "boolean" && (s = o.virtual) != null && s.itemSize && (l = (t = o.virtual) == null ? void 0 : t.itemSize), { id: e, itemSize: l };
49
+ return typeof o.virtual != "boolean" && (n = o.virtual) != null && n.itemSize && (l = (t = o.virtual) == null ? void 0 : t.itemSize), { id: e, itemSize: l };
57
50
  });
58
51
  function G(e) {
59
52
  return B(e) ? !0 : c.value ? !1 : e.length < 1;
60
53
  }
61
- function r(e) {
62
- var s;
54
+ function a(e) {
55
+ var n;
63
56
  const l = e[o.valueKey];
64
- return c.value ? B(o.modelValue) ? !1 : o.compareWith(o.modelValue, l) : ((s = o.modelValue) == null ? void 0 : s.some((t) => o.compareWith(t, l))) || !1;
57
+ return c.value ? B(o.modelValue) ? !1 : o.compareWith(o.modelValue, l) : ((n = o.modelValue) == null ? void 0 : n.some((t) => o.compareWith(t, l))) || !1;
65
58
  }
66
- function g() {
67
- o.disabled || (h.value = !0, y.value || setTimeout(() => {
68
- y.value = !0;
59
+ function V() {
60
+ o.disabled || (y.value = !0, b.value || setTimeout(() => {
61
+ b.value = !0;
69
62
  }, 300));
70
63
  }
71
64
  function D() {
72
- h.value = !1, u("close");
65
+ y.value = !1, i("close");
73
66
  }
74
67
  function L() {
75
68
  var l;
76
69
  const e = ((l = o.modelValue) == null ? void 0 : l.map(
77
- (s) => o.options.find(
78
- (t) => o.compareWith(t[o.valueKey], s)
70
+ (n) => o.options.find(
71
+ (t) => o.compareWith(t[o.valueKey], n)
79
72
  )
80
73
  )) || [];
81
- u("confirm", e), D();
74
+ i("confirm", e), D();
82
75
  }
83
76
  function E(e) {
84
77
  const l = e[o.valueKey];
85
- let s = o.modelValue;
86
- c.value ? (r(e) ? o.required || (u("unselect", e), s = null) : (u("select", e), s = l), D()) : r(e) ? (u("unselect", e), s = o.modelValue.filter(
78
+ let n = o.modelValue;
79
+ c.value ? (a(e) ? o.required || (i("unselect", e), n = null) : (i("select", e), n = l), D()) : a(e) ? (i("unselect", e), n = o.modelValue.filter(
87
80
  (t) => !o.compareWith(t, l)
88
- )) : (u("select", e), s = (o.modelValue || []).concat(
81
+ )) : (i("select", e), n = (o.modelValue || []).concat(
89
82
  e[o.valueKey]
90
- )), u("update:modelValue", s);
83
+ )), i("update:modelValue", n);
91
84
  }
92
85
  function k() {
93
- u("clear", o.modelValue), u("update:modelValue", o.required && !c.value ? [] : null);
86
+ i("clear", o.modelValue), i("update:modelValue", o.required && !c.value ? [] : null);
94
87
  }
95
88
  return w({
96
- present: g,
89
+ present: V,
97
90
  clear: k
98
91
  }), (e, l) => {
99
- const s = be("readonly");
100
- return a(), i(W, null, [
101
- d(e.$slots, "default", {
102
- present: g,
92
+ const n = be("readonly");
93
+ return s(), d(q, null, [
94
+ u(e.$slots, "default", {
95
+ present: V,
103
96
  label: K.value
104
97
  }, () => [
105
- e.type === "field" ? I((a(), i("van-field", R({ key: 0 }, e.$attrs, {
98
+ e.type === "field" ? I((s(), d("van-field", R({ key: 0 }, e.$attrs, {
106
99
  class: "sun-selector",
107
100
  label: e.label,
108
101
  value: K.value,
109
102
  placeholder: e.placeholder,
110
103
  required: e.required,
111
104
  disabled: e.disabled,
112
- onClickInput: l[1] || (l[1] = (t) => g())
105
+ onClickInput: l[1] || (l[1] = (t) => V())
113
106
  }), [
114
- b.value ? (a(), i("van-icon", {
115
- key: 0,
116
- slot: "right-icon",
117
- class: "sun-selector-clear-icon",
118
- name: "clear",
119
- onTap: l[0] || (l[0] = (t) => k())
120
- }, null, 32)) : v("", !0),
121
- e.$slots.end ? (a(), i("slot-view", $e, [
122
- d(e.$slots, "end")
123
- ])) : v("", !0)
124
- ], 16, Ve)), [
125
- [s]
126
- ]) : e.type === "search" ? I((a(), i("van-search", R({ key: 1 }, e.$attrs, {
107
+ v("slot-view", $e, [
108
+ g.value ? (s(), d("van-icon", {
109
+ key: 0,
110
+ class: "sun-selector-clear-icon",
111
+ name: "clear",
112
+ onTap: l[0] || (l[0] = (t) => k())
113
+ }, null, 32)) : h("", !0),
114
+ u(e.$slots, "end")
115
+ ])
116
+ ], 16, ke)), [
117
+ [n]
118
+ ]) : e.type === "search" ? I((s(), d("van-search", R({ key: 1 }, e.$attrs, {
127
119
  class: "sun-selector",
128
120
  label: e.label,
129
121
  value: K.value,
130
122
  placeholder: e.placeholder,
131
- "use-right-icon-slot": b.value,
123
+ "use-right-icon-slot": g.value,
132
124
  shape: "round",
133
125
  clearable: !1,
134
126
  disabled: e.disabled,
135
- onClickInput: l[3] || (l[3] = (t) => g())
127
+ onClickInput: l[3] || (l[3] = (t) => V())
136
128
  }), [
137
- b.value ? (a(), i("van-icon", {
138
- key: 0,
139
- slot: "right-icon",
140
- class: "sun-selector-clear-icon",
141
- name: "clear",
142
- onTap: l[2] || (l[2] = (t) => k())
143
- }, null, 32)) : v("", !0),
144
- e.$slots.end ? (a(), i("slot-view", Se, [
145
- d(e.$slots, "end")
146
- ])) : v("", !0)
129
+ v("slot-view", Se, [
130
+ g.value ? (s(), d("van-icon", {
131
+ key: 0,
132
+ class: "sun-selector-clear-icon",
133
+ name: "clear",
134
+ onTap: l[2] || (l[2] = (t) => k())
135
+ }, null, 32)) : h("", !0),
136
+ u(e.$slots, "end")
137
+ ])
147
138
  ], 16, we)), [
148
- [s]
149
- ]) : v("", !0)
139
+ [n]
140
+ ]) : h("", !0)
150
141
  ]),
151
142
  z(p(ve), { hook: "created" }, {
152
- default: n(() => [
143
+ default: r(() => [
153
144
  z(p(he), {
154
- show: h.value,
155
- "onUpdate:show": l[9] || (l[9] = (t) => h.value = t),
145
+ show: y.value,
146
+ "onUpdate:show": l[9] || (l[9] = (t) => y.value = t),
156
147
  title: e.placeholder,
157
148
  "show-buttons": !c.value
158
149
  }, C({
159
- buttons: n(() => [
160
- d(e.$slots, "buttons", { confirm: L }, () => [
161
- c.value ? v("", !0) : (a(), i("van-button", {
150
+ buttons: r(() => [
151
+ u(e.$slots, "buttons", { confirm: L }, () => [
152
+ c.value ? h("", !0) : (s(), d("van-button", {
162
153
  key: 0,
163
154
  type: "primary",
164
155
  round: "true",
@@ -167,19 +158,19 @@ const d = Q, a = X, i = Y, v = Z, R = _, be = x, I = ee, V = le, p = te, M = oe,
167
158
  }, "确定", 32))
168
159
  ])
169
160
  ]),
170
- default: n(() => [
171
- d(e.$slots, "filter", { rendered: y.value }, () => [
172
- e.searchable ? (a(), i("van-search", {
161
+ default: r(() => [
162
+ u(e.$slots, "filter", { rendered: b.value }, () => [
163
+ e.searchable ? (s(), d("van-search", {
173
164
  key: 0,
174
165
  shape: "round",
175
166
  "input-align": "center",
176
- value: p(q),
167
+ value: p(W),
177
168
  placeholder: "输入关键字搜索",
178
- onChange: l[5] || (l[5] = (t) => q.value = t.detail.trim())
179
- }, null, 40, Ke)) : v("", !0)
169
+ onChange: l[5] || (l[5] = (t) => W.value = t.detail.trim())
170
+ }, null, 40, Ke)) : h("", !0)
180
171
  ]),
181
- e.virtual ? (a(), i(W, { key: 0 }, [
182
- y.value ? (a(), N(p(me), {
172
+ e.virtual ? (s(), d(q, { key: 0 }, [
173
+ b.value ? (s(), N(p(me), {
183
174
  key: 0,
184
175
  class: "sun-selector-options",
185
176
  refresher: e.refresher,
@@ -188,43 +179,43 @@ const d = Q, a = X, i = Y, v = Z, R = _, be = x, I = ee, V = le, p = te, M = oe,
188
179
  "item-size": U.value.itemSize,
189
180
  "item-key": e.valueKey,
190
181
  style: T({ height: e.height }),
191
- onRefresh: l[6] || (l[6] = (t) => u("refresh"))
182
+ onRefresh: l[6] || (l[6] = (t) => i("refresh"))
192
183
  }, {
193
- default: n(({ item: t, index: f }) => [
184
+ default: r(({ item: t, index: f }) => [
194
185
  z(p(O), {
195
- class: P(["sun-selector-option", { "sun-selector-option-active": r(t) }]),
186
+ class: P(["sun-selector-option", { "sun-selector-option-active": a(t) }]),
196
187
  clickable: !0,
197
188
  onTap: (H) => E(t)
198
189
  }, C({
199
- start: n(() => [
200
- d(e.$slots, "option-start", {
190
+ start: r(() => [
191
+ u(e.$slots, "option-start", {
201
192
  option: t,
202
193
  index: f,
203
- active: r(t)
194
+ active: a(t)
204
195
  })
205
196
  ]),
206
- end: n(() => [
207
- d(e.$slots, "option-end", {
197
+ end: r(() => [
198
+ u(e.$slots, "option-end", {
208
199
  option: t,
209
200
  index: f,
210
- active: r(t)
201
+ active: a(t)
211
202
  })
212
203
  ]),
213
- default: n(() => [
214
- d(e.$slots, "option", {
204
+ default: r(() => [
205
+ u(e.$slots, "option", {
215
206
  option: t,
216
207
  index: f,
217
- active: r(t)
208
+ active: a(t)
218
209
  }, () => [
219
210
  ge(M(t[e.labelKey]), 1)
220
211
  ])
221
212
  ]),
222
213
  _: 2
223
214
  }, [
224
- r(t) ? {
215
+ a(t) ? {
225
216
  name: "end",
226
- fn: n(() => [
227
- l[10] || (l[10] = V("van-icon", {
217
+ fn: r(() => [
218
+ l[10] || (l[10] = v("van-icon", {
228
219
  class: "sun-selector-option-icon",
229
220
  name: "success"
230
221
  }, null, -1))
@@ -234,11 +225,11 @@ const d = Q, a = X, i = Y, v = Z, R = _, be = x, I = ee, V = le, p = te, M = oe,
234
225
  ]), 1032, ["class", "onTap"])
235
226
  ]),
236
227
  _: 3
237
- }, 8, ["refresher", "refreshing", "items", "item-size", "item-key", "style"])) : (a(), i("view", {
228
+ }, 8, ["refresher", "refreshing", "items", "item-size", "item-key", "style"])) : (s(), d("view", {
238
229
  key: 1,
239
230
  style: T({ height: e.height })
240
231
  }, null, 4))
241
- ], 64)) : (a(), N(p(ye), {
232
+ ], 64)) : (s(), N(p(ye), {
242
233
  key: 1,
243
234
  class: "sun-selector-options",
244
235
  refresher: e.refresher,
@@ -247,44 +238,44 @@ const d = Q, a = X, i = Y, v = Z, R = _, be = x, I = ee, V = le, p = te, M = oe,
247
238
  loading: e.loading,
248
239
  "empty-type": "search",
249
240
  style: T({ height: e.height }),
250
- onRefresh: l[7] || (l[7] = (t) => u("refresh"))
241
+ onRefresh: l[7] || (l[7] = (t) => i("refresh"))
251
242
  }, {
252
- default: n(() => [
253
- (a(!0), i(W, null, ke(p(S), (t, f) => (a(), N(p(O), {
243
+ default: r(() => [
244
+ (s(!0), d(q, null, Ve(p(S), (t, f) => (s(), N(p(O), {
254
245
  key: t[e.valueKey],
255
- class: P(["sun-selector-option", { "sun-selector-option-active": r(t) }]),
246
+ class: P(["sun-selector-option", { "sun-selector-option-active": a(t) }]),
256
247
  clickable: !0,
257
248
  onTap: (H) => E(t)
258
249
  }, C({
259
- start: n(() => [
260
- d(e.$slots, "option-start", {
250
+ start: r(() => [
251
+ u(e.$slots, "option-start", {
261
252
  option: t,
262
253
  index: f,
263
- active: r(t)
254
+ active: a(t)
264
255
  })
265
256
  ]),
266
- end: n(() => [
267
- d(e.$slots, "option-end", {
257
+ end: r(() => [
258
+ u(e.$slots, "option-end", {
268
259
  option: t,
269
260
  index: f,
270
- active: r(t)
261
+ active: a(t)
271
262
  })
272
263
  ]),
273
- default: n(() => [
274
- d(e.$slots, "option", {
264
+ default: r(() => [
265
+ u(e.$slots, "option", {
275
266
  option: t,
276
267
  index: f,
277
- active: r(t)
268
+ active: a(t)
278
269
  }, () => [
279
- V("view", Be, M(t[e.labelKey]), 1)
270
+ v("view", Be, M(t[e.labelKey]), 1)
280
271
  ])
281
272
  ]),
282
273
  _: 2
283
274
  }, [
284
- r(t) ? {
275
+ a(t) ? {
285
276
  name: "end",
286
- fn: n(() => [
287
- l[11] || (l[11] = V("van-icon", {
277
+ fn: r(() => [
278
+ l[11] || (l[11] = v("van-icon", {
288
279
  class: "sun-selector-option-icon",
289
280
  slot: "right-icon",
290
281
  name: "success"
@@ -299,10 +290,10 @@ const d = Q, a = X, i = Y, v = Z, R = _, be = x, I = ee, V = le, p = te, M = oe,
299
290
  ]),
300
291
  _: 2
301
292
  }, [
302
- b.value ? {
293
+ g.value ? {
303
294
  name: "extra",
304
- fn: n(() => [
305
- V("view", {
295
+ fn: r(() => [
296
+ v("view", {
306
297
  class: "sun-selector-clear-btn",
307
298
  onTap: l[4] || (l[4] = (t) => k())
308
299
  }, "清除", 32)
package/index102.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import r from "./index87.js";
2
- import i from "./index123.js";
2
+ import i from "./index118.js";
3
3
  function f(t, a) {
4
4
  var e = i(t, a);
5
5
  return r(e) ? e : void 0;
package/index103.js CHANGED
@@ -1,8 +1,8 @@
1
- import p from "./index118.js";
2
- import a from "./index119.js";
3
- import i from "./index120.js";
4
- import h from "./index121.js";
5
- import s from "./index122.js";
1
+ import p from "./index119.js";
2
+ import a from "./index120.js";
3
+ import i from "./index121.js";
4
+ import h from "./index122.js";
5
+ import s from "./index123.js";
6
6
  function t(e) {
7
7
  var o = -1, l = e == null ? 0 : e.length;
8
8
  for (this.clear(); ++o < l; ) {
package/index116.js CHANGED
@@ -1,8 +1,8 @@
1
- import p from "./index125.js";
2
- import a from "./index126.js";
3
- import l from "./index127.js";
4
- import s from "./index128.js";
5
- import m from "./index129.js";
1
+ import p from "./index126.js";
2
+ import a from "./index127.js";
3
+ import l from "./index128.js";
4
+ import s from "./index129.js";
5
+ import m from "./index130.js";
6
6
  function t(o) {
7
7
  var e = -1, h = o == null ? 0 : o.length;
8
8
  for (this.clear(); ++e < h; ) {
package/index117.js CHANGED
@@ -1,4 +1,4 @@
1
- import e from "./index130.js";
1
+ import e from "./index125.js";
2
2
  function n(r, a) {
3
3
  var t = r.__data__;
4
4
  return e(a) ? t[typeof a == "string" ? "string" : "hash"] : t.map;
package/index118.js CHANGED
@@ -1,6 +1,6 @@
1
- function t() {
2
- this.__data__ = [], this.size = 0;
1
+ function u(e, n) {
2
+ return e == null ? void 0 : e[n];
3
3
  }
4
4
  export {
5
- t as default
5
+ u as default
6
6
  };
package/index119.js CHANGED
@@ -1,12 +1,6 @@
1
- import s from "./index131.js";
2
- var i = Array.prototype, l = i.splice;
3
- function n(r) {
4
- var e = this.__data__, a = s(e, r);
5
- if (a < 0)
6
- return !1;
7
- var t = e.length - 1;
8
- return a == t ? e.pop() : l.call(e, a, 1), --this.size, !0;
1
+ function t() {
2
+ this.__data__ = [], this.size = 0;
9
3
  }
10
4
  export {
11
- n as default
5
+ t as default
12
6
  };
package/index120.js CHANGED
@@ -1,8 +1,12 @@
1
- import d from "./index131.js";
2
- function i(e) {
3
- var t = this.__data__, a = d(t, e);
4
- return a < 0 ? void 0 : t[a][1];
1
+ import s from "./index131.js";
2
+ var i = Array.prototype, l = i.splice;
3
+ function n(r) {
4
+ var e = this.__data__, a = s(e, r);
5
+ if (a < 0)
6
+ return !1;
7
+ var t = e.length - 1;
8
+ return a == t ? e.pop() : l.call(e, a, 1), --this.size, !0;
5
9
  }
6
10
  export {
7
- i as default
11
+ n as default
8
12
  };
package/index121.js CHANGED
@@ -1,7 +1,8 @@
1
- import a from "./index131.js";
2
- function e(t) {
3
- return a(this.__data__, t) > -1;
1
+ import d from "./index131.js";
2
+ function i(e) {
3
+ var t = this.__data__, a = d(t, e);
4
+ return a < 0 ? void 0 : t[a][1];
4
5
  }
5
6
  export {
6
- e as default
7
+ i as default
7
8
  };
package/index122.js CHANGED
@@ -1,8 +1,7 @@
1
- import e from "./index131.js";
2
- function d(s, i) {
3
- var t = this.__data__, a = e(t, s);
4
- return a < 0 ? (++this.size, t.push([s, i])) : t[a][1] = i, this;
1
+ import a from "./index131.js";
2
+ function e(t) {
3
+ return a(this.__data__, t) > -1;
5
4
  }
6
5
  export {
7
- d as default
6
+ e as default
8
7
  };
package/index123.js CHANGED
@@ -1,6 +1,8 @@
1
- function u(e, n) {
2
- return e == null ? void 0 : e[n];
1
+ import e from "./index131.js";
2
+ function d(s, i) {
3
+ var t = this.__data__, a = e(t, s);
4
+ return a < 0 ? (++this.size, t.push([s, i])) : t[a][1] = i, this;
3
5
  }
4
6
  export {
5
- u as default
7
+ d as default
6
8
  };
package/index125.js CHANGED
@@ -1,6 +1,6 @@
1
- import t from "./index132.js";
2
- function e() {
3
- this.__data__ = t ? t(null) : {}, this.size = 0;
1
+ function e(t) {
2
+ var o = typeof t;
3
+ return o == "string" || o == "number" || o == "symbol" || o == "boolean" ? t !== "__proto__" : t === null;
4
4
  }
5
5
  export {
6
6
  e as default
package/index126.js CHANGED
@@ -1,7 +1,7 @@
1
- function s(t) {
2
- var e = this.has(t) && delete this.__data__[t];
3
- return this.size -= e ? 1 : 0, e;
1
+ import t from "./index132.js";
2
+ function e() {
3
+ this.__data__ = t ? t(null) : {}, this.size = 0;
4
4
  }
5
5
  export {
6
- s as default
6
+ e as default
7
7
  };
package/index127.js CHANGED
@@ -1,13 +1,7 @@
1
- import e from "./index132.js";
2
- var n = "__lodash_hash_undefined__", o = Object.prototype, _ = o.hasOwnProperty;
3
- function h(a) {
4
- var r = this.__data__;
5
- if (e) {
6
- var t = r[a];
7
- return t === n ? void 0 : t;
8
- }
9
- return _.call(r, a) ? r[a] : void 0;
1
+ function s(t) {
2
+ var e = this.has(t) && delete this.__data__[t];
3
+ return this.size -= e ? 1 : 0, e;
10
4
  }
11
5
  export {
12
- h as default
6
+ s as default
13
7
  };
package/index128.js CHANGED
@@ -1,9 +1,13 @@
1
- import r from "./index132.js";
2
- var e = Object.prototype, o = e.hasOwnProperty;
3
- function p(t) {
4
- var a = this.__data__;
5
- return r ? a[t] !== void 0 : o.call(a, t);
1
+ import e from "./index132.js";
2
+ var n = "__lodash_hash_undefined__", o = Object.prototype, _ = o.hasOwnProperty;
3
+ function h(a) {
4
+ var r = this.__data__;
5
+ if (e) {
6
+ var t = r[a];
7
+ return t === n ? void 0 : t;
8
+ }
9
+ return _.call(r, a) ? r[a] : void 0;
6
10
  }
7
11
  export {
8
- p as default
12
+ h as default
9
13
  };
package/index129.js CHANGED
@@ -1,9 +1,9 @@
1
- import e from "./index132.js";
2
- var h = "__lodash_hash_undefined__";
3
- function s(t, a) {
4
- var _ = this.__data__;
5
- return this.size += this.has(t) ? 0 : 1, _[t] = e && a === void 0 ? h : a, this;
1
+ import r from "./index132.js";
2
+ var e = Object.prototype, o = e.hasOwnProperty;
3
+ function p(t) {
4
+ var a = this.__data__;
5
+ return r ? a[t] !== void 0 : o.call(a, t);
6
6
  }
7
7
  export {
8
- s as default
8
+ p as default
9
9
  };
package/index130.js CHANGED
@@ -1,7 +1,9 @@
1
- function e(t) {
2
- var o = typeof t;
3
- return o == "string" || o == "number" || o == "symbol" || o == "boolean" ? t !== "__proto__" : t === null;
1
+ import e from "./index132.js";
2
+ var h = "__lodash_hash_undefined__";
3
+ function s(t, a) {
4
+ var _ = this.__data__;
5
+ return this.size += this.has(t) ? 0 : 1, _[t] = e && a === void 0 ? h : a, this;
4
6
  }
5
7
  export {
6
- e as default
8
+ s as default
7
9
  };
package/index16.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index5.js";
1
+ import f from "./index3.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 "./index5.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index18.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index7.js";
1
+ import f from "./index6.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 "./index4.js";
2
2
  export {
3
3
  f as default
4
4
  };
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 "./index9.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 "./index4.js";
1
+ import f from "./index9.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index26.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import S from "./index60.js";
2
2
  import L from "./index58.js";
3
- import B from "./index54.js";
3
+ import B from "./index55.js";
4
4
  import I from "./index61.js";
5
5
  import O from "./index62.js";
6
6
  import _ from "./index63.js";
package/index3.js CHANGED
@@ -1,11 +1,11 @@
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({
1
+ import { defineComponent as Q, mergeModels as _, useModel as W, computed as n, ref as D, renderSlot as X, openBlock as Y, createElementBlock as Z, createCommentVNode as x, createElementVNode as ee, mergeProps as le, resolveDirective as ae, withDirectives as te, unref as ne, renderList as se, Fragment as oe, toDisplayString as re, createTextVNode as ue, normalizeClass as ie, withCtx as de, createSlots as ce, createBlock as ve, normalizeStyle as me, createVNode as pe } from "vue";
2
+ import { tree2list as fe } from "@solar-kit/core";
3
+ import { SunLazyRender as he, SunItem as q } from "@solar-taro/ui-sun";
4
+ import { SunModal as ye } from "@solar-taro/ui-vant";
5
+ import { linkedRef as z, untracked as be } from "@solar-vue/core";
6
+ const E = X, t = Y, s = Z, k = x, m = ee, ke = le, ge = ae, we = te, d = ne, g = se, p = oe, M = re, I = ue, Ke = ie, c = de, Ne = ce, L = ve, F = me, P = pe, Ve = ["label", "value", "placeholder", "required", "disabled"], Ce = { name: "right-icon" }, Se = ["active"], $e = ["name", "title"], Be = ["name"], Me = /* @__PURE__ */ Q({
7
7
  __name: "index",
8
- props: /* @__PURE__ */ D({
8
+ props: /* @__PURE__ */ _({
9
9
  label: {},
10
10
  placeholder: { default: "请选择" },
11
11
  options: {},
@@ -19,15 +19,15 @@ const be = W, t = X, o = Y, b = Z, ke = x, ge = ee, we = le, d = ae, k = te, m =
19
19
  modelValue: {},
20
20
  modelModifiers: {}
21
21
  }),
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(() => {
22
+ emits: /* @__PURE__ */ _(["select", "clear", "close"], ["update:modelValue"]),
23
+ setup(w, { emit: R }) {
24
+ const f = R, o = w, r = W(w, "modelValue"), j = n(() => r.value && !o.required), u = D(!1), K = D(0), U = n(() => fe(o.options)), h = n(() => U.value.find((e) => e.parent && !e.children && e[o.valueKey] === r.value)), A = n(() => {
25
25
  const e = [];
26
- let l = f.value;
26
+ let l = h.value;
27
27
  for (; l; )
28
28
  e.unshift(l), l = l.parent;
29
29
  return e;
30
- }), v = z(() => f.value), h = n(() => {
30
+ }), v = z(() => h.value), y = n(() => {
31
31
  const e = [];
32
32
  let l = v.value;
33
33
  for (; l; )
@@ -36,35 +36,35 @@ const be = W, t = X, o = Y, b = Z, ke = x, ge = ee, we = le, d = ae, k = te, m =
36
36
  }), N = n(() => {
37
37
  const e = v.value;
38
38
  return e ? !e.children : !1;
39
- }), V = n(() => U.value.map((e) => e[s.labelKey]).join(` ${s.delimiter} `)), y = z(
39
+ }), V = n(() => A.value.map((e) => e[o.labelKey]).join(` ${o.delimiter} `)), b = z(
40
40
  () => (
41
41
  // 如果有值,则取 currentNodes 的最后索引,否则为 0
42
- f.value ? ye(() => h.value.length - 1) : 0
42
+ h.value ? be(() => y.value.length - 1) : 0
43
43
  )
44
- ), C = n(() => s.options.filter((e) => !e.parent)), A = n(() => {
44
+ ), C = n(() => o.options.filter((e) => !e.parent)), G = n(() => {
45
45
  const e = v.value;
46
46
  return e ? e.children : C.value;
47
47
  });
48
48
  function S() {
49
- s.disabled || (u.value = !0, K.value++);
50
- }
51
- function G() {
52
- u.value = !1, p("close");
49
+ o.disabled || (u.value = !0, K.value++);
53
50
  }
54
51
  function H() {
55
- p("clear", r.value), r.value = null;
52
+ u.value = !1, f("close");
53
+ }
54
+ function J() {
55
+ f("clear", r.value), r.value = null;
56
56
  }
57
- function B(e) {
58
- v.value = e, p("select", e), N.value ? (r.value = e[s.valueKey], u.value = !1) : y.value++;
57
+ function $(e) {
58
+ v.value = e, f("select", e), N.value ? (r.value = e[o.valueKey], u.value = !1) : b.value++;
59
59
  }
60
60
  return (e, l) => {
61
- const J = ge("readonly");
62
- return t(), o(m, null, [
63
- be(e.$slots, "default", {
61
+ const O = ge("readonly");
62
+ return t(), s(p, null, [
63
+ E(e.$slots, "default", {
64
64
  present: S,
65
65
  label: V.value
66
66
  }, () => [
67
- we((t(), o("van-field", ke(e.$attrs, {
67
+ we((t(), s("van-field", ke(e.$attrs, {
68
68
  class: "sun-cascader",
69
69
  label: e.label,
70
70
  value: V.value,
@@ -73,64 +73,66 @@ const be = W, t = X, o = Y, b = Z, ke = x, ge = ee, we = le, d = ae, k = te, m =
73
73
  disabled: e.disabled,
74
74
  onClickInput: l[1] || (l[1] = (a) => S())
75
75
  }), [
76
- R.value ? (t(), o("van-icon", {
77
- key: 0,
78
- slot: "right-icon",
79
- class: "sun-cascader-clear-icon",
80
- name: "clear",
81
- onTap: l[0] || (l[0] = (a) => H())
82
- }, null, 32)) : b("", !0)
76
+ m("slot-view", Ce, [
77
+ j.value ? (t(), s("van-icon", {
78
+ key: 0,
79
+ class: "sun-cascader-clear-icon",
80
+ name: "clear",
81
+ onTap: l[0] || (l[0] = (a) => J())
82
+ }, null, 32)) : k("", !0),
83
+ E(e.$slots, "end")
84
+ ])
83
85
  ], 16, Ve)), [
84
- [J]
86
+ [O]
85
87
  ])
86
88
  ]),
87
- F(d(fe), { hook: "created" }, {
89
+ P(d(he), { hook: "created" }, {
88
90
  default: c(() => [
89
- F(d(he), {
91
+ P(d(ye), {
90
92
  show: u.value,
91
93
  "onUpdate:show": l[3] || (l[3] = (a) => u.value = a),
92
94
  class: "sun-cascader-modal",
93
95
  title: e.placeholder,
94
96
  "show-buttons": !1,
95
- onClose: l[4] || (l[4] = (a) => G())
97
+ onClose: l[4] || (l[4] = (a) => H())
96
98
  }, {
97
99
  default: c(() => [
98
- K.value ? (t(), o("van-tabs", {
100
+ K.value ? (t(), s("van-tabs", {
99
101
  key: 0,
100
102
  class: "sun-cascader-tabs",
101
- active: d(y),
103
+ active: d(b),
102
104
  "line-width": "30px",
103
105
  "line-height": "4px",
104
106
  animated: "true",
105
- onChange: l[2] || (l[2] = (a) => y.value = a.detail.index)
107
+ onChange: l[2] || (l[2] = (a) => b.value = a.detail.index)
106
108
  }, [
107
- (t(!0), o(m, null, k(h.value, (a, $) => {
109
+ (t(!0), s(p, null, g(y.value, (a, B) => {
108
110
  var T;
109
- return t(), o("van-tab", {
111
+ return t(), s("van-tab", {
110
112
  key: a[e.valueKey],
111
- name: $,
113
+ name: B,
112
114
  class: "sun-cascader-tab",
113
115
  title: a[e.labelKey]
114
116
  }, [
115
- g("view", {
117
+ m("view", {
116
118
  class: "sun-cascader-list",
117
- style: L({ height: e.height })
119
+ style: F({ height: e.height })
118
120
  }, [
119
- (t(!0), o(m, null, k(((T = a.parent) == null ? void 0 : T.children) || C.value, (i) => (t(), I(d(q), {
121
+ (t(!0), s(p, null, g(((T = a.parent) == null ? void 0 : T.children) || C.value, (i) => (t(), L(d(q), {
120
122
  key: i[e.valueKey],
121
123
  class: Ke(["sun-cascader-option", { "sun-cascader-option-active": a[e.valueKey] === i[e.valueKey] }]),
122
124
  clickable: !0,
123
- onTap: ($e) => B(i)
125
+ onTap: (Te) => $(i)
124
126
  }, Ne({
125
127
  default: c(() => [
126
- M(E(i[e.labelKey]) + " ", 1)
128
+ I(M(i[e.labelKey]) + " ", 1)
127
129
  ]),
128
130
  _: 2
129
131
  }, [
130
132
  a[e.valueKey] === i[e.valueKey] ? {
131
133
  name: "end",
132
134
  fn: c(() => [
133
- l[5] || (l[5] = g("van-icon", {
135
+ l[5] || (l[5] = m("van-icon", {
134
136
  class: "sun-cascader-option-icon",
135
137
  name: "success"
136
138
  }, null, -1))
@@ -139,33 +141,33 @@ const be = W, t = X, o = Y, b = Z, ke = x, ge = ee, we = le, d = ae, k = te, m =
139
141
  } : void 0
140
142
  ]), 1032, ["class", "onTap"]))), 128))
141
143
  ], 4)
142
- ], 8, Se);
144
+ ], 8, $e);
143
145
  }), 128)),
144
- N.value ? b("", !0) : (t(), o("van-tab", {
146
+ N.value ? k("", !0) : (t(), s("van-tab", {
145
147
  key: 0,
146
- name: h.value.length,
148
+ name: y.value.length,
147
149
  class: "sun-cascader-tab",
148
150
  title: "请选择",
149
151
  "title-style": "color:#94a3b8"
150
152
  }, [
151
- g("view", {
153
+ m("view", {
152
154
  class: "sun-cascader-list",
153
- style: L({ height: e.height })
155
+ style: F({ height: e.height })
154
156
  }, [
155
- (t(!0), o(m, null, k(A.value, (a) => (t(), I(d(q), {
157
+ (t(!0), s(p, null, g(G.value, (a) => (t(), L(d(q), {
156
158
  key: a[e.valueKey],
157
159
  class: "sun-cascader-option",
158
160
  clickable: !0,
159
- onTap: ($) => B(a)
161
+ onTap: (B) => $(a)
160
162
  }, {
161
163
  default: c(() => [
162
- M(E(a[e.labelKey]), 1)
164
+ I(M(a[e.labelKey]), 1)
163
165
  ]),
164
166
  _: 2
165
167
  }, 1032, ["onTap"]))), 128))
166
168
  ], 4)
167
169
  ], 8, Be))
168
- ], 40, Ce)) : b("", !0)
170
+ ], 40, Se)) : k("", !0)
169
171
  ]),
170
172
  _: 1
171
173
  }, 8, ["show", "title"])
@@ -177,5 +179,5 @@ const be = W, t = X, o = Y, b = Z, ke = x, ge = ee, we = le, d = ae, k = te, m =
177
179
  }
178
180
  });
179
181
  export {
180
- Ee as default
182
+ Me as default
181
183
  };
package/index54.js CHANGED
@@ -1,10 +1,14 @@
1
- import t from "./index55.js";
2
- import i from "./index27.js";
3
- var s = Object.prototype, p = s.hasOwnProperty;
4
- function l(r, a, o) {
5
- var n = r[a];
6
- (!(p.call(r, a) && i(n, o)) || o === void 0 && !(a in r)) && t(r, a, o);
1
+ import m from "./index55.js";
2
+ import t from "./index56.js";
3
+ function v(a, f, i, u) {
4
+ var d = !i;
5
+ i || (i = {});
6
+ for (var s = -1, e = f.length; ++s < e; ) {
7
+ var n = f[s], r = void 0;
8
+ r === void 0 && (r = a[n]), d ? t(i, n, r) : m(i, n, r);
9
+ }
10
+ return i;
7
11
  }
8
12
  export {
9
- l as default
13
+ v as default
10
14
  };
package/index55.js CHANGED
@@ -1,12 +1,10 @@
1
- import u from "./index59.js";
2
- function i(r, e, t) {
3
- e == "__proto__" && u ? u(r, e, {
4
- configurable: !0,
5
- enumerable: !0,
6
- value: t,
7
- writable: !0
8
- }) : r[e] = t;
1
+ import t from "./index56.js";
2
+ import i from "./index27.js";
3
+ var s = Object.prototype, p = s.hasOwnProperty;
4
+ function l(r, a, o) {
5
+ var n = r[a];
6
+ (!(p.call(r, a) && i(n, o)) || o === void 0 && !(a in r)) && t(r, a, o);
9
7
  }
10
8
  export {
11
- i as default
9
+ l as default
12
10
  };
package/index56.js CHANGED
@@ -1,14 +1,12 @@
1
- import m from "./index54.js";
2
- import t from "./index55.js";
3
- function v(a, f, i, u) {
4
- var d = !i;
5
- i || (i = {});
6
- for (var s = -1, e = f.length; ++s < e; ) {
7
- var n = f[s], r = void 0;
8
- r === void 0 && (r = a[n]), d ? t(i, n, r) : m(i, n, r);
9
- }
10
- return i;
1
+ import u from "./index59.js";
2
+ function i(r, e, t) {
3
+ e == "__proto__" && u ? u(r, e, {
4
+ configurable: !0,
5
+ enumerable: !0,
6
+ value: t,
7
+ writable: !0
8
+ }) : r[e] = t;
11
9
  }
12
10
  export {
13
- v as default
11
+ i as default
14
12
  };
package/index61.js CHANGED
@@ -1,4 +1,4 @@
1
- import o from "./index56.js";
1
+ import o from "./index54.js";
2
2
  import e from "./index48.js";
3
3
  function m(r, t) {
4
4
  return r && o(t, e(t), r);
package/index62.js CHANGED
@@ -1,4 +1,4 @@
1
- import t from "./index56.js";
1
+ import t from "./index54.js";
2
2
  import o from "./index51.js";
3
3
  function i(n, r) {
4
4
  return n && t(r, o(r), n);
package/index65.js CHANGED
@@ -1,4 +1,4 @@
1
- import m from "./index56.js";
1
+ import m from "./index54.js";
2
2
  import r from "./index109.js";
3
3
  function f(o, t) {
4
4
  return m(o, r(o), t);
package/index66.js CHANGED
@@ -1,4 +1,4 @@
1
- import m from "./index56.js";
1
+ import m from "./index54.js";
2
2
  import r from "./index101.js";
3
3
  function e(o, t) {
4
4
  return m(o, r(o), t);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solar-taro/ui-vant",
3
- "version": "2.6.0",
3
+ "version": "2.6.2",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",
@@ -23,7 +23,6 @@ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable
23
23
  /** 多选模式下,分割符 */
24
24
  delimiter?: string;
25
25
  searchable?: boolean;
26
- clearable?: boolean;
27
26
  searcher?: (option: T, keyword: string) => boolean;
28
27
  virtual?: boolean | {
29
28
  itemSize?: number;