@solar-taro/ui-vant 4.6.0 → 4.7.1
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 +14 -0
- package/index.d.ts +0 -2
- package/index.js +18 -22
- package/index10.js +25 -15
- package/index11.js +4 -3
- package/index12.js +2 -29
- package/index13.js +2 -5
- package/index15.js +1 -1
- package/index2.js +1 -1
- package/index3.js +115 -261
- package/index4.js +185 -114
- package/index5.js +271 -184
- package/index6.js +56 -278
- package/index7.js +27 -61
- package/index8.js +17 -374
- package/index9.js +4 -28
- package/package.json +1 -1
- package/cascader/index.d.ts +0 -1
- package/cascader/index.scss +0 -65
- package/cascader/index.vue.d.ts +0 -40
- package/cascader/typings.d.ts +0 -5
- package/index16.js +0 -4
- package/index17.js +0 -4
- package/index18.js +0 -4
- package/index19.js +0 -4
- package/index20.js +0 -9
- package/index21.js +0 -42
- package/index22.js +0 -27
- package/selector/index.d.ts +0 -1
- package/selector/index.scss +0 -62
- package/selector/index.vue.d.ts +0 -93
- package/selector/typings.d.ts +0 -9
package/index8.js
CHANGED
|
@@ -1,378 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class: "sun-selector-tags"
|
|
12
|
-
}, Ke = {
|
|
13
|
-
key: 1,
|
|
14
|
-
class: "sun-selector-placeholder"
|
|
15
|
-
}, Oe = { class: "sun-selector-option-label" }, Qe = { class: "sun-selector-option-label" }, el = /* @__PURE__ */ fe({
|
|
16
|
-
__name: "index",
|
|
17
|
-
props: /* @__PURE__ */ I({
|
|
18
|
-
mode: { default: "single" },
|
|
19
|
-
placeholder: { default: "请选择" },
|
|
20
|
-
options: {},
|
|
21
|
-
loading: { type: Boolean },
|
|
22
|
-
height: { default: "65vh" },
|
|
23
|
-
required: { type: Boolean },
|
|
24
|
-
disabled: { type: Boolean },
|
|
25
|
-
delimiter: { default: ", " },
|
|
26
|
-
searchable: { type: Boolean, default: !0 },
|
|
27
|
-
clearable: { type: Boolean, default: !0 },
|
|
28
|
-
filter: {},
|
|
29
|
-
virtual: { type: Boolean },
|
|
30
|
-
optionSize: { type: [Number, Function], default: 44 },
|
|
31
|
-
refresher: { type: Boolean },
|
|
32
|
-
refreshing: { type: Boolean },
|
|
33
|
-
compareWith: { type: Function, default: (s, E) => s === E }
|
|
34
|
-
}, {
|
|
35
|
-
modelValue: {},
|
|
36
|
-
modelModifiers: {},
|
|
37
|
-
keyword: { default: "" },
|
|
38
|
-
keywordModifiers: {}
|
|
39
|
-
}),
|
|
40
|
-
emits: /* @__PURE__ */ I(["select", "unselect", "clear", "close", "confirm", "refresh"], ["update:modelValue", "update:keyword"]),
|
|
41
|
-
setup(s, { expose: E, emit: ne }) {
|
|
42
|
-
const [oe, U] = je(), w = Q(Ne, void 0), q = Q(Ce, void 0), r = s, k = ne, d = X(s, "modelValue"), $ = Y(!1), ae = f(() => {
|
|
43
|
-
const e = r.optionSize;
|
|
44
|
-
return typeof e == "function" ? e : () => e;
|
|
45
|
-
}), B = f(() => r.options.flatMap((e) => ce(e) ? e.options.map((t) => ({
|
|
46
|
-
...t,
|
|
47
|
-
parent: e
|
|
48
|
-
})) : e)), L = X(s, "keyword"), G = f(() => B.value.filter((e) => {
|
|
49
|
-
const t = L.value.toLowerCase();
|
|
50
|
-
return re.value(e, t);
|
|
51
|
-
})), V = f(() => {
|
|
52
|
-
var e;
|
|
53
|
-
if (m.value) {
|
|
54
|
-
const t = B.value.find(
|
|
55
|
-
(l) => r.compareWith(l.value, d.value)
|
|
56
|
-
);
|
|
57
|
-
return t ? [t] : [];
|
|
58
|
-
}
|
|
59
|
-
return ((e = d.value) != null ? e : []).map(
|
|
60
|
-
(t) => B.value.find((l) => r.compareWith(l.value, t))
|
|
61
|
-
).filter(Boolean);
|
|
62
|
-
}), i = f(() => {
|
|
63
|
-
const e = G.value, t = /* @__PURE__ */ new Set();
|
|
64
|
-
return e.flatMap((l) => {
|
|
65
|
-
const n = [];
|
|
66
|
-
return l.parent && !t.has(l.parent) && (t.add(l.parent), n.push({ kind: "optionGroup", value: l.parent })), n.push({ kind: "option", value: l }), n;
|
|
1
|
+
import { getCurrentInstance as o, nextTick as a } from "@tarojs/taro";
|
|
2
|
+
function c(e, t, n, p) {
|
|
3
|
+
e.selectComponent("#" + t).setData({ [n]: p });
|
|
4
|
+
}
|
|
5
|
+
const r = {
|
|
6
|
+
mounted(e, t) {
|
|
7
|
+
const { page: n } = o();
|
|
8
|
+
a(() => {
|
|
9
|
+
a(() => {
|
|
10
|
+
c(n, e.id, t.arg, t.value);
|
|
67
11
|
});
|
|
68
|
-
})
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
function c(e) {
|
|
75
|
-
var l;
|
|
76
|
-
const t = e.value;
|
|
77
|
-
return m.value ? te(d.value) ? !1 : r.compareWith(d.value, t) : ((l = d.value) == null ? void 0 : l.some((n) => r.compareWith(n, t))) || !1;
|
|
78
|
-
}
|
|
79
|
-
function z() {
|
|
80
|
-
r.disabled || ($.value = !0);
|
|
81
|
-
}
|
|
82
|
-
function J() {
|
|
83
|
-
$.value = !1, k("close");
|
|
84
|
-
}
|
|
85
|
-
function K() {
|
|
86
|
-
var t;
|
|
87
|
-
const e = ((t = d.value) == null ? void 0 : t.map(
|
|
88
|
-
(l) => B.value.find(
|
|
89
|
-
(n) => r.compareWith(n.value, l)
|
|
90
|
-
)
|
|
91
|
-
)) || [];
|
|
92
|
-
k("confirm", e), J();
|
|
93
|
-
}
|
|
94
|
-
function O(e) {
|
|
95
|
-
const t = e.value;
|
|
96
|
-
m.value ? (c(e) ? r.required || (k("unselect", e), d.value = null) : (k("select", e), d.value = t), setTimeout(J, 100)) : c(e) ? (k("unselect", e), d.value = d.value.filter(
|
|
97
|
-
(l) => !r.compareWith(l, t)
|
|
98
|
-
)) : (k("select", e), d.value = (d.value || []).concat(
|
|
99
|
-
e.value
|
|
100
|
-
));
|
|
101
|
-
}
|
|
102
|
-
function W() {
|
|
103
|
-
k("clear", d.value), d.value = r.required && !m.value ? [] : null;
|
|
104
|
-
}
|
|
105
|
-
const ie = (e) => A.value === e, de = (e) => j.value.includes(e);
|
|
106
|
-
function ce(e) {
|
|
107
|
-
return "options" in e;
|
|
108
|
-
}
|
|
109
|
-
return E({
|
|
110
|
-
present: z,
|
|
111
|
-
clear: W,
|
|
112
|
-
keyword: L
|
|
113
|
-
}), Z(() => {
|
|
114
|
-
q && (q.required.value = r.required, q.disabled.value = r.disabled);
|
|
115
|
-
}), Z(() => {
|
|
116
|
-
w && (w.clickable.value = !r.disabled);
|
|
117
|
-
}), w == null || w.onTap(z), (e, t) => (o(), p(S, null, [
|
|
118
|
-
y(e.$slots, "default", {
|
|
119
|
-
present: z,
|
|
120
|
-
label: P.value,
|
|
121
|
-
selectedOptions: V.value
|
|
122
|
-
}, () => [
|
|
123
|
-
N("view", {
|
|
124
|
-
class: F(["sun-selector", {
|
|
125
|
-
"sun-selector-required": s.required,
|
|
126
|
-
"sun-selector-disabled": s.disabled
|
|
127
|
-
}]),
|
|
128
|
-
onTap: t[1] || (t[1] = (l) => z())
|
|
129
|
-
}, [
|
|
130
|
-
V.value.length ? (o(), p("view", He, [
|
|
131
|
-
m.value ? (o(), p(S, { key: 0 }, [
|
|
132
|
-
b(g(P.value), 1)
|
|
133
|
-
], 64)) : (o(), p("view", Je, [
|
|
134
|
-
(o(!0), p(S, null, D(V.value, (l) => (o(), v(a(Ee), {
|
|
135
|
-
color: "medium",
|
|
136
|
-
type: "translucent"
|
|
137
|
-
}, {
|
|
138
|
-
default: u(() => [
|
|
139
|
-
b(g(l.label), 1)
|
|
140
|
-
]),
|
|
141
|
-
_: 2
|
|
142
|
-
}, 1024))), 256))
|
|
143
|
-
]))
|
|
144
|
-
])) : (o(), p("view", Ke, g(s.placeholder), 1)),
|
|
145
|
-
H.value ? (o(), v(a(M), {
|
|
146
|
-
key: 2,
|
|
147
|
-
class: "sun-selector-clear-icon",
|
|
148
|
-
name: "close-circle",
|
|
149
|
-
onTap: t[0] || (t[0] = Ae((l) => W(), ["stop"]))
|
|
150
|
-
})) : h("", !0),
|
|
151
|
-
x(a(M), {
|
|
152
|
-
class: "sun-selector-icon",
|
|
153
|
-
name: "chevron-expand-outline"
|
|
154
|
-
})
|
|
155
|
-
], 34)
|
|
156
|
-
]),
|
|
157
|
-
x(a(qe), { hook: "created" }, {
|
|
158
|
-
default: u(() => [
|
|
159
|
-
x(a(We), {
|
|
160
|
-
show: $.value,
|
|
161
|
-
"onUpdate:show": t[7] || (t[7] = (l) => $.value = l),
|
|
162
|
-
title: s.placeholder,
|
|
163
|
-
"with-actions": !m.value
|
|
164
|
-
}, Pe({
|
|
165
|
-
actions: u(() => [
|
|
166
|
-
y(e.$slots, "actions", { confirm: K }, () => [
|
|
167
|
-
m.value ? h("", !0) : (o(), v(a(le), {
|
|
168
|
-
key: 0,
|
|
169
|
-
expand: "block",
|
|
170
|
-
onTap: t[6] || (t[6] = (l) => K())
|
|
171
|
-
}, {
|
|
172
|
-
default: u(() => [...t[9] || (t[9] = [
|
|
173
|
-
b("确定", -1)
|
|
174
|
-
])]),
|
|
175
|
-
_: 1
|
|
176
|
-
}))
|
|
177
|
-
])
|
|
178
|
-
]),
|
|
179
|
-
default: u(() => [
|
|
180
|
-
y(e.$slots, "filter", {}, () => [
|
|
181
|
-
s.searchable ? (o(), v(a(Re), {
|
|
182
|
-
key: 0,
|
|
183
|
-
modelValue: L.value,
|
|
184
|
-
"onUpdate:modelValue": t[3] || (t[3] = (l) => L.value = l),
|
|
185
|
-
placeholder: "输入关键字搜索"
|
|
186
|
-
}, null, 8, ["modelValue"])) : h("", !0)
|
|
187
|
-
]),
|
|
188
|
-
x(a(oe), null, {
|
|
189
|
-
default: u(() => [
|
|
190
|
-
s.virtual ? (o(), v(a(De), {
|
|
191
|
-
key: 0,
|
|
192
|
-
class: "sun-selector-options",
|
|
193
|
-
options: {
|
|
194
|
-
estimateSize: (l) => {
|
|
195
|
-
const n = i.value[l];
|
|
196
|
-
return n.kind === "optionGroup" ? 28 : ae.value(n.value);
|
|
197
|
-
},
|
|
198
|
-
overscan: 3,
|
|
199
|
-
count: i.value.length,
|
|
200
|
-
rangeExtractor: (l) => {
|
|
201
|
-
const n = new Set(a(Ge)(l)), T = se.value.find((R) => l.startIndex >= R);
|
|
202
|
-
return T !== void 0 && (n.add(T), A.value = T), [...n].sort((R, ve) => R - ve);
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
refresher: s.refresher,
|
|
206
|
-
refreshing: s.refreshing,
|
|
207
|
-
style: C({ height: s.height }),
|
|
208
|
-
onRefresh: t[4] || (t[4] = (l) => k("refresh"))
|
|
209
|
-
}, {
|
|
210
|
-
default: u(({ virtualItems: l }) => [
|
|
211
|
-
(o(!0), p(S, null, D(l, (n) => (o(), p(S, {
|
|
212
|
-
key: n.index
|
|
213
|
-
}, [
|
|
214
|
-
i.value[n.index].kind === "optionGroup" ? (o(), v(a(_), {
|
|
215
|
-
key: 0,
|
|
216
|
-
class: "sun-selector-option-divider",
|
|
217
|
-
style: C({
|
|
218
|
-
zIndex: de(n.index) ? 1 : 0,
|
|
219
|
-
...n.style,
|
|
220
|
-
...ie(n.index) ? {
|
|
221
|
-
position: "sticky",
|
|
222
|
-
transform: "unset"
|
|
223
|
-
} : {
|
|
224
|
-
position: "absolute"
|
|
225
|
-
}
|
|
226
|
-
})
|
|
227
|
-
}, {
|
|
228
|
-
default: u(() => [
|
|
229
|
-
b(g(i.value[n.index].value.label), 1)
|
|
230
|
-
]),
|
|
231
|
-
_: 2
|
|
232
|
-
}, 1032, ["style"])) : h("", !0),
|
|
233
|
-
i.value[n.index].kind === "option" ? (o(), v(a(ee), {
|
|
234
|
-
key: 1,
|
|
235
|
-
class: F(["sun-selector-option", { "sun-selector-option-active": c(i.value[n.index].value) }]),
|
|
236
|
-
clickable: !0,
|
|
237
|
-
style: C(n.style),
|
|
238
|
-
onTap: (T) => O(i.value[n.index].value)
|
|
239
|
-
}, {
|
|
240
|
-
start: u(() => [
|
|
241
|
-
y(e.$slots, "option-start", {
|
|
242
|
-
option: i.value[n.index].value,
|
|
243
|
-
index: n.index,
|
|
244
|
-
active: c(i.value[n.index].value)
|
|
245
|
-
})
|
|
246
|
-
]),
|
|
247
|
-
end: u(() => [
|
|
248
|
-
y(e.$slots, "option-end", {
|
|
249
|
-
option: i.value[n.index].value,
|
|
250
|
-
index: n.index,
|
|
251
|
-
active: c(i.value[n.index].value)
|
|
252
|
-
}),
|
|
253
|
-
c(i.value[n.index].value) ? (o(), v(a(M), {
|
|
254
|
-
key: 0,
|
|
255
|
-
class: "sun-selector-option-icon",
|
|
256
|
-
name: "checkmark"
|
|
257
|
-
})) : h("", !0)
|
|
258
|
-
]),
|
|
259
|
-
default: u(() => [
|
|
260
|
-
y(e.$slots, "option", {
|
|
261
|
-
option: i.value[n.index].value,
|
|
262
|
-
index: n.index,
|
|
263
|
-
active: c(i.value[n.index].value)
|
|
264
|
-
}, () => [
|
|
265
|
-
N("view", Oe, g(i.value[n.index].value.label), 1)
|
|
266
|
-
])
|
|
267
|
-
]),
|
|
268
|
-
_: 2
|
|
269
|
-
}, 1032, ["class", "style", "onTap"])) : h("", !0)
|
|
270
|
-
], 64))), 128))
|
|
271
|
-
]),
|
|
272
|
-
placeholder: u(() => [
|
|
273
|
-
x(a(Fe), { loading: s.loading }, null, 8, ["loading"])
|
|
274
|
-
]),
|
|
275
|
-
_: 3
|
|
276
|
-
}, 8, ["options", "refresher", "refreshing", "style"])) : (o(), v(a(Ue), {
|
|
277
|
-
key: 1,
|
|
278
|
-
class: "sun-selector-options",
|
|
279
|
-
refresher: s.refresher,
|
|
280
|
-
refreshing: s.refreshing,
|
|
281
|
-
data: G.value,
|
|
282
|
-
loading: s.loading,
|
|
283
|
-
style: C({ height: s.height }),
|
|
284
|
-
onRefresh: t[5] || (t[5] = (l) => k("refresh"))
|
|
285
|
-
}, {
|
|
286
|
-
default: u(() => [
|
|
287
|
-
N("view", null, [
|
|
288
|
-
(o(!0), p(S, null, D(i.value, (l, n) => (o(), p(S, { key: n }, [
|
|
289
|
-
l.kind === "optionGroup" ? (o(), v(a(_), {
|
|
290
|
-
key: 0,
|
|
291
|
-
class: "sun-selector-option-divider"
|
|
292
|
-
}, {
|
|
293
|
-
default: u(() => [
|
|
294
|
-
b(g(l.value.label), 1)
|
|
295
|
-
]),
|
|
296
|
-
_: 2
|
|
297
|
-
}, 1024)) : h("", !0),
|
|
298
|
-
l.kind === "option" ? (o(), v(a(ee), {
|
|
299
|
-
key: 1,
|
|
300
|
-
class: F(["sun-selector-option", { "sun-selector-option-active": c(l.value) }]),
|
|
301
|
-
clickable: !0,
|
|
302
|
-
onTap: (T) => O(l.value)
|
|
303
|
-
}, {
|
|
304
|
-
start: u(() => [
|
|
305
|
-
y(e.$slots, "option-start", {
|
|
306
|
-
option: l.value,
|
|
307
|
-
index: n,
|
|
308
|
-
active: c(l.value)
|
|
309
|
-
})
|
|
310
|
-
]),
|
|
311
|
-
end: u(() => [
|
|
312
|
-
y(e.$slots, "option-end", {
|
|
313
|
-
option: l.value,
|
|
314
|
-
index: n,
|
|
315
|
-
active: c(l.value)
|
|
316
|
-
}),
|
|
317
|
-
c(l.value) ? (o(), v(a(M), {
|
|
318
|
-
key: 0,
|
|
319
|
-
class: "sun-selector-option-icon",
|
|
320
|
-
name: "checkmark"
|
|
321
|
-
})) : h("", !0)
|
|
322
|
-
]),
|
|
323
|
-
default: u(() => [
|
|
324
|
-
y(e.$slots, "option", {
|
|
325
|
-
option: l.value,
|
|
326
|
-
index: n,
|
|
327
|
-
active: c(l.value)
|
|
328
|
-
}, () => [
|
|
329
|
-
N("view", Qe, g(l.value.label), 1)
|
|
330
|
-
])
|
|
331
|
-
]),
|
|
332
|
-
_: 2
|
|
333
|
-
}, 1032, ["class", "onTap"])) : h("", !0)
|
|
334
|
-
], 64))), 128))
|
|
335
|
-
])
|
|
336
|
-
]),
|
|
337
|
-
_: 3
|
|
338
|
-
}, 8, ["refresher", "refreshing", "data", "loading", "style"]))
|
|
339
|
-
]),
|
|
340
|
-
_: 3
|
|
341
|
-
}),
|
|
342
|
-
y(e.$slots, "list", { ListTemplate: a(U) }, () => [
|
|
343
|
-
x(a(U))
|
|
344
|
-
])
|
|
345
|
-
]),
|
|
346
|
-
_: 2
|
|
347
|
-
}, [
|
|
348
|
-
H.value ? {
|
|
349
|
-
name: "extra",
|
|
350
|
-
fn: u(() => [
|
|
351
|
-
x(a(le), {
|
|
352
|
-
size: "xsmall",
|
|
353
|
-
fill: "clear",
|
|
354
|
-
color: "medium",
|
|
355
|
-
shape: "round",
|
|
356
|
-
onTap: t[2] || (t[2] = (l) => W())
|
|
357
|
-
}, {
|
|
358
|
-
default: u(() => [
|
|
359
|
-
t[8] || (t[8] = b(" 清除 ", -1)),
|
|
360
|
-
m.value ? h("", !0) : (o(), p(S, { key: 0 }, [
|
|
361
|
-
b("(" + g(V.value.length) + ")", 1)
|
|
362
|
-
], 64))
|
|
363
|
-
]),
|
|
364
|
-
_: 1
|
|
365
|
-
})
|
|
366
|
-
]),
|
|
367
|
-
key: "0"
|
|
368
|
-
} : void 0
|
|
369
|
-
]), 1032, ["show", "title", "with-actions"])
|
|
370
|
-
]),
|
|
371
|
-
_: 3
|
|
372
|
-
})
|
|
373
|
-
], 64));
|
|
12
|
+
});
|
|
13
|
+
},
|
|
14
|
+
updated(e, t) {
|
|
15
|
+
const { page: n } = o();
|
|
16
|
+
c(n, e.id, t.arg, t.value);
|
|
374
17
|
}
|
|
375
|
-
}
|
|
18
|
+
};
|
|
376
19
|
export {
|
|
377
|
-
|
|
20
|
+
r as vBindFn
|
|
378
21
|
};
|
package/index9.js
CHANGED
|
@@ -1,30 +1,6 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
class o {
|
|
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
|
-
const s = new o();
|
|
1
|
+
const r = (e, t) => {
|
|
2
|
+
e.setAttribute(t.arg, t.value);
|
|
3
|
+
};
|
|
26
4
|
export {
|
|
27
|
-
|
|
28
|
-
s as notify,
|
|
29
|
-
a as setupOverlay
|
|
5
|
+
r as vBinding
|
|
30
6
|
};
|
package/package.json
CHANGED
package/cascader/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as SunCascader } from './index.vue';
|
package/cascader/index.scss
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
.sun-cascader {
|
|
2
|
-
flex: auto;
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
min-height: 24px;
|
|
6
|
-
line-height: 1.5;
|
|
7
|
-
|
|
8
|
-
&-disabled {
|
|
9
|
-
opacity: 0.5;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
&-inner {
|
|
13
|
-
flex: auto;
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
white-space: nowrap;
|
|
16
|
-
text-overflow: ellipsis;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&-placeholder {
|
|
20
|
-
flex: auto;
|
|
21
|
-
color: var(--color-light-shade);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&-icon {
|
|
25
|
-
flex-shrink: 0;
|
|
26
|
-
color: var(--color-medium-tint);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&-clear {
|
|
30
|
-
&-icon {
|
|
31
|
-
padding: 4px;
|
|
32
|
-
color: var(--color-medium-tint);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&-options {
|
|
37
|
-
overflow-y: auto;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&-tabs {
|
|
41
|
-
--tab-font-size: 16px;
|
|
42
|
-
|
|
43
|
-
.van-tabs__wrap {
|
|
44
|
-
display: block;
|
|
45
|
-
padding-inline: 2px;
|
|
46
|
-
box-shadow: 0 1px 2px 0 rgb(0, 0, 0, 0.05);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.van-tab {
|
|
50
|
-
padding-inline: 12px;
|
|
51
|
-
flex: none;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&-option {
|
|
56
|
-
&-active {
|
|
57
|
-
font-weight: bold;
|
|
58
|
-
--background: rgba(var(--color-primary-rgb), 0.1);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&-icon {
|
|
62
|
-
color: var(--color-primary);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
package/cascader/index.vue.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { CascaderOption } from './typings';
|
|
2
|
-
declare const _default: <TValue, TOption extends CascaderOption<TValue>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
4
|
-
readonly "onUpdate:modelValue"?: ((value: TValue | null) => any) | undefined;
|
|
5
|
-
readonly onClose?: (() => any) | undefined;
|
|
6
|
-
readonly onSelect?: ((args_0: TOption) => any) | undefined;
|
|
7
|
-
readonly onClear?: ((args_0: TValue) => any) | undefined;
|
|
8
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue" | "onSelect" | "onClose" | "onClear"> & ({
|
|
9
|
-
modelValue?: TValue | null;
|
|
10
|
-
} & {
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
options: TOption[];
|
|
13
|
-
required?: boolean;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
clearable?: boolean;
|
|
16
|
-
delimiter?: string;
|
|
17
|
-
height?: string;
|
|
18
|
-
searchable?: boolean;
|
|
19
|
-
}) & Partial<{}>> & import('vue').PublicProps;
|
|
20
|
-
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
21
|
-
present: () => void;
|
|
22
|
-
clear: () => void;
|
|
23
|
-
}>): void;
|
|
24
|
-
attrs: any;
|
|
25
|
-
slots: {
|
|
26
|
-
default?(_: {
|
|
27
|
-
present: () => void;
|
|
28
|
-
label: string;
|
|
29
|
-
}): any;
|
|
30
|
-
};
|
|
31
|
-
emit: (((evt: "close") => void) & ((evt: "select", args_0: TOption) => void) & ((evt: "clear", args_0: TValue) => void)) & ((evt: "update:modelValue", value: TValue | null) => void);
|
|
32
|
-
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
33
|
-
[key: string]: any;
|
|
34
|
-
}> & {
|
|
35
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
36
|
-
};
|
|
37
|
-
export default _default;
|
|
38
|
-
type __VLS_PrettifyLocal<T> = {
|
|
39
|
-
[K in keyof T]: T[K];
|
|
40
|
-
} & {};
|
package/cascader/typings.d.ts
DELETED
package/index16.js
DELETED
package/index17.js
DELETED
package/index18.js
DELETED
package/index19.js
DELETED
package/index20.js
DELETED
package/index21.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { makeDestructurable as m, camelize as c } from "./index22.js";
|
|
2
|
-
import { shallowRef as p, defineComponent as d } from "vue";
|
|
3
|
-
// @__NO_SIDE_EFFECTS__
|
|
4
|
-
function w(e = {}) {
|
|
5
|
-
const { inheritAttrs: r = !0, name: t = "ReusableTemplate" } = e, o = p(), a = d({
|
|
6
|
-
name: `${t}.define`,
|
|
7
|
-
setup(i, { slots: l }) {
|
|
8
|
-
return () => {
|
|
9
|
-
o.value = l.default;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
}), s = d({
|
|
13
|
-
inheritAttrs: r,
|
|
14
|
-
name: `${t}.reuse`,
|
|
15
|
-
props: e.props,
|
|
16
|
-
setup(i, { attrs: l, slots: f }) {
|
|
17
|
-
return () => {
|
|
18
|
-
var u;
|
|
19
|
-
if (!o.value) throw new Error("[VueUse] Failed to find the definition of reusable template");
|
|
20
|
-
const n = (u = o.value) === null || u === void 0 ? void 0 : u.call(o, {
|
|
21
|
-
...e.props == null ? v(l) : i,
|
|
22
|
-
$slots: f
|
|
23
|
-
});
|
|
24
|
-
return r && (n == null ? void 0 : n.length) === 1 ? n[0] : n;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
return m({
|
|
29
|
-
define: a,
|
|
30
|
-
reuse: s
|
|
31
|
-
}, [a, s]);
|
|
32
|
-
}
|
|
33
|
-
function v(e) {
|
|
34
|
-
const r = {};
|
|
35
|
-
for (const t in e) r[c(t)] = e[t];
|
|
36
|
-
return r;
|
|
37
|
-
}
|
|
38
|
-
export {
|
|
39
|
-
c as camelize,
|
|
40
|
-
w as createReusableTemplate,
|
|
41
|
-
m as makeDestructurable
|
|
42
|
-
};
|
package/index22.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import "vue";
|
|
2
|
-
typeof WorkerGlobalScope != "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
3
|
-
function r(t) {
|
|
4
|
-
const n = /* @__PURE__ */ Object.create(null);
|
|
5
|
-
return (e) => n[e] || (n[e] = t(e));
|
|
6
|
-
}
|
|
7
|
-
const c = /-(\w)/g, a = r((t) => t.replace(c, (n, e) => e ? e.toUpperCase() : ""));
|
|
8
|
-
// @__NO_SIDE_EFFECTS__
|
|
9
|
-
function u(t, n) {
|
|
10
|
-
if (typeof Symbol != "undefined") {
|
|
11
|
-
const e = { ...t };
|
|
12
|
-
return Object.defineProperty(e, Symbol.iterator, {
|
|
13
|
-
enumerable: !1,
|
|
14
|
-
value() {
|
|
15
|
-
let o = 0;
|
|
16
|
-
return { next: () => ({
|
|
17
|
-
value: n[o++],
|
|
18
|
-
done: o > n.length
|
|
19
|
-
}) };
|
|
20
|
-
}
|
|
21
|
-
}), e;
|
|
22
|
-
} else return Object.assign([...n], t);
|
|
23
|
-
}
|
|
24
|
-
export {
|
|
25
|
-
a as camelize,
|
|
26
|
-
u as makeDestructurable
|
|
27
|
-
};
|
package/selector/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as SunSelector } from './index.vue';
|