@solar-taro/ui-vant 3.5.2 → 4.0.0
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 +4 -0
- package/cascader/index.scss +36 -6
- package/cascader/index.vue.d.ts +13 -13
- package/cascader/typings.d.ts +5 -0
- package/cascader-picker/index.vue.d.ts +1 -1
- package/date-range-picker/index.scss +37 -6
- package/date-range-picker/index.vue.d.ts +25 -30
- package/index.js +14 -14
- package/index10.js +61 -16
- package/index11.js +18 -3
- package/index12.js +3 -28
- package/index13.js +28 -4
- package/index14.js +5 -64
- package/index16.js +1 -1
- package/index17.js +1 -1
- package/index18.js +1 -1
- package/index19.js +1 -1
- package/index2.js +1 -1
- package/index20.js +1 -1
- package/index21.js +1 -1
- package/index22.js +7 -36
- package/index23.js +38 -23
- package/index24.js +27 -0
- package/index3.js +202 -119
- package/index4.js +76 -79
- package/index5.js +129 -113
- package/index6.js +36 -32
- package/index7.js +141 -134
- package/index8.js +34 -34
- package/index9.js +325 -292
- package/package.json +1 -1
- package/select-picker/index.vue.d.ts +1 -1
- package/selector/index.scss +33 -5
- package/selector/index.vue.d.ts +20 -26
- package/selector/typings.d.ts +9 -0
package/index9.js
CHANGED
|
@@ -1,352 +1,385 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { SunTag as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
import { defineComponent as pe, inject as Y, useModel as Z, ref as F, computed as p, effect as I, Fragment as ye, mergeModels as _, openBlock as he, createElementBlock as ke, renderSlot as me, createElementVNode as ge, normalizeClass as be, createTextVNode as Se, toDisplayString as we, renderList as xe, createBlock as Te, unref as Ve, withCtx as $e, withModifiers as Be, createCommentVNode as Le, createVNode as Me, createSlots as Ne, normalizeStyle as ze } from "vue";
|
|
2
|
+
import { SUN_ITEM as Ce, SUN_FIELD as Ee, SunTag as qe, SunIcon as E, SunLazyRender as Re, SunSearchbar as We, SunVirtualList as De, SunListPlaceholder as Fe, SunItemDivider as ee, SunItem as le, SunList as Ue, SunButton as Ge } from "@solar-taro/ui-sun";
|
|
3
|
+
import { SunModal as je } from "@solar-taro/ui-vant";
|
|
4
|
+
import { defaultRangeExtractor as Ae } from "./index22.js";
|
|
5
|
+
import { createReusableTemplate as Pe } from "./index23.js";
|
|
6
|
+
import { isNil as te } from "lodash-es";
|
|
7
|
+
const y = me, b = we, S = Se, g = ye, o = he, c = ke, h = Le, U = xe, s = Ve, r = $e, f = Te, ne = Be, w = Me, G = be, B = ge, L = ze, He = Ne, Je = {
|
|
7
8
|
key: 0,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
class: "sun-selector-inner"
|
|
10
|
+
}, Ke = {
|
|
11
|
+
key: 1,
|
|
12
|
+
class: "sun-selector-tags"
|
|
13
|
+
}, Oe = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "sun-selector-placeholder"
|
|
16
|
+
}, Qe = { class: "sun-selector-option-label" }, Xe = { class: "sun-selector-option-label" }, tl = /* @__PURE__ */ pe({
|
|
11
17
|
__name: "index",
|
|
12
|
-
props: /* @__PURE__ */
|
|
13
|
-
type: { default: "field" },
|
|
18
|
+
props: /* @__PURE__ */ _({
|
|
14
19
|
mode: { default: "single" },
|
|
15
|
-
label: {},
|
|
16
20
|
placeholder: { default: "请选择" },
|
|
17
|
-
modelValue: {},
|
|
18
21
|
options: {},
|
|
19
|
-
labelKey: { default: "fullName" },
|
|
20
|
-
valueKey: { default: "id" },
|
|
21
22
|
loading: { type: Boolean },
|
|
22
|
-
height: { default: "
|
|
23
|
+
height: { default: "65vh" },
|
|
23
24
|
required: { type: Boolean },
|
|
24
25
|
disabled: { type: Boolean },
|
|
25
26
|
delimiter: { default: ", " },
|
|
26
27
|
searchable: { type: Boolean, default: !0 },
|
|
27
28
|
clearable: { type: Boolean, default: !0 },
|
|
28
|
-
|
|
29
|
-
virtual: { type:
|
|
29
|
+
filter: {},
|
|
30
|
+
virtual: { type: Boolean },
|
|
31
|
+
optionSize: { type: [Number, Function], default: 44 },
|
|
30
32
|
refresher: { type: Boolean },
|
|
31
33
|
refreshing: { type: Boolean },
|
|
32
|
-
compareWith: { type: Function, default: (
|
|
34
|
+
compareWith: { type: Function, default: (a, q) => a === q }
|
|
33
35
|
}, {
|
|
36
|
+
modelValue: {},
|
|
37
|
+
modelModifiers: {},
|
|
34
38
|
keyword: { default: "" },
|
|
35
39
|
keywordModifiers: {}
|
|
36
40
|
}),
|
|
37
|
-
emits: /* @__PURE__ */
|
|
38
|
-
setup(
|
|
39
|
-
const [
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
emits: /* @__PURE__ */ _(["select", "unselect", "clear", "close", "confirm", "refresh"], ["update:modelValue", "update:keyword"]),
|
|
42
|
+
setup(a, { expose: q, emit: oe }) {
|
|
43
|
+
const [ae, j] = Pe(), x = Y(Ce, void 0), R = Y(Ee, void 0), u = a, k = oe, d = Z(a, "modelValue"), M = F(!1), se = p(() => {
|
|
44
|
+
const e = u.optionSize;
|
|
45
|
+
return typeof e == "function" ? e : () => e;
|
|
46
|
+
}), N = p(() => u.options.flatMap((e) => ve(e) ? e.options.map((t) => ({
|
|
47
|
+
...t,
|
|
48
|
+
parent: e
|
|
49
|
+
})) : e)), z = Z(a, "keyword"), A = p(() => N.value.filter((e) => {
|
|
50
|
+
const t = z.value.toLowerCase();
|
|
51
|
+
return re.value(e, t);
|
|
52
|
+
})), T = p(() => {
|
|
42
53
|
var e;
|
|
43
|
-
if (
|
|
44
|
-
const
|
|
45
|
-
(
|
|
54
|
+
if (m.value) {
|
|
55
|
+
const t = N.value.find(
|
|
56
|
+
(l) => u.compareWith(l.value, d.value)
|
|
46
57
|
);
|
|
47
|
-
return
|
|
58
|
+
return t ? [t] : [];
|
|
48
59
|
}
|
|
49
|
-
return ((e =
|
|
50
|
-
(
|
|
60
|
+
return ((e = d.value) != null ? e : []).map(
|
|
61
|
+
(t) => N.value.find((l) => u.compareWith(l.value, t))
|
|
51
62
|
).filter(Boolean);
|
|
52
|
-
}),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
63
|
+
}), i = p(() => {
|
|
64
|
+
const e = A.value, t = /* @__PURE__ */ new Set();
|
|
65
|
+
return e.flatMap((l) => {
|
|
66
|
+
const n = [];
|
|
67
|
+
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;
|
|
68
|
+
});
|
|
69
|
+
}), P = p(
|
|
70
|
+
() => i.value.reduce((e, t, l) => (t.kind === "optionGroup" && e.push(l), e), [])
|
|
71
|
+
), ue = p(() => [...P.value].reverse()), H = F(0), V = F(!1), re = p(() => u.filter || ((e, t) => e.label.toLowerCase().includes(t))), J = p(() => T.value.map((e) => e.label).join(u.delimiter)), K = p(() => !ie(d.value) && u.clearable && !u.disabled), m = p(() => u.mode === "single");
|
|
72
|
+
function ie(e) {
|
|
73
|
+
return te(e) ? !0 : m.value ? !1 : e.length < 1;
|
|
59
74
|
}
|
|
60
|
-
function
|
|
61
|
-
var
|
|
62
|
-
const
|
|
63
|
-
return
|
|
75
|
+
function v(e) {
|
|
76
|
+
var l;
|
|
77
|
+
const t = e.value;
|
|
78
|
+
return m.value ? te(d.value) ? !1 : u.compareWith(d.value, t) : ((l = d.value) == null ? void 0 : l.some((n) => u.compareWith(n, t))) || !1;
|
|
64
79
|
}
|
|
65
|
-
function
|
|
66
|
-
|
|
67
|
-
|
|
80
|
+
function C() {
|
|
81
|
+
u.disabled || (M.value = !0, V.value || setTimeout(() => {
|
|
82
|
+
V.value = !0;
|
|
68
83
|
}, 300));
|
|
69
84
|
}
|
|
70
|
-
function
|
|
71
|
-
|
|
85
|
+
function O() {
|
|
86
|
+
M.value = !1, k("close");
|
|
72
87
|
}
|
|
73
|
-
function
|
|
74
|
-
var
|
|
75
|
-
const e = ((
|
|
76
|
-
(
|
|
77
|
-
(
|
|
88
|
+
function Q() {
|
|
89
|
+
var t;
|
|
90
|
+
const e = ((t = d.value) == null ? void 0 : t.map(
|
|
91
|
+
(l) => N.value.find(
|
|
92
|
+
(n) => u.compareWith(n.value, l)
|
|
78
93
|
)
|
|
79
94
|
)) || [];
|
|
80
|
-
|
|
95
|
+
k("confirm", e), O();
|
|
96
|
+
}
|
|
97
|
+
function X(e) {
|
|
98
|
+
const t = e.value;
|
|
99
|
+
m.value ? (v(e) ? u.required || (k("unselect", e), d.value = null) : (k("select", e), d.value = t), setTimeout(O, 100)) : v(e) ? (k("unselect", e), d.value = d.value.filter(
|
|
100
|
+
(l) => !u.compareWith(l, t)
|
|
101
|
+
)) : (k("select", e), d.value = (d.value || []).concat(
|
|
102
|
+
e.value
|
|
103
|
+
));
|
|
81
104
|
}
|
|
82
|
-
function
|
|
83
|
-
|
|
84
|
-
let n = o.modelValue;
|
|
85
|
-
v.value ? (d(e) ? o.required || (f("unselect", e), n = null) : (f("select", e), n = l), P()) : d(e) ? (f("unselect", e), n = o.modelValue.filter(
|
|
86
|
-
(t) => !o.compareWith(t, l)
|
|
87
|
-
)) : (f("select", e), n = (o.modelValue || []).concat(
|
|
88
|
-
e[o.valueKey]
|
|
89
|
-
)), f("update:modelValue", n);
|
|
105
|
+
function W() {
|
|
106
|
+
k("clear", d.value), d.value = u.required && !m.value ? [] : null;
|
|
90
107
|
}
|
|
91
|
-
|
|
92
|
-
|
|
108
|
+
const de = (e) => H.value === e, ce = (e) => P.value.includes(e);
|
|
109
|
+
function ve(e) {
|
|
110
|
+
return "options" in e;
|
|
93
111
|
}
|
|
94
|
-
return
|
|
95
|
-
present:
|
|
96
|
-
clear:
|
|
97
|
-
keyword:
|
|
98
|
-
}), (
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
required:
|
|
111
|
-
disabled:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
112
|
+
return q({
|
|
113
|
+
present: C,
|
|
114
|
+
clear: W,
|
|
115
|
+
keyword: z
|
|
116
|
+
}), I(() => {
|
|
117
|
+
R && (R.required.value = u.required, R.disabled.value = u.disabled);
|
|
118
|
+
}), I(() => {
|
|
119
|
+
x && (x.clickable.value = !u.disabled);
|
|
120
|
+
}), x == null || x.onTap(C), (e, t) => (o(), c(g, null, [
|
|
121
|
+
y(e.$slots, "default", {
|
|
122
|
+
present: C,
|
|
123
|
+
label: J.value,
|
|
124
|
+
selectedOptions: T.value
|
|
125
|
+
}, () => [
|
|
126
|
+
B("view", {
|
|
127
|
+
class: G(["sun-selector", {
|
|
128
|
+
"sun-selector-required": a.required,
|
|
129
|
+
"sun-selector-disabled": a.disabled
|
|
130
|
+
}]),
|
|
131
|
+
onTap: t[1] || (t[1] = (l) => C())
|
|
132
|
+
}, [
|
|
133
|
+
T.value.length ? (o(), c("view", Je, [
|
|
134
|
+
m.value ? (o(), c(g, { key: 0 }, [
|
|
135
|
+
S(b(J.value), 1)
|
|
136
|
+
], 64)) : (o(), c("view", Ke, [
|
|
137
|
+
(o(!0), c(g, null, U(T.value, (l) => (o(), f(s(qe), {
|
|
118
138
|
color: "medium",
|
|
119
139
|
type: "translucent"
|
|
120
140
|
}, {
|
|
121
141
|
default: r(() => [
|
|
122
|
-
|
|
142
|
+
S(b(l.label), 1)
|
|
123
143
|
]),
|
|
124
144
|
_: 2
|
|
125
145
|
}, 1024))), 256))
|
|
126
|
-
]))
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
v.value ? g("", !0) : (s(), p("van-button", {
|
|
173
|
-
key: 0,
|
|
174
|
-
type: "primary",
|
|
175
|
-
round: "true",
|
|
176
|
-
block: "true",
|
|
177
|
-
onTap: l[8] || (l[8] = (t) => F())
|
|
178
|
-
}, "确定", 32))
|
|
179
|
-
])
|
|
146
|
+
]))
|
|
147
|
+
])) : (o(), c("view", Oe, b(a.placeholder), 1)),
|
|
148
|
+
K.value ? (o(), f(s(E), {
|
|
149
|
+
key: 2,
|
|
150
|
+
class: "sun-selector-clear-icon",
|
|
151
|
+
name: "close-circle",
|
|
152
|
+
onTap: t[0] || (t[0] = ne((l) => W(), ["stop"]))
|
|
153
|
+
})) : h("", !0),
|
|
154
|
+
w(s(E), {
|
|
155
|
+
class: "sun-selector-icon",
|
|
156
|
+
name: "chevron-expand-outline"
|
|
157
|
+
})
|
|
158
|
+
], 34)
|
|
159
|
+
]),
|
|
160
|
+
w(s(Re), { hook: "created" }, {
|
|
161
|
+
default: r(() => [
|
|
162
|
+
w(s(je), {
|
|
163
|
+
show: M.value,
|
|
164
|
+
"onUpdate:show": t[7] || (t[7] = (l) => M.value = l),
|
|
165
|
+
title: a.placeholder,
|
|
166
|
+
"show-buttons": !m.value,
|
|
167
|
+
onTap: t[8] || (t[8] = ne(() => {
|
|
168
|
+
}, ["stop"]))
|
|
169
|
+
}, He({
|
|
170
|
+
buttons: r(() => [
|
|
171
|
+
y(e.$slots, "buttons", { confirm: Q }, () => [
|
|
172
|
+
m.value ? h("", !0) : (o(), f(s(Ge), {
|
|
173
|
+
key: 0,
|
|
174
|
+
expand: "block",
|
|
175
|
+
onTap: t[6] || (t[6] = (l) => Q())
|
|
176
|
+
}, {
|
|
177
|
+
default: r(() => [...t[10] || (t[10] = [
|
|
178
|
+
S("确定", -1)
|
|
179
|
+
])]),
|
|
180
|
+
_: 1
|
|
181
|
+
}))
|
|
182
|
+
])
|
|
183
|
+
]),
|
|
184
|
+
default: r(() => [
|
|
185
|
+
y(e.$slots, "filter", { rendered: V.value }, () => [
|
|
186
|
+
a.searchable ? (o(), f(s(We), {
|
|
187
|
+
key: 0,
|
|
188
|
+
modelValue: z.value,
|
|
189
|
+
"onUpdate:modelValue": t[3] || (t[3] = (l) => z.value = l),
|
|
190
|
+
placeholder: "输入关键字搜索"
|
|
191
|
+
}, null, 8, ["modelValue"])) : h("", !0)
|
|
180
192
|
]),
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
]),
|
|
192
|
-
h(u(Z), null, {
|
|
193
|
-
default: r(() => [
|
|
194
|
-
e.virtual ? (s(), p(b, { key: 0 }, [
|
|
195
|
-
k.value ? (s(), y(u(we), {
|
|
196
|
-
key: 0,
|
|
197
|
-
class: "sun-selector-options",
|
|
198
|
-
options: {
|
|
199
|
-
estimateSize: () => E.value.itemSize,
|
|
200
|
-
overscan: 3,
|
|
201
|
-
count: i.value.length,
|
|
202
|
-
getItemKey: (t) => i.value[t][e.valueKey]
|
|
193
|
+
w(s(ae), null, {
|
|
194
|
+
default: r(() => [
|
|
195
|
+
a.virtual ? (o(), c(g, { key: 0 }, [
|
|
196
|
+
V.value ? (o(), f(s(De), {
|
|
197
|
+
key: 0,
|
|
198
|
+
class: "sun-selector-options",
|
|
199
|
+
options: {
|
|
200
|
+
estimateSize: (l) => {
|
|
201
|
+
const n = i.value[l];
|
|
202
|
+
return n.kind === "optionGroup" ? 28 : se.value(n.value);
|
|
203
203
|
},
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
},
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
204
|
+
overscan: 3,
|
|
205
|
+
count: i.value.length,
|
|
206
|
+
rangeExtractor: (l) => {
|
|
207
|
+
const n = new Set(s(Ae)(l)), $ = ue.value.find((D) => l.startIndex >= D);
|
|
208
|
+
return $ !== void 0 && (n.add($), H.value = $), [...n].sort((D, fe) => D - fe);
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
refresher: a.refresher,
|
|
212
|
+
refreshing: a.refreshing,
|
|
213
|
+
style: L({ height: a.height }),
|
|
214
|
+
onRefresh: t[4] || (t[4] = (l) => k("refresh"))
|
|
215
|
+
}, {
|
|
216
|
+
default: r(({ virtualItems: l }) => [
|
|
217
|
+
(o(!0), c(g, null, U(l, (n) => (o(), c(g, {
|
|
218
|
+
key: n.index
|
|
219
|
+
}, [
|
|
220
|
+
i.value[n.index].kind === "optionGroup" ? (o(), f(s(ee), {
|
|
221
|
+
key: 0,
|
|
222
|
+
class: "sun-selector-option-divider",
|
|
223
|
+
style: L({
|
|
224
|
+
zIndex: ce(n.index) ? 1 : 0,
|
|
225
|
+
...n.style,
|
|
226
|
+
...de(n.index) ? {
|
|
227
|
+
position: "sticky",
|
|
228
|
+
transform: "unset"
|
|
229
|
+
} : {
|
|
230
|
+
position: "absolute"
|
|
231
|
+
}
|
|
232
|
+
})
|
|
233
|
+
}, {
|
|
234
|
+
default: r(() => [
|
|
235
|
+
S(b(i.value[n.index].value.label), 1)
|
|
236
|
+
]),
|
|
237
|
+
_: 2
|
|
238
|
+
}, 1032, ["style"])) : h("", !0),
|
|
239
|
+
i.value[n.index].kind === "option" ? (o(), f(s(le), {
|
|
240
|
+
key: 1,
|
|
241
|
+
class: G(["sun-selector-option", { "sun-selector-option-active": v(i.value[n.index].value) }]),
|
|
216
242
|
clickable: !0,
|
|
217
|
-
|
|
218
|
-
|
|
243
|
+
style: L(n.style),
|
|
244
|
+
onTap: ($) => X(i.value[n.index].value)
|
|
245
|
+
}, {
|
|
219
246
|
start: r(() => [
|
|
220
|
-
|
|
221
|
-
option: i.value[
|
|
222
|
-
index:
|
|
223
|
-
active:
|
|
247
|
+
y(e.$slots, "option-start", {
|
|
248
|
+
option: i.value[n.index].value,
|
|
249
|
+
index: n.index,
|
|
250
|
+
active: v(i.value[n.index].value)
|
|
224
251
|
})
|
|
225
252
|
]),
|
|
226
253
|
end: r(() => [
|
|
227
|
-
|
|
228
|
-
option: i.value[
|
|
229
|
-
index:
|
|
230
|
-
active:
|
|
231
|
-
})
|
|
254
|
+
y(e.$slots, "option-end", {
|
|
255
|
+
option: i.value[n.index].value,
|
|
256
|
+
index: n.index,
|
|
257
|
+
active: v(i.value[n.index].value)
|
|
258
|
+
}),
|
|
259
|
+
v(i.value[n.index].value) ? (o(), f(s(E), {
|
|
260
|
+
key: 0,
|
|
261
|
+
class: "sun-selector-option-icon",
|
|
262
|
+
name: "checkmark"
|
|
263
|
+
})) : h("", !0)
|
|
232
264
|
]),
|
|
233
265
|
default: r(() => [
|
|
234
|
-
|
|
235
|
-
option: i.value[
|
|
236
|
-
index:
|
|
237
|
-
active:
|
|
266
|
+
y(e.$slots, "option", {
|
|
267
|
+
option: i.value[n.index].value,
|
|
268
|
+
index: n.index,
|
|
269
|
+
active: v(i.value[n.index].value)
|
|
238
270
|
}, () => [
|
|
239
|
-
|
|
271
|
+
B("view", Qe, b(i.value[n.index].value.label), 1)
|
|
240
272
|
])
|
|
241
273
|
]),
|
|
242
274
|
_: 2
|
|
243
|
-
}, [
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
]),
|
|
252
|
-
key: "0"
|
|
253
|
-
} : void 0
|
|
254
|
-
]), 1032, ["style", "class", "onTap"]))), 128))
|
|
255
|
-
]),
|
|
256
|
-
placeholder: r(() => [
|
|
257
|
-
h(u(Se), { loading: e.loading }, null, 8, ["loading"])
|
|
258
|
-
]),
|
|
259
|
-
_: 3
|
|
260
|
-
}, 8, ["options", "refresher", "refreshing", "items", "item-size", "style"])) : (s(), p("view", {
|
|
261
|
-
key: 1,
|
|
262
|
-
style: N({ height: e.height })
|
|
263
|
-
}, null, 4))
|
|
264
|
-
], 64)) : (s(), y(u(Ke), {
|
|
275
|
+
}, 1032, ["class", "style", "onTap"])) : h("", !0)
|
|
276
|
+
], 64))), 128))
|
|
277
|
+
]),
|
|
278
|
+
placeholder: r(() => [
|
|
279
|
+
w(s(Fe), { loading: a.loading }, null, 8, ["loading"])
|
|
280
|
+
]),
|
|
281
|
+
_: 3
|
|
282
|
+
}, 8, ["options", "refresher", "refreshing", "style"])) : (o(), c("view", {
|
|
265
283
|
key: 1,
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
option
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
])
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
284
|
+
style: L({ height: a.height })
|
|
285
|
+
}, null, 4))
|
|
286
|
+
], 64)) : (o(), f(s(Ue), {
|
|
287
|
+
key: 1,
|
|
288
|
+
class: "sun-selector-options",
|
|
289
|
+
refresher: a.refresher,
|
|
290
|
+
refreshing: a.refreshing,
|
|
291
|
+
data: A.value,
|
|
292
|
+
loading: a.loading,
|
|
293
|
+
style: L({ height: a.height }),
|
|
294
|
+
onRefresh: t[5] || (t[5] = (l) => k("refresh"))
|
|
295
|
+
}, {
|
|
296
|
+
default: r(() => [
|
|
297
|
+
B("view", null, [
|
|
298
|
+
(o(!0), c(g, null, U(i.value, (l, n) => (o(), c(g, { key: n }, [
|
|
299
|
+
l.kind === "optionGroup" ? (o(), f(s(ee), {
|
|
300
|
+
key: 0,
|
|
301
|
+
class: "sun-selector-option-divider"
|
|
302
|
+
}, {
|
|
303
|
+
default: r(() => [
|
|
304
|
+
S(b(l.value.label), 1)
|
|
305
|
+
]),
|
|
306
|
+
_: 2
|
|
307
|
+
}, 1024)) : h("", !0),
|
|
308
|
+
l.kind === "option" ? (o(), f(s(le), {
|
|
309
|
+
key: 1,
|
|
310
|
+
class: G(["sun-selector-option", { "sun-selector-option-active": v(l.value) }]),
|
|
311
|
+
clickable: !0,
|
|
312
|
+
onTap: ($) => X(l.value)
|
|
313
|
+
}, {
|
|
314
|
+
start: r(() => [
|
|
315
|
+
y(e.$slots, "option-start", {
|
|
316
|
+
option: l.value,
|
|
317
|
+
index: n,
|
|
318
|
+
active: v(l.value)
|
|
319
|
+
})
|
|
320
|
+
]),
|
|
321
|
+
end: r(() => [
|
|
322
|
+
y(e.$slots, "option-end", {
|
|
323
|
+
option: l.value,
|
|
324
|
+
index: n,
|
|
325
|
+
active: v(l.value)
|
|
326
|
+
}),
|
|
327
|
+
v(l.value) ? (o(), f(s(E), {
|
|
328
|
+
key: 0,
|
|
310
329
|
class: "sun-selector-option-icon",
|
|
311
330
|
name: "checkmark"
|
|
312
|
-
})
|
|
331
|
+
})) : h("", !0)
|
|
313
332
|
]),
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
_: 2
|
|
331
|
-
}, [
|
|
332
|
-
K.value ? {
|
|
333
|
-
name: "extra",
|
|
334
|
-
fn: r(() => [
|
|
335
|
-
L("view", {
|
|
336
|
-
class: "sun-selector-clear-btn",
|
|
337
|
-
onTap: l[4] || (l[4] = (t) => B())
|
|
338
|
-
}, "清除", 32)
|
|
333
|
+
default: r(() => [
|
|
334
|
+
y(e.$slots, "option", {
|
|
335
|
+
option: l.value,
|
|
336
|
+
index: n,
|
|
337
|
+
active: v(l.value)
|
|
338
|
+
}, () => [
|
|
339
|
+
B("view", Xe, b(l.value.label), 1)
|
|
340
|
+
])
|
|
341
|
+
]),
|
|
342
|
+
_: 2
|
|
343
|
+
}, 1032, ["class", "onTap"])) : h("", !0)
|
|
344
|
+
], 64))), 128))
|
|
345
|
+
])
|
|
346
|
+
]),
|
|
347
|
+
_: 3
|
|
348
|
+
}, 8, ["refresher", "refreshing", "data", "loading", "style"]))
|
|
339
349
|
]),
|
|
340
|
-
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
350
|
+
_: 3
|
|
351
|
+
}),
|
|
352
|
+
y(e.$slots, "list", {
|
|
353
|
+
rendered: V.value,
|
|
354
|
+
ListTemplate: s(j)
|
|
355
|
+
}, () => [
|
|
356
|
+
w(s(j))
|
|
357
|
+
])
|
|
358
|
+
]),
|
|
359
|
+
_: 2
|
|
360
|
+
}, [
|
|
361
|
+
K.value ? {
|
|
362
|
+
name: "extra",
|
|
363
|
+
fn: r(() => [
|
|
364
|
+
B("view", {
|
|
365
|
+
class: "sun-selector-clear-btn",
|
|
366
|
+
onTap: t[2] || (t[2] = (l) => W())
|
|
367
|
+
}, [
|
|
368
|
+
t[9] || (t[9] = S(" 清除", -1)),
|
|
369
|
+
m.value ? h("", !0) : (o(), c(g, { key: 0 }, [
|
|
370
|
+
S("(" + b(T.value.length) + ")", 1)
|
|
371
|
+
], 64))
|
|
372
|
+
], 32)
|
|
373
|
+
]),
|
|
374
|
+
key: "0"
|
|
375
|
+
} : void 0
|
|
376
|
+
]), 1032, ["show", "title", "show-buttons"])
|
|
377
|
+
]),
|
|
378
|
+
_: 3
|
|
379
|
+
})
|
|
380
|
+
], 64));
|
|
348
381
|
}
|
|
349
382
|
});
|
|
350
383
|
export {
|
|
351
|
-
|
|
384
|
+
tl as default
|
|
352
385
|
};
|