@solar-taro/ui-vant 3.5.3 → 4.0.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 +21 -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/index15.js +1 -1
- 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/index7.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isOpperDevice as
|
|
3
|
-
import { BluetoothLowEnergeyDevice as
|
|
4
|
-
import { checkBluetooth as
|
|
5
|
-
import { SunIcon as
|
|
6
|
-
import { useDestroyed as
|
|
7
|
-
import { getSystemInfo as
|
|
8
|
-
import { filter as
|
|
9
|
-
import { dialog as
|
|
10
|
-
const
|
|
1
|
+
import { defineComponent as Z, ref as E, computed as ee, watch as te, onUnmounted as ne, Fragment as oe, vShow as se, openBlock as ie, createElementBlock as le, createElementVNode as re, unref as ce, createTextVNode as ae, toDisplayString as ue, normalizeClass as de, createVNode as pe, withDirectives as ve, withCtx as fe, renderList as me, normalizeStyle as we } from "vue";
|
|
2
|
+
import { isOpperDevice as he } from "@opper/core";
|
|
3
|
+
import { BluetoothLowEnergeyDevice as be } from "@opper/wx";
|
|
4
|
+
import { checkBluetooth as U, bluetoothService as w, vibrator as ge, overlay as r, withLoading as ye } from "@solar-taro/core";
|
|
5
|
+
import { SunIcon as _e, SunButton as q, SunList as De } from "@solar-taro/ui-sun";
|
|
6
|
+
import { useDestroyed as K, useObservable as W } from "@solar-vue/core";
|
|
7
|
+
import { getSystemInfo as Se, openSetting as xe } from "@tarojs/taro";
|
|
8
|
+
import { filter as G, switchMap as f, combineLatest as Ce, map as B, of as $, catchError as D, tap as N, timer as ke, takeUntil as O, finalize as T, from as Ie } from "rxjs";
|
|
9
|
+
import { dialog as Ee } from "./index10.js";
|
|
10
|
+
const i = ce, o = re, p = ue, S = pe, Be = se, $e = ve, Ne = de, L = ae, M = fe, P = oe, h = ie, b = le, Oe = me, Te = we, Le = { class: "sun-opper-controller" }, Me = ["show"], Pe = { class: "sun-opper-controller-device" }, Re = { class: "sun-opper-controller-device-header" }, ze = { class: "sun-opper-controller-device-name" }, Ve = { class: "sun-opper-controller-device-infos" }, Ae = { class: "sun-opper-controller-device-info" }, je = { class: "sun-opper-controller-device-info" }, Fe = { class: "sun-opper-controller-device-info" }, Ue = { class: "sun-opper-controller-device-info" }, qe = { class: "van-button-container" }, Ke = ["title", "label", "onTap"], We = { class: "van-button-container" }, Ge = ["show"], ot = /* @__PURE__ */ Z({
|
|
11
11
|
__name: "index",
|
|
12
12
|
props: {
|
|
13
13
|
show: { type: Boolean, default: !1 },
|
|
@@ -16,80 +16,80 @@ const l = ee, n = te, p = ne, U = oe, Ie = se, xe = ie, Ee = re, $e = le, T = ce
|
|
|
16
16
|
opper: {}
|
|
17
17
|
},
|
|
18
18
|
emits: ["update:show", "connect", "disconnect"],
|
|
19
|
-
setup(
|
|
20
|
-
const v =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
return
|
|
25
|
-
id:
|
|
26
|
-
name:
|
|
27
|
-
version:
|
|
28
|
-
accuracy:
|
|
29
|
-
volt:
|
|
30
|
-
|
|
19
|
+
setup(R, { emit: H }) {
|
|
20
|
+
const v = R, x = H, l = v.opper, z = K(), C = K(), a = E({}), u = E(!1), V = W(() => l.connected), g = E(!1), A = ee(() => Object.values(a.value)), d = W(() => l.connected.pipe(
|
|
21
|
+
G(Boolean),
|
|
22
|
+
f(() => {
|
|
23
|
+
const n = l.device;
|
|
24
|
+
return Ce({
|
|
25
|
+
id: $(n.id),
|
|
26
|
+
name: n.name,
|
|
27
|
+
version: n.firmwareRevision,
|
|
28
|
+
accuracy: l.accuracyChange,
|
|
29
|
+
volt: l.batteryChange.pipe(
|
|
30
|
+
B(([e]) => e)
|
|
31
31
|
),
|
|
32
|
-
charging:
|
|
33
|
-
|
|
32
|
+
charging: l.batteryChange.pipe(
|
|
33
|
+
B(([, e]) => !!e)
|
|
34
34
|
),
|
|
35
|
-
serialNumber:
|
|
35
|
+
serialNumber: n.serialNumber
|
|
36
36
|
});
|
|
37
37
|
})
|
|
38
|
-
), {}),
|
|
38
|
+
), {}), J = [
|
|
39
39
|
{ id: 1, name: "断开连接" },
|
|
40
40
|
{ id: 2, name: "断开连接并关机", color: "var(--color-danger)" }
|
|
41
41
|
];
|
|
42
42
|
let k = !1;
|
|
43
43
|
function I() {
|
|
44
|
-
if (!
|
|
45
|
-
let
|
|
44
|
+
if (!U()) return;
|
|
45
|
+
let n = null;
|
|
46
46
|
u.value = !0, w.openAdapter().pipe(
|
|
47
47
|
D((e) => {
|
|
48
48
|
var t, c;
|
|
49
49
|
if ((c = (t = e.errMsg) == null ? void 0 : t.includes) != null && c.call(t, "already"))
|
|
50
|
-
return
|
|
50
|
+
return $(null);
|
|
51
51
|
throw e;
|
|
52
52
|
}),
|
|
53
|
-
|
|
53
|
+
f(
|
|
54
54
|
() => w.startDevicesDiscovery({
|
|
55
55
|
allowDuplicatesKey: !0,
|
|
56
56
|
powerLevel: "high"
|
|
57
57
|
})
|
|
58
58
|
),
|
|
59
|
-
|
|
60
|
-
() =>
|
|
61
|
-
|
|
62
|
-
).subscribe(() =>
|
|
59
|
+
N(
|
|
60
|
+
() => ke(0, 1250).pipe(
|
|
61
|
+
O(C)
|
|
62
|
+
).subscribe(() => ge.short())
|
|
63
63
|
),
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
f(() => w.devicesChange),
|
|
65
|
+
B((e) => e.filter((t) => he({
|
|
66
66
|
id: t.deviceId,
|
|
67
67
|
name: t.name
|
|
68
68
|
}))),
|
|
69
|
-
|
|
69
|
+
O(C),
|
|
70
70
|
D((e) => {
|
|
71
71
|
var t, c, s;
|
|
72
72
|
throw e.errno === 103 ? r.modal("温馨提示", "请先授予小程序蓝牙与位置权限").then(() => {
|
|
73
|
-
|
|
74
|
-
}) : (c = (t = e.errMsg) == null ? void 0 : t.includes) != null && c.call(t, "permission") ? r.tips("请先授予微信蓝牙与位置权限") : (s = e.errMsg) != null && s.includes("frequently") ? r.tips("操作频繁,请稍后再试") : r.tips(e.errMsg),
|
|
73
|
+
xe();
|
|
74
|
+
}) : (c = (t = e.errMsg) == null ? void 0 : t.includes) != null && c.call(t, "permission") ? r.tips("请先授予微信蓝牙与位置权限") : (s = e.errMsg) != null && s.includes("frequently") ? r.tips("操作频繁,请稍后再试") : r.tips(e.errMsg), m(), e;
|
|
75
75
|
}),
|
|
76
|
-
|
|
76
|
+
T(() => {
|
|
77
77
|
u.value = !1, a.value = {}, w.stopDevicesDiscovery().subscribe();
|
|
78
78
|
})
|
|
79
79
|
).subscribe((e) => {
|
|
80
80
|
const t = v.mac || v.deviceId;
|
|
81
81
|
if (t) {
|
|
82
82
|
const s = t.slice(-5).replace(":", ""), _ = e.find(
|
|
83
|
-
(
|
|
84
|
-
|
|
83
|
+
(F) => F.deviceId === t || // 由于 iOS 的 deviceId 不是 MAC,但是蓝牙名字上有 MAC 后四位,这里通过比对 MAC 来选择设备
|
|
84
|
+
F.name.endsWith(s)
|
|
85
85
|
);
|
|
86
86
|
if (_)
|
|
87
87
|
return y(_.deviceId);
|
|
88
88
|
}
|
|
89
89
|
if (e.length === 1) {
|
|
90
|
-
if (
|
|
90
|
+
if (n != null || (n = Date.now()), Date.now() - n > 5e3)
|
|
91
91
|
return y(e[0].deviceId);
|
|
92
|
-
} else e.length > 1 && (
|
|
92
|
+
} else e.length > 1 && (n = null);
|
|
93
93
|
Object.keys(a.value).forEach((s) => {
|
|
94
94
|
a.value[s].recommended = !1, Date.now() - a.value[s].discoveryTime > 5e3 && delete a.value[s];
|
|
95
95
|
}), e.forEach((s) => {
|
|
@@ -99,133 +99,137 @@ const l = ee, n = te, p = ne, U = oe, Ie = se, xe = ie, Ee = re, $e = le, T = ce
|
|
|
99
99
|
c && (c.recommended = !0);
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function m() {
|
|
103
103
|
C.next();
|
|
104
104
|
}
|
|
105
|
-
function y(
|
|
106
|
-
k || (r.loading("正在连接"), k = !0,
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
function y(n) {
|
|
106
|
+
k || (r.loading("正在连接"), k = !0, z.next(), l.connect(new be(n)).pipe(
|
|
107
|
+
N(() => {
|
|
108
|
+
m(), x("connect", n), r.success("连接成功"), setTimeout(j, 600);
|
|
109
109
|
}),
|
|
110
110
|
D((e) => {
|
|
111
111
|
throw e.errCode === 10003 ? r.tips("连接超时,请重试") : r.tips(`连接失败:${e.errCode}:${e.errMsg}`), e;
|
|
112
112
|
}),
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
T(() => k = !1),
|
|
114
|
+
f(() => l.connected.pipe(G((e) => !e))),
|
|
115
115
|
// 监听断开
|
|
116
|
-
|
|
116
|
+
O(z)
|
|
117
117
|
).subscribe(() => {
|
|
118
|
-
|
|
118
|
+
x("disconnect", n), r.error("连接断开");
|
|
119
119
|
}));
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
function Q(n) {
|
|
122
|
+
U() && (u.value = !0, w.openAdapter().pipe(
|
|
123
|
+
T(() => {
|
|
124
124
|
u.value = !1;
|
|
125
125
|
})
|
|
126
126
|
).subscribe(() => {
|
|
127
|
-
y(
|
|
127
|
+
y(n);
|
|
128
128
|
}));
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
var
|
|
132
|
-
(
|
|
133
|
-
|
|
130
|
+
function X() {
|
|
131
|
+
var n;
|
|
132
|
+
(n = l.disconnect()) == null || n.pipe(
|
|
133
|
+
ye("正在断开")
|
|
134
134
|
).subscribe();
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
switch (
|
|
136
|
+
function Y({ detail: n }) {
|
|
137
|
+
switch (n.id) {
|
|
138
138
|
case 1:
|
|
139
|
-
|
|
139
|
+
X();
|
|
140
140
|
break;
|
|
141
141
|
case 2:
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
D(() =>
|
|
142
|
+
Ie(Ee.confirm("温馨提示", "您确定要关闭设备电源吗?")).pipe(
|
|
143
|
+
N(() => r.loading("正在关机")),
|
|
144
|
+
f(() => l.shutdown()),
|
|
145
|
+
D(() => $(null)),
|
|
146
146
|
// 关机后距离信号丢失还有一段时间,这里主动断开连接,改进用户体验
|
|
147
|
-
|
|
147
|
+
f(() => l.disconnect())
|
|
148
148
|
).subscribe(() => {
|
|
149
149
|
r.success("设备已关机");
|
|
150
150
|
});
|
|
151
151
|
break;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
|
|
154
|
+
function j() {
|
|
155
|
+
x("update:show", !1);
|
|
156
156
|
}
|
|
157
|
-
return
|
|
158
|
-
if (
|
|
159
|
-
if (!
|
|
157
|
+
return te(() => v.show, async (n) => {
|
|
158
|
+
if (n) {
|
|
159
|
+
if (!V.value)
|
|
160
160
|
if (v.mac) {
|
|
161
|
-
const { platform: e } = await
|
|
162
|
-
e === "ios" ? I() :
|
|
161
|
+
const { platform: e } = await Se();
|
|
162
|
+
e === "ios" ? I() : Q(v.mac);
|
|
163
163
|
} else
|
|
164
164
|
I();
|
|
165
165
|
} else
|
|
166
|
-
u.value &&
|
|
167
|
-
}),
|
|
168
|
-
|
|
169
|
-
}), (
|
|
170
|
-
|
|
171
|
-
show:
|
|
166
|
+
u.value && m();
|
|
167
|
+
}), ne(() => {
|
|
168
|
+
m();
|
|
169
|
+
}), (n, e) => (h(), b("view", Le, [
|
|
170
|
+
o("van-action-sheet", {
|
|
171
|
+
show: R.show,
|
|
172
172
|
title: "OPPER",
|
|
173
173
|
"close-on-click-overlay": !0,
|
|
174
|
-
onClose: e[2] || (e[2] = (t) =>
|
|
174
|
+
onClose: e[2] || (e[2] = (t) => j())
|
|
175
175
|
}, [
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
e[6] || (e[6] =
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
class:
|
|
176
|
+
i(V) ? (h(), b(P, { key: 0 }, [
|
|
177
|
+
o("view", Pe, [
|
|
178
|
+
o("view", Re, [
|
|
179
|
+
e[6] || (e[6] = o("view", { class: "sun-opper-controller-device-title" }, "设备已连接", -1)),
|
|
180
|
+
o("view", ze, [
|
|
181
|
+
L(p(i(d).name || "OPPER") + " ", 1),
|
|
182
|
+
o("view", {
|
|
183
|
+
class: Ne(["sun-opper-controller-device-battery", { "sun-opper-controller-device-battery-active": i(d).charging }])
|
|
184
184
|
}, [
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
[
|
|
185
|
+
S(i(_e), { name: "flash" }),
|
|
186
|
+
$e(o("text", null, p(i(d).volt) + "%", 513), [
|
|
187
|
+
[Be, i(d).volt]
|
|
188
188
|
])
|
|
189
189
|
], 2)
|
|
190
190
|
])
|
|
191
191
|
]),
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
e[7] || (e[7] =
|
|
195
|
-
|
|
192
|
+
o("view", Ve, [
|
|
193
|
+
o("view", Ae, [
|
|
194
|
+
e[7] || (e[7] = o("view", null, "设备号", -1)),
|
|
195
|
+
o("view", null, p(i(d).id), 1)
|
|
196
196
|
]),
|
|
197
|
-
|
|
198
|
-
e[8] || (e[8] =
|
|
199
|
-
|
|
197
|
+
o("view", je, [
|
|
198
|
+
e[8] || (e[8] = o("view", null, "秤台精度", -1)),
|
|
199
|
+
o("view", null, p(i(d).accuracy || 1) + "克", 1)
|
|
200
200
|
]),
|
|
201
|
-
|
|
202
|
-
e[9] || (e[9] =
|
|
203
|
-
|
|
201
|
+
o("view", Fe, [
|
|
202
|
+
e[9] || (e[9] = o("view", null, "固件版本", -1)),
|
|
203
|
+
o("view", null, p(i(d).version), 1)
|
|
204
204
|
]),
|
|
205
|
-
|
|
206
|
-
e[10] || (e[10] =
|
|
207
|
-
|
|
205
|
+
o("view", Ue, [
|
|
206
|
+
e[10] || (e[10] = o("view", null, "序列号", -1)),
|
|
207
|
+
o("view", null, p(i(d).serialNumber), 1)
|
|
208
208
|
])
|
|
209
209
|
])
|
|
210
210
|
]),
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
block: "true",
|
|
211
|
+
o("view", qe, [
|
|
212
|
+
S(i(q), {
|
|
213
|
+
color: "danger",
|
|
214
|
+
expand: "block",
|
|
216
215
|
onTap: e[0] || (e[0] = (t) => g.value = !0)
|
|
217
|
-
},
|
|
216
|
+
}, {
|
|
217
|
+
default: M(() => [...e[11] || (e[11] = [
|
|
218
|
+
L("断开连接", -1)
|
|
219
|
+
])]),
|
|
220
|
+
_: 1
|
|
221
|
+
})
|
|
218
222
|
])
|
|
219
|
-
], 64)) : (h(), b(
|
|
220
|
-
|
|
223
|
+
], 64)) : (h(), b(P, { key: 1 }, [
|
|
224
|
+
S(i(De), {
|
|
221
225
|
class: "sun-opper-controller-device-list",
|
|
222
226
|
refresher: !1,
|
|
223
|
-
data:
|
|
227
|
+
data: A.value,
|
|
224
228
|
loading: u.value,
|
|
225
229
|
"loading-text": "正在扫描"
|
|
226
230
|
}, {
|
|
227
|
-
default:
|
|
228
|
-
(h(!0), b(
|
|
231
|
+
default: M(() => [
|
|
232
|
+
(h(!0), b(P, null, Oe(A.value, (t) => (h(), b("van-cell", {
|
|
229
233
|
key: t.deviceId,
|
|
230
234
|
title: t.name,
|
|
231
235
|
label: t.deviceId,
|
|
@@ -233,34 +237,37 @@ const l = ee, n = te, p = ne, U = oe, Ie = se, xe = ie, Ee = re, $e = le, T = ce
|
|
|
233
237
|
clickable: !0,
|
|
234
238
|
onTap: (c) => y(t.deviceId)
|
|
235
239
|
}, [
|
|
236
|
-
|
|
237
|
-
style:
|
|
240
|
+
o("text", {
|
|
241
|
+
style: Te({ color: t.recommended ? "var(--color-success)" : "inherit" })
|
|
238
242
|
}, p(t.RSSI) + "dBm", 5)
|
|
239
|
-
], 40,
|
|
243
|
+
], 40, Ke))), 128))
|
|
240
244
|
]),
|
|
241
245
|
_: 1
|
|
242
246
|
}, 8, ["data", "loading"]),
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
247
|
+
o("view", We, [
|
|
248
|
+
S(i(q), {
|
|
249
|
+
expand: "block",
|
|
250
|
+
onTap: e[1] || (e[1] = (t) => u.value ? m() : I())
|
|
251
|
+
}, {
|
|
252
|
+
default: M(() => [
|
|
253
|
+
L(p(u.value ? "停止扫描" : "扫描 OPPER 设备"), 1)
|
|
254
|
+
]),
|
|
255
|
+
_: 1
|
|
256
|
+
})
|
|
250
257
|
])
|
|
251
258
|
], 64))
|
|
252
|
-
], 40,
|
|
253
|
-
|
|
259
|
+
], 40, Me),
|
|
260
|
+
o("van-action-sheet", {
|
|
254
261
|
show: g.value,
|
|
255
|
-
actions:
|
|
262
|
+
actions: J,
|
|
256
263
|
"cancel-text": "取消",
|
|
257
|
-
onSelect: e[3] || (e[3] = (t) =>
|
|
264
|
+
onSelect: e[3] || (e[3] = (t) => Y(t)),
|
|
258
265
|
onCancel: e[4] || (e[4] = (t) => g.value = !1),
|
|
259
266
|
onClose: e[5] || (e[5] = (t) => g.value = !1)
|
|
260
|
-
}, null, 40,
|
|
267
|
+
}, null, 40, Ge)
|
|
261
268
|
]));
|
|
262
269
|
}
|
|
263
270
|
});
|
|
264
271
|
export {
|
|
265
|
-
|
|
272
|
+
ot as default
|
|
266
273
|
};
|
package/index8.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useFilterList as
|
|
3
|
-
|
|
1
|
+
import { defineComponent as y, computed as v, openBlock as V, createElementBlock as k, createElementVNode as w, mergeProps as B, unref as h, createBlock as C, isRef as b, createCommentVNode as g } from "vue";
|
|
2
|
+
import { useFilterList as x } from "@solar-taro/core";
|
|
3
|
+
import { SunSearchbar as K } from "@solar-taro/ui-sun";
|
|
4
|
+
const r = h, N = B, E = w, L = b, d = V, $ = C, q = g, P = k, R = ["show"], S = ["title", "value-key", "columns", "loading", "default-index"], U = /* @__PURE__ */ y({
|
|
4
5
|
inheritAttrs: !1,
|
|
5
6
|
__name: "index",
|
|
6
7
|
props: {
|
|
@@ -15,50 +16,49 @@ const b = h, K = w, N = k, u = C, r = V, E = g, L = ["show"], $ = ["title", "val
|
|
|
15
16
|
required: { type: Boolean }
|
|
16
17
|
},
|
|
17
18
|
emits: ["close", "cancel", "confirm", "update:show", "update:modelValue"],
|
|
18
|
-
setup(
|
|
19
|
-
const n =
|
|
20
|
-
var
|
|
21
|
-
return (
|
|
22
|
-
}), { keyword:
|
|
19
|
+
setup(t, { emit: s }) {
|
|
20
|
+
const n = s, l = t, m = v(() => {
|
|
21
|
+
var o;
|
|
22
|
+
return (o = l.options.findIndex((e) => e[l.valueKey] === l.modelValue)) != null ? o : 0;
|
|
23
|
+
}), { keyword: u, filteredList: c } = x(
|
|
23
24
|
() => l.options,
|
|
24
|
-
(
|
|
25
|
+
(o, e) => o[l.labelKey].toLowerCase().includes(e.toLowerCase())
|
|
25
26
|
);
|
|
26
|
-
function
|
|
27
|
-
l.required || n("update:modelValue", null), n("cancel", l.modelValue),
|
|
27
|
+
function f() {
|
|
28
|
+
l.required || n("update:modelValue", null), n("cancel", l.modelValue), i();
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
+
function i() {
|
|
30
31
|
n("update:show", !1), n("close");
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
-
n("update:modelValue",
|
|
33
|
+
function p({ detail: o }) {
|
|
34
|
+
n("update:modelValue", o.value[l.valueKey]), n("confirm", o.value), n("update:show", !1);
|
|
34
35
|
}
|
|
35
|
-
return (
|
|
36
|
-
show:
|
|
36
|
+
return (o, e) => (d(), P("van-popup", {
|
|
37
|
+
show: t.show,
|
|
37
38
|
position: "bottom",
|
|
38
39
|
round: !0,
|
|
39
40
|
"close-on-click-overlay": !0,
|
|
40
|
-
onClose:
|
|
41
|
+
onClose: e[3] || (e[3] = (a) => i())
|
|
41
42
|
}, [
|
|
42
|
-
|
|
43
|
-
title:
|
|
43
|
+
E("van-picker", N(o.$attrs, {
|
|
44
|
+
title: t.title,
|
|
44
45
|
"show-toolbar": !0,
|
|
45
|
-
"value-key":
|
|
46
|
-
columns:
|
|
47
|
-
loading:
|
|
48
|
-
"default-index":
|
|
49
|
-
onCancel:
|
|
50
|
-
onConfirm:
|
|
51
|
-
}), null, 16,
|
|
52
|
-
|
|
46
|
+
"value-key": t.labelKey,
|
|
47
|
+
columns: r(c),
|
|
48
|
+
loading: t.loading,
|
|
49
|
+
"default-index": m.value,
|
|
50
|
+
onCancel: e[0] || (e[0] = (a) => f()),
|
|
51
|
+
onConfirm: e[1] || (e[1] = (a) => p(a))
|
|
52
|
+
}), null, 16, S),
|
|
53
|
+
t.searchable && t.options.length ? (d(), $(r(K), {
|
|
53
54
|
key: 0,
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
placeholder: "
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
], 40, L));
|
|
55
|
+
modelValue: r(u),
|
|
56
|
+
"onUpdate:modelValue": e[2] || (e[2] = (a) => L(u) ? u.value = a : null),
|
|
57
|
+
placeholder: "输入关键字搜索"
|
|
58
|
+
}, null, 8, ["modelValue"])) : q("", !0)
|
|
59
|
+
], 40, R));
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
export {
|
|
63
|
-
|
|
63
|
+
U as default
|
|
64
64
|
};
|