@solar-taro/ui-vant 1.4.1 → 1.4.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,13 @@
1
+ ## 1.4.1 (2025-10-13)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **ui-vant/selector:** add option-start and option-end slots
6
+
7
+ ### ❤️ Thank You
8
+
9
+ - HyperLife1119
10
+
1
11
  ## 1.4.0 (2025-10-11)
2
12
 
3
13
  ### 🚀 Features
package/index11.js CHANGED
@@ -1,10 +1,10 @@
1
- import { defineComponent as H, ref as L, computed as g, renderSlot as J, openBlock as Q, createElementBlock as U, createCommentVNode as X, mergeProps as Y, resolveDirective as Z, withDirectives as _, unref as x, toDisplayString as ee, createTextVNode as le, createElementVNode as oe, normalizeClass as te, withCtx as ne, createSlots as se, createVNode as ae, normalizeStyle as re, createBlock as ie, Fragment as ue, renderList as de } from "vue";
1
+ import { defineComponent as H, ref as L, computed as b, renderSlot as J, openBlock as Q, createElementBlock as U, createCommentVNode as X, mergeProps as Y, resolveDirective as Z, withDirectives as _, unref as x, toDisplayString as ee, createTextVNode as le, createElementVNode as oe, normalizeClass as te, withCtx as ne, createSlots as se, createVNode as ae, normalizeStyle as re, createBlock as ie, Fragment as ue, renderList as de } from "vue";
2
2
  import { useFilterList as pe } from "@solar-taro/core";
3
3
  import { SunLazyRender as ce, SunVirtualScroll as fe } from "@solar-taro/ui-sun";
4
4
  import C from "./index31.js";
5
5
  import E from "./index6.js";
6
6
  import ve from "./index7.js";
