@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 +10 -0
- package/index11.js +61 -61
- package/index17.js +1 -1
- package/index18.js +1 -1
- package/index19.js +1 -1
- package/index20.js +1 -1
- package/index21.js +1 -1
- package/index22.js +1 -1
- package/index23.js +1 -1
- package/index24.js +1 -1
- package/index25.js +1 -1
- package/index26.js +1 -1
- package/index28.js +1 -1
- package/index29.js +1 -1
- package/index32.js +1 -1
- package/index56.js +1 -1
- package/index58.js +1 -1
- package/index60.js +11 -6
- package/index61.js +7 -793
- package/index62.js +9 -7
- package/index63.js +5 -9
- package/index64.js +6 -11
- package/index65.js +793 -5
- package/index69.js +1 -1
- package/index70.js +1 -1
- package/index73.js +1 -1
- package/index74.js +1 -1
- package/index80.js +1 -1
- package/package.json +1 -1
- package/selector/index.vue.d.ts +3 -0
package/CHANGELOG.md
CHANGED
package/index11.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as H, ref as L, computed as
|
|
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
|
|
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: (
|
|
36
|
+
compareWith: { type: Function, default: (k, V) => k === V }
|
|
37
37
|
},
|
|
38
38
|
emits: ["update:modelValue", "select", "unselect", "clear", "close", "confirm", "refresh"],
|
|
39
|
-
setup(
|
|
40
|
-
const t =
|
|
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 =
|
|
43
|
+
), K = b(() => {
|
|
44
44
|
var e;
|
|
45
|
-
if (
|
|
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 =
|
|
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
|
|
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
|
|
68
|
-
t.disabled || (
|
|
69
|
-
|
|
67
|
+
function h() {
|
|
68
|
+
t.disabled || ($.value = !0, m.value || setTimeout(() => {
|
|
69
|
+
m.value = !0;
|
|
70
70
|
}, 300));
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
|
|
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),
|
|
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
|
-
|
|
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
|
|
97
|
-
present:
|
|
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
|
-
|
|
103
|
-
present:
|
|
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) =>
|
|
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
|
-
|
|
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) =>
|
|
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
|
-
|
|
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:
|
|
151
|
+
default: d(() => [
|
|
152
152
|
v("van-action-sheet", {
|
|
153
|
-
show:
|
|
153
|
+
show: $.value,
|
|
154
154
|
title: e.placeholder,
|
|
155
155
|
"close-on-click-overlay": !0,
|
|
156
|
-
onClose: l[8] || (l[8] = (o) =>
|
|
157
|
-
onCancel: l[9] || (l[9] = (o) =>
|
|
156
|
+
onClose: l[8] || (l[8] = (o) => g()),
|
|
157
|
+
onCancel: l[9] || (l[9] = (o) => g())
|
|
158
158
|
}, [
|
|
159
|
-
e.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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:
|
|
181
|
+
default: d(({ item: o, index: c }) => [
|
|
180
182
|
I(p(E), {
|
|
181
|
-
|
|
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:
|
|
187
|
-
|
|
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:
|
|
194
|
-
|
|
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:
|
|
201
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
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:
|
|
248
|
-
|
|
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:
|
|
255
|
-
|
|
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:
|
|
262
|
-
|
|
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:
|
|
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
|
-
|
|
288
|
-
|
|
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
package/index18.js
CHANGED
package/index19.js
CHANGED
package/index20.js
CHANGED
package/index21.js
CHANGED
package/index22.js
CHANGED
package/index23.js
CHANGED
package/index24.js
CHANGED
package/index25.js
CHANGED
package/index26.js
CHANGED
package/index28.js
CHANGED
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 "./
|
|
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
package/index56.js
CHANGED
package/index58.js
CHANGED
package/index60.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
function i
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
13
|
+
v as default
|
|
9
14
|
};
|