7
- const d = J, s = Q, r = U, f = X, F = Y, me = Z, O = _, p = x, R = ee, ye = le, v = oe, P = te, u = ne, j = se, I = ae, z = re, N = ie, T = ue, he = de, ge = ["label", "value", "placeholder", "required", "disabled"], be = {
7
+ const u = J, s = Q, r = U, f = X, F = Y, me = Z, O = _, p = x, R = ee, ye = le, v = oe, P = te, d = ne, j = se, I = ae, z = re, N = ie, T = ue, he = de, ge = ["label", "value", "placeholder", "required", "disabled"], be = {
8
8
  key: 1,
9
9
  name: "right-icon"
10
10
  }, ke = ["label", "value", "placeholder", "use-right-icon-slot", "disabled"], Ve = {
@@ -33,16 +33,16 @@ const d = J, s = Q, r = U, f = X, F = Y, me = Z, O = _, p = x, R = ee, ye = le,
33
33
  virtual: { type: [Boolean, Object] },
34
34
  refresher: { type: Boolean },
35
35
  refreshing: { type: Boolean },
36
- compareWith: { type: Function, default: (b, k) => b === k }
36
+ compareWith: { type: Function, default: (k, V) => k === V }
37
37
  },
38
38
  emits: ["update:modelValue", "select", "unselect", "clear", "close", "confirm", "refresh"],
39
- setup(b, { expose: k, emit: M }) {
40
- const t = b, i = M, V = L(!1), $ = L(!1), { keyword: W, filteredList: S } = pe(
39
+ setup(k, { expose: V, emit: M }) {
40
+ const t = k, i = M, $ = L(!1), m = L(!1), { keyword: W, filteredList: S } = pe(
41
41
  () => t.options,
42
42
  (e, l) => e[t.labelKey].includes(l.value)
43
- ), K = g(() => {
43
+ ), K = b(() => {
44
44
  var e;
45
- if (m.value) {
45
+ if (y.value) {
46
46
  const l = C(t.modelValue) ? null : t.options.find(
47
47
  (n) => t.compareWith(n[t.valueKey], t.modelValue)
48
48
  );
@@ -54,7 +54,7 @@ const d = J, s = Q, r = U, f = X, F = Y, me = Z, O = _, p = x, R = ee, ye = le,
54
54
  return ((n = t.options.find((o) => t.compareWith(o[t.valueKey], l))) == null ? void 0 : n[t.labelKey]) || "";
55
55
  }
56
56
  ).join(t.delimiter);
57
- }), w = g(() => !C(t.modelValue) && !t.required), m = g(() => t.mode === "single"), A = g(() => {
57
+ }), w = b(() => !C(t.modelValue) && !t.required), y = b(() => t.mode === "single"), A = b(() => {
58
58
  var n, o;
59
59
  let e, l = 47;
60
60
  return typeof t.virtual != "boolean" && (n = t.virtual) != null && n.itemSize && (l = (o = t.virtual) == null ? void 0 : o.itemSize), { id: e, itemSize: l };
@@ -62,15 +62,15 @@ const d = J, s = Q, r = U, f = X, F = Y, me = Z, O = _, p = x, R = ee, ye = le,
62
62
  function a(e) {
63
63
  var n;
64
64
  const l = e[t.valueKey];
65
- return m.value ? C(t.modelValue) ? !1 : t.compareWith(t.modelValue, l) : ((n = t.modelValue) == null ? void 0 : n.some((o) => t.compareWith(o, l))) || !1;
65
+ return y.value ? C(t.modelValue) ? !1 : t.compareWith(t.modelValue, l) : ((n = t.modelValue) == null ? void 0 : n.some((o) => t.compareWith(o, l))) || !1;
66
66
  }
67
- function y() {
68
- t.disabled || (V.value = !0, $.value || setTimeout(() => {
69
- $.value = !0;
67
+ function h() {
68
+ t.disabled || ($.value = !0, m.value || setTimeout(() => {
69
+ m.value = !0;
70
70
  }, 300));
71
71
  }
72
- function h() {
73
- V.value = !1, i("close");
72
+ function g() {
73
+ $.value = !1, i("close");
74
74
  }
75
75
  function q() {
76
76
  var l;
@@ -79,12 +79,12 @@ const d = J, s = Q, r = U, f = X, F = Y, me = Z, O = _, p = x, R = ee, ye = le,
79
79
  (o) => t.compareWith(o[t.valueKey], n)
80
80
  )
81
81
  )) || [];
82
- i("confirm", e), h();
82
+ i("confirm", e), g();
83
83
  }
84
84
  function D(e) {
85
85
  const l = e[t.valueKey];
86
86
  let n = t.modelValue;
87
- m.value ? (a(e) ? t.required || (i("unselect", e), n = null) : (i("select", e), n = l), h()) : a(e) ? (i("unselect", e), n = t.modelValue.filter(
87
+ y.value ? (a(e) ? t.required || (i("unselect", e), n = null) : (i("select", e), n = l), g()) : a(e) ? (i("unselect", e), n = t.modelValue.filter(
88
88
  (o) => !t.compareWith(o, l)
89
89
  )) : (i("select", e), n = (t.modelValue || []).concat(
90
90
  e[t.valueKey]
@@ -93,14 +93,14 @@ const d = J, s = Q, r = U, f = X, F = Y, me = Z, O = _, p = x, R = ee, ye = le,
93
93
  function B() {
94
94
  i("clear", t.modelValue), i("update:modelValue", null);
95
95
  }
96
- return k({
97
- present: y,
96
+ return V({
97
+ present: h,
98
98
  clear: B
99
99
  }), (e, l) => {
100
100
  const n = me("readonly");
101
101
  return s(), r(T, null, [
102
- d(e.$slots, "default", {
103
- present: y,
102
+ u(e.$slots, "default", {
103
+ present: h,
104
104
  label: K.value
105
105
  }, () => [
106
106
  e.type === "field" ? O((s(), r("van-field", F({ key: 0 }, e.$attrs, {
@@ -110,7 +110,7 @@ const d = J, s = Q, r = U, f = X, F = Y, me = Z, O = _, p = x, R = ee, ye = le,
110
110
  placeholder: e.placeholder,
111
111
  required: e.required,
112
112
  disabled: e.disabled,
113
- onClickInput: l[1] || (l[1] = (o) => y())
113
+ onClickInput: l[1] || (l[1] = (o) => h())
114
114
  }), [
115
115
  w.value ? (s(), r("van-icon", {
116
116
  key: 0,
@@ -119,7 +119,7 @@ const d = J, s = Q, r = U, f = X, F = Y, me = Z, O = _, p = x, R = ee, ye = le,
119
119
  onTap: l[0] || (l[0] = (o) => B())
120
120
  }, null, 32)) : f("", !0),
121
121
  e.$slots.end ? (s(), r("slot-view", be, [
122
- d(e.$slots, "end")
122
+ u(e.$slots, "end")
123
123
  ])) : f("", !0)
124
124
  ], 16, ge)), [
125
125
  [n]
@@ -132,7 +132,7 @@ const d = J, s = Q, r = U, f = X, F = Y, me = Z, O = _, p = x, R = ee, ye = le,
132
132
  shape: "round",
133
133
  clearable: !1,
134
134
  disabled: e.disabled,
135
- onClickInput: l[3] || (l[3] = (o) => y())
135
+ onClickInput: l[3] || (l[3] = (o) => h())
136
136
  }), [
137
137
  w.value ? (s(), r("van-icon", {
138
138
  key: 0,
@@ -141,31 +141,33 @@ const d = J, s = Q, r = U, f = X, F = Y, me = Z, O = _, p = x, R = ee, ye = le,
141
141
  onTap: l[2] || (l[2] = (o) => B())
142
142
  }, null, 32)) : f("", !0),
143
143
  e.$slots.end ? (s(), r("slot-view", Ve, [
144
- d(e.$slots, "end")
144
+ u(e.$slots, "end")
145
145
  ])) : f("", !0)
146
146
  ], 16, ke)), [
147
147
  [n]
148
148
  ]) : f("", !0)
149
149
  ]),
150
150
  I(p(ce), { hook: "created" }, {
151
- default: u(() => [
151
+ default: d(() => [
152
152
  v("van-action-sheet", {
153
- show: V.value,
153
+ show: $.value,
154
154
  title: e.placeholder,
155
155
  "close-on-click-overlay": !0,
156
- onClose: l[8] || (l[8] = (o) => h()),
157
- onCancel: l[9] || (l[9] = (o) => h())
156
+ onClose: l[8] || (l[8] = (o) => g()),
157
+ onCancel: l[9] || (l[9] = (o) => g())
158
158
  }, [
159
- e.searchable ? (s(), r("van-search", {
160
- key: 0,
161
- shape: "round",
162
- "input-align": "center",
163
- value: p(W),
164
- placeholder: "输入关键字搜索",
165
- onChange: l[4] || (l[4] = (o) => W.value = o.detail.trim())
166
- }, null, 40, Se)) : f("", !0),
167
- e.virtual ? (s(), r(T, { key: 1 }, [
168
- $.value ? (s(), N(p(fe), {
159
+ u(e.$slots, "filter", { rendered: m.value }, () => [
160
+ e.searchable ? (s(), r("van-search", {
161
+ key: 0,
162
+ shape: "round",
163
+ "input-align": "center",
164
+ value: p(W),
165
+ placeholder: "输入关键字搜索",
166
+ onChange: l[4] || (l[4] = (o) => W.value = o.detail.trim())
167
+ }, null, 40, Se)) : f("", !0)
168
+ ]),
169
+ e.virtual ? (s(), r(T, { key: 0 }, [
170
+ m.value ? (s(), N(p(fe), {
169
171
  key: 0,
170
172
  class: "sun-selector-options",
171
173
  refresher: e.refresher,
@@ -176,29 +178,28 @@ const d = J, s = Q, r = U, f = X, F = Y, me = Z, O = _, p = x, R = ee, ye = le,
176
178
  style: z({ height: e.height }),
177
179
  onRefresh: l[5] || (l[5] = (o) => i("refresh"))
178
180
  }, {
179
- default: u(({ item: o, index: c }) => [
181
+ default: d(({ item: o, index: c }) => [
180
182
  I(p(E), {
181
- lass: "sun-selector-option",
182
- class: P({ "sun-selector-option-active": a(o) }),
183
+ class: P(["sun-selector-option", { "sun-selector-option-active": a(o) }]),
183
184
  clickable: !0,
184
185
  onTap: (G) => D(o)
185
186
  }, j({
186
- start: u(() => [
187
- d(e.$slots, "option-start", {
187
+ start: d(() => [
188
+ u(e.$slots, "option-start", {
188
189
  option: o,
189
190
  index: c,
190
191
  active: a(o)
191
192
  })
192
193
  ]),
193
- end: u(() => [
194
- d(e.$slots, "option-end", {
194
+ end: d(() => [
195
+ u(e.$slots, "option-end", {
195
196
  option: o,
196
197
  index: c,
197
198
  active: a(o)
198
199
  })
199
200
  ]),
200
- default: u(() => [
201
- d(e.$slots, "option", {
201
+ default: d(() => [
202
+ u(e.$slots, "option", {
202
203
  option: o,
203
204
  index: c,
204
205
  active: a(o)
@@ -210,7 +211,7 @@ const d = J, s = Q, r = U, f = X, F = Y, me = Z, O = _, p = x, R = ee, ye = le,
210
211
  }, [
211
212
  a(o) ? {
212
213
  name: "end",
213
- fn: u(() => [
214
+ fn: d(() => [
214
215
  l[10] || (l[10] = v("van-icon", {
215
216
  class: "sun-selector-option-icon",
216
217
  name: "success"
@@ -226,7 +227,7 @@ const d = J, s = Q, r = U, f = X, F = Y, me = Z, O = _, p = x, R = ee, ye = le,
226
227
  style: z({ height: e.height })
227
228
  }, null, 4))
228
229
  ], 64)) : (s(), N(p(ve), {
229
- key: 2,
230
+ key: 1,
230
231
  class: "sun-selector-options",
231
232
  refresher: e.refresher,
232
233
  refreshing: e.refreshing,
@@ -236,30 +237,29 @@ const d = J, s = Q, r = U, f = X, F = Y, me = Z, O = _, p = x, R = ee, ye = le,
236
237
  style: z({ height: e.height }),
237
238
  onRefresh: l[6] || (l[6] = (o) => i("refresh"))
238
239
  }, {
239
- default: u(() => [
240
+ default: d(() => [
240
241
  (s(!0), r(T, null, he(p(S), (o, c) => (s(), N(p(E), {
241
242
  key: o[e.valueKey],
242
- lass: "sun-selector-option",
243
- class: P({ "sun-selector-option-active": a(o) }),
243
+ class: P(["sun-selector-option", { "sun-selector-option-active": a(o) }]),
244
244
  clickable: !0,
245
245
  onTap: (G) => D(o)
246
246
  }, j({
247
- start: u(() => [
248
- d(e.$slots, "option-start", {
247
+ start: d(() => [
248
+ u(e.$slots, "option-start", {
249
249
  option: o,
250
250
  index: c,
251
251
  active: a(o)
252
252
  })
253
253
  ]),
254
- end: u(() => [
255
- d(e.$slots, "option-end", {
254
+ end: d(() => [
255
+ u(e.$slots, "option-end", {
256
256
  option: o,
257
257
  index: c,
258
258
  active: a(o)
259
259
  })
260
260
  ]),
261
- default: u(() => [
262
- d(e.$slots, "option", {
261
+ default: d(() => [
262
+ u(e.$slots, "option", {
263
263
  option: o,
264
264
  index: c,
265
265
  active: a(o)
@@ -271,7 +271,7 @@ const d = J, s = Q, r = U, f = X, F = Y, me = Z, O = _, p = x, R = ee, ye = le,
271
271
  }, [
272
272
  a(o) ? {
273
273
  name: "end",
274
- fn: u(() => [
274
+ fn: d(() => [
275
275
  l[11] || (l[11] = v("van-icon", {
276
276
  class: "sun-selector-option-icon",
277
277
  slot: "right-icon",
@@ -284,8 +284,8 @@ const d = J, s = Q, r = U, f = X, F = Y, me = Z, O = _, p = x, R = ee, ye = le,
284
284
  ]),
285
285
  _: 3
286
286
  }, 8, ["refresher", "refreshing", "data", "loading", "style"])),
287
- d(e.$slots, "footer", { confirm: q }, () => [
288
- m.value ? f("", !0) : (s(), r("view", we, [
287
+ u(e.$slots, "footer", { confirm: q }, () => [
288
+ y.value ? f("", !0) : (s(), r("view", we, [
289
289
  v("van-button", {
290
290
  type: "primary",
291
291
  round: "true",
package/index17.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/index18.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index5.js";
1
+ import f from "./index4.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 "./index3.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index20.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index3.js";
1
+ import f from "./index6.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index21.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index7.js";
1
+ import f from "./index9.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index22.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/index23.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/index24.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index10.js";
1
+ import f from "./index11.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index25.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index12.js";
1
+ import f from "./index10.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index26.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index11.js";
1
+ import f from "./index12.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index28.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ref as n, effect as t, pauseTracking as f, resetTracking as a } from "./index61.js";
1
+ import { ref as n, effect as t, pauseTracking as f, resetTracking as a } from "./index65.js";
2
2
  function i(e) {
3
3
  const r = n(e());
4
4
  return t(() => r.value = e()), r;
package/index29.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "rxjs";
2
2
  import { ref as i } from "vue";
3
- import { takeUntilDestroyed as p } from "./index60.js";
3
+ import { takeUntilDestroyed as p } from "./index64.js";
4
4
  function c(t, o) {
5
5
  const e = i(o);
6
6
  return (typeof t == "function" ? t() : t).pipe(p()).subscribe((r) => {
package/index32.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import S from "./index68.js";
2
2
  import L from "./index66.js";
3
- import B from "./index62.js";
3
+ import B from "./index61.js";
4
4
  import I from "./index69.js";
5
5
  import O from "./index70.js";
6
6
  import _ from "./index71.js";
package/index56.js CHANGED
@@ -1,4 +1,4 @@
1
- import a from "./index65.js";
1
+ import a from "./index63.js";
2
2
  import e from "./index88.js";
3
3
  var s = Object.prototype, n = s.hasOwnProperty;
4
4
  function f(r) {
package/index58.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import a from "./index45.js";
2
- import i from "./index65.js";
2
+ import i from "./index63.js";
3
3
  import n from "./index101.js";
4
4
  var e = Object.prototype, p = e.hasOwnProperty;
5
5
  function v(r) {
package/index60.js CHANGED
@@ -1,9 +1,14 @@
1
- import { takeUntil as e } from "rxjs";
2
- import { useDestroyed as o } from "./index30.js";
3
- function i() {
4
- const t = o();
5
- return e(t);
1
+ import m from "./index61.js";
2
+ import t from "./index62.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;
6
11
  }
7
12
  export {
8
- i as takeUntilDestroyed
13
+ v as default
9
14
  };