@solar-taro/ui-vant 1.0.2 → 1.1.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.
Files changed (138) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/index.js +32 -1762
  3. package/index10.js +236 -0
  4. package/index100.js +7 -0
  5. package/index101.js +8 -0
  6. package/index102.js +9 -0
  7. package/index103.js +12 -0
  8. package/index104.js +9 -0
  9. package/index105.js +9 -0
  10. package/index106.js +20 -0
  11. package/index107.js +7 -0
  12. package/index108.js +7 -0
  13. package/index109.js +6 -0
  14. package/index11.js +48 -0
  15. package/index110.js +6 -0
  16. package/index111.js +17 -0
  17. package/index112.js +10 -0
  18. package/index113.js +8 -0
  19. package/index114.js +8 -0
  20. package/index115.js +8 -0
  21. package/index116.js +8 -0
  22. package/index117.js +8 -0
  23. package/index118.js +5 -0
  24. package/index119.js +20 -0
  25. package/index12.js +21 -0
  26. package/index120.js +8 -0
  27. package/index121.js +6 -0
  28. package/index122.js +6 -0
  29. package/index123.js +12 -0
  30. package/index124.js +8 -0
  31. package/index125.js +7 -0
  32. package/index126.js +8 -0
  33. package/index127.js +5 -0
  34. package/index128.js +7 -0
  35. package/index129.js +7 -0
  36. package/index13.js +31 -0
  37. package/index130.js +13 -0
  38. package/index131.js +9 -0
  39. package/index132.js +9 -0
  40. package/index133.js +7 -0
  41. package/index134.js +10 -0
  42. package/index135.js +5 -0
  43. package/index14.js +7 -0
  44. package/index15.js +66 -0
  45. package/index16.js +4 -0
  46. package/index17.js +4 -0
  47. package/index18.js +4 -0
  48. package/index19.js +4 -0
  49. package/index2.js +9 -0
  50. package/index20.js +4 -0
  51. package/index21.js +4 -0
  52. package/index22.js +4 -0
  53. package/index23.js +4 -0
  54. package/index24.js +4 -0
  55. package/index25.js +8 -0
  56. package/index26.js +11 -0
  57. package/index27.js +11 -0
  58. package/index28.js +65 -0
  59. package/index29.js +6 -0
  60. package/index3.js +131 -0
  61. package/index30.js +10 -0
  62. package/index31.js +9 -0
  63. package/index32.js +6 -0
  64. package/index33.js +4 -0
  65. package/index34.js +8 -0
  66. package/index35.js +12 -0
  67. package/index36.js +7 -0
  68. package/index37.js +6 -0
  69. package/index38.js +5 -0
  70. package/index39.js +6 -0
  71. package/index4.js +172 -0
  72. package/index40.js +10 -0
  73. package/index41.js +7 -0
  74. package/index42.js +7 -0
  75. package/index43.js +9 -0
  76. package/index44.js +8 -0
  77. package/index45.js +11 -0
  78. package/index46.js +7 -0
  79. package/index47.js +9 -0
  80. package/index48.js +7 -0
  81. package/index49.js +12 -0
  82. package/index5.js +36 -0
  83. package/index50.js +9 -0
  84. package/index51.js +20 -0
  85. package/index52.js +14 -0
  86. package/index53.js +9 -0
  87. package/index54.js +15 -0
  88. package/index55.js +6 -0
  89. package/index56.js +10 -0
  90. package/index57.js +12 -0
  91. package/index58.js +14 -0
  92. package/index59.js +8 -0
  93. package/index6.js +102 -0
  94. package/index60.js +8 -0
  95. package/index61.js +11 -0
  96. package/index62.js +18 -0
  97. package/index63.js +8 -0
  98. package/index64.js +8 -0
  99. package/index65.js +11 -0
  100. package/index66.js +9 -0
  101. package/index67.js +8 -0
  102. package/index68.js +8 -0
  103. package/index69.js +9 -0
  104. package/index7.js +46 -0
  105. package/index70.js +9 -0
  106. package/index71.js +28 -0
  107. package/index72.js +8 -0
  108. package/index73.js +42 -0
  109. package/index74.js +9 -0
  110. package/index75.js +8 -0
  111. package/index76.js +17 -0
  112. package/index77.js +10 -0
  113. package/index78.js +4 -0
  114. package/index79.js +5 -0
  115. package/index8.js +271 -0
  116. package/index80.js +15 -0
  117. package/index81.js +7 -0
  118. package/index82.js +5 -0
  119. package/index83.js +6 -0
  120. package/index84.js +6 -0
  121. package/index85.js +6 -0
  122. package/index86.js +6 -0
  123. package/index87.js +6 -0
  124. package/index88.js +17 -0
  125. package/index89.js +16 -0
  126. package/index9.js +64 -0
  127. package/index90.js +11 -0
  128. package/index91.js +5 -0
  129. package/index92.js +8 -0
  130. package/index93.js +8 -0
  131. package/index94.js +8 -0
  132. package/index95.js +10 -0
  133. package/index96.js +20 -0
  134. package/index97.js +13 -0
  135. package/index98.js +8 -0
  136. package/index99.js +7 -0
  137. package/opper-controller/index.vue.d.ts +8 -4
  138. package/package.json +2 -1
package/index.js CHANGED
@@ -1,1764 +1,34 @@
1
- import { defineComponent as L, ref as D, computed as C, mergeProps as re, createElementVNode as H, openBlock as F, createElementBlock as z, createCommentVNode as X, renderSlot as oe, resolveDirective as un, withDirectives as Be, unref as me, toDisplayString as ae, normalizeClass as be, Fragment as Ve, createTextVNode as Qe, withCtx as et, createBlock as cn, vShow as dn, createVNode as pn, onUnmounted as tt, watch as Mn, renderList as nt, normalizeStyle as Ln } from "vue";
2
- import { date as je, vibrator as fn, checkBluetooth as dt, bluetoothService as ie, overlay as E, withLoading as Fn, useFilterList as vn } from "@solar-taro/core";
3
- import { getCurrentInstance as He, nextTick as Ae, onKeyboardHeightChange as zn, offKeyboardHeightChange as Rn, getSystemInfo as Un, openSetting as Gn } from "@tarojs/taro";
4
- import { SunSpinner as pt, SunVirtualScroll as qn } from "@solar-taro/ui-sun";
5
- import { isOpperDevice as Hn } from "@opper/core";
6
- import { BluetoothLowEnergeDevice as Wn } from "@opper/wx";
7
- import { Subject as Yn, takeUntil as ve, filter as Xn, switchMap as ue, combineLatest as Jn, of as Ie, map as Ke, catchError as Ne, tap as ft, timer as Zn, finalize as xe, from as Qn } from "rxjs";
8
- var yn = typeof global == "object" && global && global.Object === Object && global, er = typeof self == "object" && self && self.Object === Object && self, N = yn || er || Function("return this")(), te = N.Symbol, hn = Object.prototype, tr = hn.hasOwnProperty, nr = hn.toString, ce = te ? te.toStringTag : void 0;
9
- function rr(e) {
10
- var n = tr.call(e, ce), t = e[ce];
11
- try {
12
- e[ce] = void 0;
13
- var r = !0;
14
- } catch {
15
- }
16
- var l = nr.call(e);
17
- return r && (n ? e[ce] = t : delete e[ce]), l;
18
- }
19
- var or = Object.prototype, ar = or.toString;
20
- function sr(e) {
21
- return ar.call(e);
22
- }
23
- var lr = "[object Null]", ir = "[object Undefined]", vt = te ? te.toStringTag : void 0;
24
- function $e(e) {
25
- return e == null ? e === void 0 ? ir : lr : vt && vt in Object(e) ? rr(e) : sr(e);
26
- }
27
- function we(e) {
28
- return e != null && typeof e == "object";
29
- }
30
- var rt = Array.isArray;
31
- function _e(e) {
32
- var n = typeof e;
33
- return e != null && (n == "object" || n == "function");
34
- }
35
- var ur = "[object AsyncFunction]", cr = "[object Function]", dr = "[object GeneratorFunction]", pr = "[object Proxy]";
36
- function gn(e) {
37
- if (!_e(e))
38
- return !1;
39
- var n = $e(e);
40
- return n == cr || n == dr || n == ur || n == pr;
41
- }
42
- var Me = N["__core-js_shared__"], yt = function() {
43
- var e = /[^.]+$/.exec(Me && Me.keys && Me.keys.IE_PROTO || "");
44
- return e ? "Symbol(src)_1." + e : "";
45
- }();
46
- function fr(e) {
47
- return !!yt && yt in e;
48
- }
49
- var vr = Function.prototype, yr = vr.toString;
50
- function J(e) {
51
- if (e != null) {
52
- try {
53
- return yr.call(e);
54
- } catch {
55
- }
56
- try {
57
- return e + "";
58
- } catch {
59
- }
60
- }
61
- return "";
62
- }
63
- var hr = /[\\^$.*+?()[\]{}|]/g, gr = /^\[object .+?Constructor\]$/, mr = Function.prototype, br = Object.prototype, $r = mr.toString, wr = br.hasOwnProperty, _r = RegExp(
64
- "^" + $r.call(wr).replace(hr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
65
- );
66
- function Tr(e) {
67
- if (!_e(e) || fr(e))
68
- return !1;
69
- var n = gn(e) ? _r : gr;
70
- return n.test(J(e));
71
- }
72
- function jr(e, n) {
73
- return e == null ? void 0 : e[n];
74
- }
75
- function Z(e, n) {
76
- var t = jr(e, n);
77
- return Tr(t) ? t : void 0;
78
- }
79
- var We = Z(N, "WeakMap"), ht = Object.create, Sr = /* @__PURE__ */ function() {
80
- function e() {
81
- }
82
- return function(n) {
83
- if (!_e(n))
84
- return {};
85
- if (ht)
86
- return ht(n);
87
- e.prototype = n;
88
- var t = new e();
89
- return e.prototype = void 0, t;
90
- };
91
- }();
92
- function Cr(e, n) {
93
- var t = -1, r = e.length;
94
- for (n || (n = Array(r)); ++t < r; )
95
- n[t] = e[t];
96
- return n;
97
- }
98
- var gt = function() {
99
- try {
100
- var e = Z(Object, "defineProperty");
101
- return e({}, "", {}), e;
102
- } catch {
103
- }
104
- }();
105
- function kr(e, n) {
106
- for (var t = -1, r = e == null ? 0 : e.length; ++t < r && n(e[t], t, e) !== !1; )
107
- ;
108
- return e;
109
- }
110
- var Or = 9007199254740991, Ar = /^(?:0|[1-9]\d*)$/;
111
- function Br(e, n) {
112
- var t = typeof e;
113
- return n = n == null ? Or : n, !!n && (t == "number" || t != "symbol" && Ar.test(e)) && e > -1 && e % 1 == 0 && e < n;
114
- }
115
- function mn(e, n, t) {
116
- n == "__proto__" && gt ? gt(e, n, {
117
- configurable: !0,
118
- enumerable: !0,
119
- value: t,
120
- writable: !0
121
- }) : e[n] = t;
122
- }
123
- function bn(e, n) {
124
- return e === n || e !== e && n !== n;
125
- }
126
- var Vr = Object.prototype, Pr = Vr.hasOwnProperty;
127
- function $n(e, n, t) {
128
- var r = e[n];
129
- (!(Pr.call(e, n) && bn(r, t)) || t === void 0 && !(n in e)) && mn(e, n, t);
130
- }
131
- function Pe(e, n, t, r) {
132
- var l = !t;
133
- t || (t = {});
134
- for (var p = -1, c = n.length; ++p < c; ) {
135
- var y = n[p], v = void 0;
136
- v === void 0 && (v = e[y]), l ? mn(t, y, v) : $n(t, y, v);
137
- }
138
- return t;
139
- }
140
- var Dr = 9007199254740991;
141
- function wn(e) {
142
- return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Dr;
143
- }
144
- function _n(e) {
145
- return e != null && wn(e.length) && !gn(e);
146
- }
147
- var Er = Object.prototype;
148
- function ot(e) {
149
- var n = e && e.constructor, t = typeof n == "function" && n.prototype || Er;
150
- return e === t;
151
- }
152
- function Ir(e, n) {
153
- for (var t = -1, r = Array(e); ++t < e; )
154
- r[t] = n(t);
155
- return r;
156
- }
157
- var Kr = "[object Arguments]";
158
- function mt(e) {
159
- return we(e) && $e(e) == Kr;
160
- }
161
- var Tn = Object.prototype, Nr = Tn.hasOwnProperty, xr = Tn.propertyIsEnumerable, Mr = mt(/* @__PURE__ */ function() {
162
- return arguments;
163
- }()) ? mt : function(e) {
164
- return we(e) && Nr.call(e, "callee") && !xr.call(e, "callee");
165
- };
166
- function Lr() {
167
- return !1;
168
- }
169
- var jn = typeof exports == "object" && exports && !exports.nodeType && exports, bt = jn && typeof module == "object" && module && !module.nodeType && module, Fr = bt && bt.exports === jn, $t = Fr ? N.Buffer : void 0, zr = $t ? $t.isBuffer : void 0, Sn = zr || Lr, Rr = "[object Arguments]", Ur = "[object Array]", Gr = "[object Boolean]", qr = "[object Date]", Hr = "[object Error]", Wr = "[object Function]", Yr = "[object Map]", Xr = "[object Number]", Jr = "[object Object]", Zr = "[object RegExp]", Qr = "[object Set]", eo = "[object String]", to = "[object WeakMap]", no = "[object ArrayBuffer]", ro = "[object DataView]", oo = "[object Float32Array]", ao = "[object Float64Array]", so = "[object Int8Array]", lo = "[object Int16Array]", io = "[object Int32Array]", uo = "[object Uint8Array]", co = "[object Uint8ClampedArray]", po = "[object Uint16Array]", fo = "[object Uint32Array]", j = {};
170
- j[oo] = j[ao] = j[so] = j[lo] = j[io] = j[uo] = j[co] = j[po] = j[fo] = !0;
171
- j[Rr] = j[Ur] = j[no] = j[Gr] = j[ro] = j[qr] = j[Hr] = j[Wr] = j[Yr] = j[Xr] = j[Jr] = j[Zr] = j[Qr] = j[eo] = j[to] = !1;
172
- function vo(e) {
173
- return we(e) && wn(e.length) && !!j[$e(e)];
174
- }
175
- function at(e) {
176
- return function(n) {
177
- return e(n);
178
- };
179
- }
180
- var Cn = typeof exports == "object" && exports && !exports.nodeType && exports, ye = Cn && typeof module == "object" && module && !module.nodeType && module, yo = ye && ye.exports === Cn, Le = yo && yn.process, ne = function() {
181
- try {
182
- var e = ye && ye.require && ye.require("util").types;
183
- return e || Le && Le.binding && Le.binding("util");
184
- } catch {
185
- }
186
- }(), wt = ne && ne.isTypedArray, ho = wt ? at(wt) : vo, go = Object.prototype, mo = go.hasOwnProperty;
187
- function kn(e, n) {
188
- var t = rt(e), r = !t && Mr(e), l = !t && !r && Sn(e), p = !t && !r && !l && ho(e), c = t || r || l || p, y = c ? Ir(e.length, String) : [], v = y.length;
189
- for (var m in e)
190
- (n || mo.call(e, m)) && !(c && // Safari 9 has enumerable `arguments.length` in strict mode.
191
- (m == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
192
- l && (m == "offset" || m == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
193
- p && (m == "buffer" || m == "byteLength" || m == "byteOffset") || // Skip index properties.
194
- Br(m, v))) && y.push(m);
195
- return y;
196
- }
197
- function On(e, n) {
198
- return function(t) {
199
- return e(n(t));
200
- };
201
- }
202
- var bo = On(Object.keys, Object), $o = Object.prototype, wo = $o.hasOwnProperty;
203
- function _o(e) {
204
- if (!ot(e))
205
- return bo(e);
206
- var n = [];
207
- for (var t in Object(e))
208
- wo.call(e, t) && t != "constructor" && n.push(t);
209
- return n;
210
- }
211
- function st(e) {
212
- return _n(e) ? kn(e) : _o(e);
213
- }
214
- function To(e) {
215
- var n = [];
216
- if (e != null)
217
- for (var t in Object(e))
218
- n.push(t);
219
- return n;
220
- }
221
- var jo = Object.prototype, So = jo.hasOwnProperty;
222
- function Co(e) {
223
- if (!_e(e))
224
- return To(e);
225
- var n = ot(e), t = [];
226
- for (var r in e)
227
- r == "constructor" && (n || !So.call(e, r)) || t.push(r);
228
- return t;
229
- }
230
- function lt(e) {
231
- return _n(e) ? kn(e, !0) : Co(e);
232
- }
233
- var he = Z(Object, "create");
234
- function ko() {
235
- this.__data__ = he ? he(null) : {}, this.size = 0;
236
- }
237
- function Oo(e) {
238
- var n = this.has(e) && delete this.__data__[e];
239
- return this.size -= n ? 1 : 0, n;
240
- }
241
- var Ao = "__lodash_hash_undefined__", Bo = Object.prototype, Vo = Bo.hasOwnProperty;
242
- function Po(e) {
243
- var n = this.__data__;
244
- if (he) {
245
- var t = n[e];
246
- return t === Ao ? void 0 : t;
247
- }
248
- return Vo.call(n, e) ? n[e] : void 0;
249
- }
250
- var Do = Object.prototype, Eo = Do.hasOwnProperty;
251
- function Io(e) {
252
- var n = this.__data__;
253
- return he ? n[e] !== void 0 : Eo.call(n, e);
254
- }
255
- var Ko = "__lodash_hash_undefined__";
256
- function No(e, n) {
257
- var t = this.__data__;
258
- return this.size += this.has(e) ? 0 : 1, t[e] = he && n === void 0 ? Ko : n, this;
259
- }
260
- function Y(e) {
261
- var n = -1, t = e == null ? 0 : e.length;
262
- for (this.clear(); ++n < t; ) {
263
- var r = e[n];
264
- this.set(r[0], r[1]);
265
- }
266
- }
267
- Y.prototype.clear = ko;
268
- Y.prototype.delete = Oo;
269
- Y.prototype.get = Po;
270
- Y.prototype.has = Io;
271
- Y.prototype.set = No;
272
- function xo() {
273
- this.__data__ = [], this.size = 0;
274
- }
275
- function De(e, n) {
276
- for (var t = e.length; t--; )
277
- if (bn(e[t][0], n))
278
- return t;
279
- return -1;
280
- }
281
- var Mo = Array.prototype, Lo = Mo.splice;
282
- function Fo(e) {
283
- var n = this.__data__, t = De(n, e);
284
- if (t < 0)
285
- return !1;
286
- var r = n.length - 1;
287
- return t == r ? n.pop() : Lo.call(n, t, 1), --this.size, !0;
288
- }
289
- function zo(e) {
290
- var n = this.__data__, t = De(n, e);
291
- return t < 0 ? void 0 : n[t][1];
292
- }
293
- function Ro(e) {
294
- return De(this.__data__, e) > -1;
295
- }
296
- function Uo(e, n) {
297
- var t = this.__data__, r = De(t, e);
298
- return r < 0 ? (++this.size, t.push([e, n])) : t[r][1] = n, this;
299
- }
300
- function R(e) {
301
- var n = -1, t = e == null ? 0 : e.length;
302
- for (this.clear(); ++n < t; ) {
303
- var r = e[n];
304
- this.set(r[0], r[1]);
305
- }
306
- }
307
- R.prototype.clear = xo;
308
- R.prototype.delete = Fo;
309
- R.prototype.get = zo;
310
- R.prototype.has = Ro;
311
- R.prototype.set = Uo;
312
- var ge = Z(N, "Map");
313
- function Go() {
314
- this.size = 0, this.__data__ = {
315
- hash: new Y(),
316
- map: new (ge || R)(),
317
- string: new Y()
318
- };
319
- }
320
- function qo(e) {
321
- var n = typeof e;
322
- return n == "string" || n == "number" || n == "symbol" || n == "boolean" ? e !== "__proto__" : e === null;
323
- }
324
- function Ee(e, n) {
325
- var t = e.__data__;
326
- return qo(n) ? t[typeof n == "string" ? "string" : "hash"] : t.map;
327
- }
328
- function Ho(e) {
329
- var n = Ee(this, e).delete(e);
330
- return this.size -= n ? 1 : 0, n;
331
- }
332
- function Wo(e) {
333
- return Ee(this, e).get(e);
334
- }
335
- function Yo(e) {
336
- return Ee(this, e).has(e);
337
- }
338
- function Xo(e, n) {
339
- var t = Ee(this, e), r = t.size;
340
- return t.set(e, n), this.size += t.size == r ? 0 : 1, this;
341
- }
342
- function se(e) {
343
- var n = -1, t = e == null ? 0 : e.length;
344
- for (this.clear(); ++n < t; ) {
345
- var r = e[n];
346
- this.set(r[0], r[1]);
347
- }
348
- }
349
- se.prototype.clear = Go;
350
- se.prototype.delete = Ho;
351
- se.prototype.get = Wo;
352
- se.prototype.has = Yo;
353
- se.prototype.set = Xo;
354
- function An(e, n) {
355
- for (var t = -1, r = n.length, l = e.length; ++t < r; )
356
- e[l + t] = n[t];
357
- return e;
358
- }
359
- var Bn = On(Object.getPrototypeOf, Object);
360
- function Jo() {
361
- this.__data__ = new R(), this.size = 0;
362
- }
363
- function Zo(e) {
364
- var n = this.__data__, t = n.delete(e);
365
- return this.size = n.size, t;
366
- }
367
- function Qo(e) {
368
- return this.__data__.get(e);
369
- }
370
- function ea(e) {
371
- return this.__data__.has(e);
372
- }
373
- var ta = 200;
374
- function na(e, n) {
375
- var t = this.__data__;
376
- if (t instanceof R) {
377
- var r = t.__data__;
378
- if (!ge || r.length < ta - 1)
379
- return r.push([e, n]), this.size = ++t.size, this;
380
- t = this.__data__ = new se(r);
381
- }
382
- return t.set(e, n), this.size = t.size, this;
383
- }
384
- function le(e) {
385
- var n = this.__data__ = new R(e);
386
- this.size = n.size;
387
- }
388
- le.prototype.clear = Jo;
389
- le.prototype.delete = Zo;
390
- le.prototype.get = Qo;
391
- le.prototype.has = ea;
392
- le.prototype.set = na;
393
- function ra(e, n) {
394
- return e && Pe(n, st(n), e);
395
- }
396
- function oa(e, n) {
397
- return e && Pe(n, lt(n), e);
398
- }
399
- var Vn = typeof exports == "object" && exports && !exports.nodeType && exports, _t = Vn && typeof module == "object" && module && !module.nodeType && module, aa = _t && _t.exports === Vn, Tt = aa ? N.Buffer : void 0, jt = Tt ? Tt.allocUnsafe : void 0;
400
- function sa(e, n) {
401
- if (n)
402
- return e.slice();
403
- var t = e.length, r = jt ? jt(t) : new e.constructor(t);
404
- return e.copy(r), r;
405
- }
406
- function la(e, n) {
407
- for (var t = -1, r = e == null ? 0 : e.length, l = 0, p = []; ++t < r; ) {
408
- var c = e[t];
409
- n(c, t, e) && (p[l++] = c);
410
- }
411
- return p;
412
- }
413
- function Pn() {
414
- return [];
415
- }
416
- var ia = Object.prototype, ua = ia.propertyIsEnumerable, St = Object.getOwnPropertySymbols, it = St ? function(e) {
417
- return e == null ? [] : (e = Object(e), la(St(e), function(n) {
418
- return ua.call(e, n);
419
- }));
420
- } : Pn;
421
- function ca(e, n) {
422
- return Pe(e, it(e), n);
423
- }
424
- var da = Object.getOwnPropertySymbols, Dn = da ? function(e) {
425
- for (var n = []; e; )
426
- An(n, it(e)), e = Bn(e);
427
- return n;
428
- } : Pn;
429
- function pa(e, n) {
430
- return Pe(e, Dn(e), n);
431
- }
432
- function En(e, n, t) {
433
- var r = n(e);
434
- return rt(e) ? r : An(r, t(e));
435
- }
436
- function fa(e) {
437
- return En(e, st, it);
438
- }
439
- function va(e) {
440
- return En(e, lt, Dn);
441
- }
442
- var Ye = Z(N, "DataView"), Xe = Z(N, "Promise"), Je = Z(N, "Set"), Ct = "[object Map]", ya = "[object Object]", kt = "[object Promise]", Ot = "[object Set]", At = "[object WeakMap]", Bt = "[object DataView]", ha = J(Ye), ga = J(ge), ma = J(Xe), ba = J(Je), $a = J(We), x = $e;
443
- (Ye && x(new Ye(new ArrayBuffer(1))) != Bt || ge && x(new ge()) != Ct || Xe && x(Xe.resolve()) != kt || Je && x(new Je()) != Ot || We && x(new We()) != At) && (x = function(e) {
444
- var n = $e(e), t = n == ya ? e.constructor : void 0, r = t ? J(t) : "";
445
- if (r)
446
- switch (r) {
447
- case ha:
448
- return Bt;
449
- case ga:
450
- return Ct;
451
- case ma:
452
- return kt;
453
- case ba:
454
- return Ot;
455
- case $a:
456
- return At;
457
- }
458
- return n;
459
- });
460
- var wa = Object.prototype, _a = wa.hasOwnProperty;
461
- function Ta(e) {
462
- var n = e.length, t = new e.constructor(n);
463
- return n && typeof e[0] == "string" && _a.call(e, "index") && (t.index = e.index, t.input = e.input), t;
464
- }
465
- var Vt = N.Uint8Array;
466
- function ut(e) {
467
- var n = new e.constructor(e.byteLength);
468
- return new Vt(n).set(new Vt(e)), n;
469
- }
470
- function ja(e, n) {
471
- var t = n ? ut(e.buffer) : e.buffer;
472
- return new e.constructor(t, e.byteOffset, e.byteLength);
473
- }
474
- var Sa = /\w*$/;
475
- function Ca(e) {
476
- var n = new e.constructor(e.source, Sa.exec(e));
477
- return n.lastIndex = e.lastIndex, n;
478
- }
479
- var Pt = te ? te.prototype : void 0, Dt = Pt ? Pt.valueOf : void 0;
480
- function ka(e) {
481
- return Dt ? Object(Dt.call(e)) : {};
482
- }
483
- function Oa(e, n) {
484
- var t = n ? ut(e.buffer) : e.buffer;
485
- return new e.constructor(t, e.byteOffset, e.length);
486
- }
487
- var Aa = "[object Boolean]", Ba = "[object Date]", Va = "[object Map]", Pa = "[object Number]", Da = "[object RegExp]", Ea = "[object Set]", Ia = "[object String]", Ka = "[object Symbol]", Na = "[object ArrayBuffer]", xa = "[object DataView]", Ma = "[object Float32Array]", La = "[object Float64Array]", Fa = "[object Int8Array]", za = "[object Int16Array]", Ra = "[object Int32Array]", Ua = "[object Uint8Array]", Ga = "[object Uint8ClampedArray]", qa = "[object Uint16Array]", Ha = "[object Uint32Array]";
488
- function Wa(e, n, t) {
489
- var r = e.constructor;
490
- switch (n) {
491
- case Na:
492
- return ut(e);
493
- case Aa:
494
- case Ba:
495
- return new r(+e);
496
- case xa:
497
- return ja(e, t);
498
- case Ma:
499
- case La:
500
- case Fa:
501
- case za:
502
- case Ra:
503
- case Ua:
504
- case Ga:
505
- case qa:
506
- case Ha:
507
- return Oa(e, t);
508
- case Va:
509
- return new r();
510
- case Pa:
511
- case Ia:
512
- return new r(e);
513
- case Da:
514
- return Ca(e);
515
- case Ea:
516
- return new r();
517
- case Ka:
518
- return ka(e);
519
- }
520
- }
521
- function Ya(e) {
522
- return typeof e.constructor == "function" && !ot(e) ? Sr(Bn(e)) : {};
523
- }
524
- var Xa = "[object Map]";
525
- function Ja(e) {
526
- return we(e) && x(e) == Xa;
527
- }
528
- var Et = ne && ne.isMap, Za = Et ? at(Et) : Ja, Qa = "[object Set]";
529
- function es(e) {
530
- return we(e) && x(e) == Qa;
531
- }
532
- var It = ne && ne.isSet, ts = It ? at(It) : es, ns = 1, rs = 2, os = 4, In = "[object Arguments]", as = "[object Array]", ss = "[object Boolean]", ls = "[object Date]", is = "[object Error]", Kn = "[object Function]", us = "[object GeneratorFunction]", cs = "[object Map]", ds = "[object Number]", Nn = "[object Object]", ps = "[object RegExp]", fs = "[object Set]", vs = "[object String]", ys = "[object Symbol]", hs = "[object WeakMap]", gs = "[object ArrayBuffer]", ms = "[object DataView]", bs = "[object Float32Array]", $s = "[object Float64Array]", ws = "[object Int8Array]", _s = "[object Int16Array]", Ts = "[object Int32Array]", js = "[object Uint8Array]", Ss = "[object Uint8ClampedArray]", Cs = "[object Uint16Array]", ks = "[object Uint32Array]", _ = {};
533
- _[In] = _[as] = _[gs] = _[ms] = _[ss] = _[ls] = _[bs] = _[$s] = _[ws] = _[_s] = _[Ts] = _[cs] = _[ds] = _[Nn] = _[ps] = _[fs] = _[vs] = _[ys] = _[js] = _[Ss] = _[Cs] = _[ks] = !0;
534
- _[is] = _[Kn] = _[hs] = !1;
535
- function Oe(e, n, t, r, l, p) {
536
- var c, y = n & ns, v = n & rs, m = n & os;
537
- if (c !== void 0)
538
- return c;
539
- if (!_e(e))
540
- return e;
541
- var h = rt(e);
542
- if (h) {
543
- if (c = Ta(e), !y)
544
- return Cr(e, c);
545
- } else {
546
- var b = x(e), $ = b == Kn || b == us;
547
- if (Sn(e))
548
- return sa(e, y);
549
- if (b == Nn || b == In || $ && !l) {
550
- if (c = v || $ ? {} : Ya(e), !y)
551
- return v ? pa(e, oa(c, e)) : ca(e, ra(c, e));
552
- } else {
553
- if (!_[b])
554
- return l ? e : {};
555
- c = Wa(e, b, y);
556
- }
557
- }
558
- p || (p = new le());
559
- var O = p.get(e);
560
- if (O)
561
- return O;
562
- p.set(e, c), ts(e) ? e.forEach(function(T) {
563
- c.add(Oe(T, n, t, T, e, p));
564
- }) : Za(e) && e.forEach(function(T, i) {
565
- c.set(i, Oe(T, n, t, i, e, p));
566
- });
567
- var k = m ? v ? va : fa : v ? lt : st, A = h ? void 0 : k(e);
568
- return kr(A || e, function(T, i) {
569
- A && (i = T, T = e[i]), $n(c, i, Oe(T, n, t, i, e, p));
570
- }), c;
571
- }
572
- var Os = 1, As = 4;
573
- function Kt(e) {
574
- return Oe(e, Os | As);
575
- }
576
- const Bs = re, Vs = H, Nt = F, xt = z, Ps = X, Ds = ["show"], Es = ["title", "value-key", "columns", "loading"], Mi = /* @__PURE__ */ L({
577
- inheritAttrs: !1,
578
- __name: "index",
579
- props: {
580
- show: { type: Boolean },
581
- labelKey: { default: "fullName" },
582
- valueKey: { default: "id" },
583
- pidKey: { default: "pid" },
584
- searchable: { type: Boolean, default: !0 },
585
- title: {},
586
- loading: { type: Boolean },
587
- options: { default: () => [] },
588
- modelValue: {},
589
- required: { type: Boolean }
590
- },
591
- emits: ["close", "cancel", "confirm", "update:show", "update:modelValue"],
592
- setup(e, { emit: n }) {
593
- const t = n, r = e, l = D(""), p = C(() => {
594
- const i = Kt(r.options);
595
- for (let o = 0; o < i.length - 1; o++) {
596
- const s = i[o];
597
- for (let f = 0; f < s.length; f++) {
598
- const u = s[f];
599
- u.children = i[o + 1].filter((d) => d[r.pidKey] === u[r.valueKey]);
600
- }
601
- }
602
- return i[0];
603
- }), c = C(() => Kt(p.value).map((i) => k(i)).flat()), y = C(() => {
604
- const i = r.options[r.options.length - 1].find((o) => o[r.valueKey] === r.modelValue);
605
- return i ? T(i) : A();
606
- });
607
- function v() {
608
- r.required || t("update:modelValue", null), t("cancel", r.modelValue), m();
609
- }
610
- function m() {
611
- t("update:show", !1), t("close");
612
- }
613
- function h({ detail: i }) {
614
- const o = i.value[i.value.length - 1];
615
- t("update:modelValue", o[r.valueKey]), t("confirm", O(o)), t("update:show", !1);
616
- }
617
- function b({ detail: i }) {
618
- const { picker: o, value: s, index: f } = i;
619
- !l.value && f < r.options.length - 1 && o.setColumnValues(
620
- f + 1,
621
- r.options[f + 1].filter((u) => u[r.pidKey] === s[f][r.valueKey])
622
- );
623
- }
624
- function $({ detail: i }) {
625
- l.value = i.trim().toLowerCase(), A();
626
- }
627
- function O(i) {
628
- const o = [r.options[r.options.length - 1].find((s) => s[r.valueKey] === i[r.valueKey] && s[r.pidKey] === i[r.pidKey])];
629
- for (let s = r.options.length - 2; s >= 0; s--)
630
- o.unshift(
631
- r.options[s].find((f) => {
632
- var u;
633
- return f[r.valueKey] === ((u = o[0]) == null ? void 0 : u[r.pidKey]);
634
- })
635
- );
636
- return o;
637
- }
638
- function k(i, o = "") {
639
- var u;
640
- let s = [], f = o + i[r.labelKey];
641
- return (u = i.children) != null && u.length ? i.children.forEach((d) => {
642
- s = s.concat(k(d, f + " / "));
643
- }) : (i[r.labelKey] = f, s.push(i)), s;
644
- }
645
- function A() {
646
- var s;
647
- if (l.value)
648
- return [{
649
- values: c.value.filter((f) => f[r.labelKey].toLowerCase().includes(l.value))
650
- }];
651
- const i = [];
652
- let o = p.value;
653
- for (; o; )
654
- i.push({ values: o }), o = (s = o[0]) == null ? void 0 : s.children;
655
- return i;
656
- }
657
- function T(i) {
658
- if (l.value) {
659
- const s = c.value.filter((f) => f[r.labelKey].toLowerCase().includes(l.value));
660
- return [{
661
- values: s,
662
- defaultIndex: s.findIndex((f) => f[r.valueKey] === i[r.valueKey])
663
- }];
664
- }
665
- const o = [];
666
- for (let s = r.options.length - 1; s >= 0; s--) {
667
- const f = r.options[s].filter((u) => u[r.pidKey] === i[r.pidKey]);
668
- o[s] = {
669
- values: f,
670
- defaultIndex: f.findIndex((u) => u[r.valueKey] === i[r.valueKey])
671
- }, s > 0 && (i = r.options[s - 1].find((u) => u[r.valueKey] === i[r.pidKey]));
672
- }
673
- return o;
674
- }
675
- return (i, o) => (Nt(), xt("van-popup", {
676
- show: i.show,
677
- position: "bottom",
678
- round: !0,
679
- "close-on-click-overlay": !0,
680
- onClose: o[4] || (o[4] = (s) => m())
681
- }, [
682
- Vs("van-picker", Bs(i.$attrs, {
683
- title: i.title,
684
- "show-toolbar": !0,
685
- "value-key": i.labelKey,
686
- columns: y.value,
687
- loading: i.loading,
688
- onCancel: o[0] || (o[0] = (s) => v()),
689
- onConfirm: o[1] || (o[1] = (s) => h(s)),
690
- onChange: o[2] || (o[2] = (s) => b(s))
691
- }), null, 16, Es),
692
- i.searchable && i.options.length ? (Nt(), xt("van-search", {
693
- key: 0,
694
- shape: "round",
695
- "input-align": "center",
696
- placeholder: "请输入搜索关键词",
697
- onChange: o[3] || (o[3] = (s) => $(s))
698
- }, null, 32)) : Ps("", !0)
699
- ], 40, Ds));
700
- }
701
- });
702
- function Mt(e, n, t, r) {
703
- e.selectComponent("#" + n).setData({ [t]: r });
704
- }
705
- const Li = {
706
- mounted(e, n) {
707
- const { page: t } = He();
708
- Ae(() => {
709
- Ae(() => {
710
- Mt(t, e.id, n.arg, n.value);
711
- });
712
- });
713
- },
714
- updated(e, n) {
715
- const { page: t } = He();
716
- Mt(t, e.id, n.arg, n.value);
717
- }
718
- }, Is = {
719
- mounted(e) {
720
- const { page: n } = He();
721
- Ae(() => {
722
- Ae(() => {
723
- const t = n.selectComponent(`#${e.id}`);
724
- t.setData({
725
- formatter: (r, l) => {
726
- switch (r) {
727
- case "year":
728
- return `${l}年`;
729
- case "month":
730
- return `${l}月`;
731
- case "day":
732
- return `${l}日`;
733
- case "hour":
734
- return `${l}时`;
735
- case "minute":
736
- return `${l}分`;
737
- }
738
- },
739
- filter: (r, l) => r === "minute" ? l.filter((p) => +p % 5 === 0) : l
740
- }), t.updateValue();
741
- });
742
- });
743
- }
744
- }, Ks = (e, n) => {
745
- var t;
746
- e.setAttribute("readonly", (t = n.value) != null ? t : !0);
747
- }, Ns = oe, U = F, G = z, xs = X, I = H, Ms = re, Ls = un, Lt = Be, Fe = me, de = ae, Ft = be, Fs = Ve, zs = ["label", "value", "placeholder"], Rs = { name: "right-icon" }, Us = ["show", "title"], Gs = { class: "sun-date-range-picker-input-group" }, qs = {
748
- key: 0,
749
- class: "sun-date-range-picker-input-value"
750
- }, Hs = {
751
- key: 1,
752
- class: "sun-date-range-picker-input-placeholder"
753
- }, Ws = { class: "sun-date-range-picker-input-label" }, Ys = {
754
- key: 0,
755
- name: "down",
756
- color: "var(--color-gray)"
757
- }, Xs = {
758
- key: 0,
759
- class: "date-range-picker-input-value"
760
- }, Js = {
761
- key: 1,
762
- class: "sun-date-range-picker-input-placeholder"
763
- }, Zs = { class: "sun-date-range-picker-input-label" }, Qs = ["id", "type", "value", "min-date", "max-date"], el = { class: "sun-date-range-picker-btn-wrapper" };
764
- let tl = 1;
765
- const Fi = /* @__PURE__ */ L({
766
- __name: "index",
767
- props: {
768
- id: { default: () => `van-datetime-picker-${tl++}` },
769
- type: { default: "date" },
770
- label: {},
771
- title: {},
772
- placeholder: {},
773
- modelValue: {},
774
- required: { type: Boolean },
775
- format: {},
776
- minDate: { default: () => new Date((/* @__PURE__ */ new Date()).getFullYear() - 5, 0, 0, 0, 0, 0).getTime() },
777
- maxDate: { default: () => new Date((/* @__PURE__ */ new Date()).getFullYear() + 5, 0, 0, 0, 0, 0).getTime() }
778
- },
779
- emits: ["update:modelValue", "confirm", "clear", "close"],
780
- setup(e, { emit: n }) {
781
- var u;
782
- const t = e, r = n, l = " ~ ", p = D([...t.modelValue]), c = D((u = t.modelValue[0]) != null ? u : k()), y = D(!0), v = D(0), m = C(() => {
783
- const [d, a] = t.modelValue;
784
- return d && a ? je(d, b.value) + l + je(a, b.value) : "";
785
- }), h = C(() => t.modelValue.length && !t.required), b = C(() => {
786
- if (t.format)
787
- return t.format;
788
- switch (t.type) {
789
- case "date":
790
- return "yyyy-MM-dd";
791
- case "datetime":
792
- return "yyyy-MM-dd HH:mm";
793
- }
794
- }), $ = C(() => {
795
- if (t.title)
796
- return t.title;
797
- switch (t.type) {
798
- case "date":
799
- return "请选择日期";
800
- case "datetime":
801
- return "请选择时间";
802
- }
803
- }), O = C(() => {
804
- if (t.placeholder)
805
- return t.placeholder;
806
- switch (t.type) {
807
- case "date":
808
- return ["开始日期", "结束日期"];
809
- case "datetime":
810
- return ["开始时间", "结束时间"];
811
- }
812
- });
813
- function k() {
814
- const d = /* @__PURE__ */ new Date(), a = d.getMinutes();
815
- switch (t.type) {
816
- case "date":
817
- return d.setHours(0, 0, 0, 0);
818
- case "datetime":
819
- return d.setMinutes(a - a % 5);
820
- }
821
- }
822
- function A() {
823
- y.value = !0, o(0);
824
- }
825
- function T() {
826
- y.value = !1, r("close");
827
- }
828
- function i() {
829
- p.value = [], r("clear", t.modelValue), r("update:modelValue", []);
830
- }
831
- function o(d) {
832
- var a;
833
- v.value = d, c.value = (a = p.value)[d] || (a[d] = k());
834
- }
835
- function s(d) {
836
- p.value[v.value] = d;
837
- }
838
- function f() {
839
- const [d, a] = p.value;
840
- if (!d || !a)
841
- return o(d ? 1 : 0);
842
- r("update:modelValue", [...p.value]), r("confirm", p.value), T();
843
- }
844
- return (d, a) => {
845
- const g = Ls("readonly");
846
- return U(), G(Fs, null, [
847
- Ns(d.$slots, "default", { present: A }, () => [
848
- Lt((U(), G("van-field", Ms(d.$attrs, {
849
- label: d.label,
850
- value: m.value,
851
- placeholder: O.value.join(l),
852
- onClickInput: a[1] || (a[1] = (S) => A())
853
- }), [
854
- I("slot-view", Rs, [
855
- h.value ? (U(), G("van-icon", {
856
- key: 0,
857
- name: "clear",
858
- onTap: a[0] || (a[0] = (S) => i())
859
- }, null, 32)) : xs("", !0)
860
- ])
861
- ], 16, zs)), [
862
- [g]
863
- ])
864
- ]),
865
- I("van-action-sheet", {
866
- show: y.value,
867
- title: $.value,
868
- "close-on-click-overlay": !0,
869
- onClose: a[6] || (a[6] = (S) => T()),
870
- onCancel: a[7] || (a[7] = (S) => T())
871
- }, [
872
- I("view", Gs, [
873
- I("view", {
874
- class: Ft(["sun-date-range-picker-input", { "sun-date-range-picker-input-active": v.value === 0 }]),
875
- onTap: a[2] || (a[2] = (S) => o(0))
876
- }, [
877
- p.value[0] ? (U(), G("view", qs, de(Fe(je)(p.value[0], b.value)), 1)) : (U(), G("view", Hs, "请选择")),
878
- I("view", Ws, de(O.value[0]), 1)
879
- ], 34),
880
- (U(), G("van-icon", Ys)),
881
- I("view", {
882
- class: Ft(["sun-date-range-picker-input", { "sun-date-range-picker-input-active": v.value === 1 }]),
883
- onTap: a[3] || (a[3] = (S) => o(1))
884
- }, [
885
- p.value[1] ? (U(), G("view", Xs, de(Fe(je)(p.value[1], b.value)), 1)) : (U(), G("view", Js, "请选择")),
886
- I("view", Zs, de(O.value[1]), 1)
887
- ], 34)
888
- ]),
889
- Lt(I("van-datetime-picker", {
890
- id: d.id,
891
- type: d.type,
892
- "show-toolbar": !1,
893
- value: c.value,
894
- "min-date": d.minDate,
895
- "max-date": d.maxDate,
896
- onModify: a[4] || (a[4] = (S) => s(S.detail))
897
- }, null, 40, Qs), [
898
- [Fe(Is)]
899
- ]),
900
- I("view", el, [
901
- I("van-button", {
902
- type: "primary",
903
- round: "true",
904
- block: "true",
905
- onTap: a[5] || (a[5] = (S) => f())
906
- }, de(p.value[0] && p.value[1] ? "确定" : "继续"), 33)
907
- ])
908
- ], 40, Us)
909
- ], 64);
910
- };
911
- }
912
- }), ze = oe, zt = H, Rt = F, Ut = z, nl = X, rl = be, ol = { class: "sun-item-inner" }, al = { class: "sun-item-content-wrapper" }, sl = {
913
- key: 0,
914
- class: "sun-item-detail-icon",
915
- name: "arrow",
916
- color: "var(--arrow-color)"
917
- }, zi = /* @__PURE__ */ L({
918
- __name: "index",
919
- props: {
920
- detail: { type: Boolean },
921
- lines: { type: Boolean, default: !0 },
922
- clickable: { type: Boolean }
923
- },
924
- setup(e) {
925
- const n = e, t = C(() => ({
926
- "sun-item-lines-none": !n.lines,
927
- "sun-item-clickable": n.detail || n.clickable
928
- }));
929
- return (r, l) => (Rt(), Ut("view", {
930
- class: rl(["sun-item", t.value]),
931
- "hover-class": "hover"
932
- }, [
933
- ze(r.$slots, "start"),
934
- zt("view", ol, [
935
- zt("view", al, [
936
- ze(r.$slots, "default")
937
- ]),
938
- ze(r.$slots, "end"),
939
- r.detail ? (Rt(), Ut("van-icon", sl)) : nl("", !0)
940
- ])
941
- ], 2));
942
- }
943
- }), Re = oe, ll = ae, il = Qe, Ue = me, ul = et, Gt = F, cl = cn, Se = H, qt = dn, Ht = Be, dl = pn, pl = re, fl = z, vl = ["enable-flex", "refresher-enabled", "refresher-triggered", "refresher-background"], yl = {
944
- class: "sun-list-placeholder",
945
- style: { display: "flex", "justify-content": "center", "align-items": "center", height: "85%" }
946
- }, hl = ["image", "description"], gl = {
947
- class: "sun-list-loading-wrapper",
948
- style: { "text-align": "center", padding: "10rpx" }
949
- }, xn = /* @__PURE__ */ L({
950
- __name: "index",
951
- props: {
952
- refreshing: {
953
- type: Boolean,
954
- default: !1
955
- },
956
- flex: {
957
- type: Boolean,
958
- default: !1
959
- },
960
- loading: {
961
- type: Boolean,
962
- default: !1
963
- },
964
- loadingText: {
965
- type: String,
966
- default: "Loading"
967
- },
968
- data: {
969
- type: Array,
970
- default: []
971
- },
972
- refresher: {
973
- type: Boolean,
974
- default: !0
975
- },
976
- refresherBg: {
977
- type: String,
978
- default: "transparent"
979
- },
980
- emptyType: {
981
- type: String,
982
- default: "default"
983
- },
984
- emptyText: {
985
- type: String,
986
- default: "暂无数据"
987
- }
988
- },
989
- emits: ["refresh", "lower"],
990
- setup(e, { emit: n }) {
991
- const t = n;
992
- return (r, l) => (Gt(), fl("scroll-view", pl(r.$attrs, {
993
- class: "sun-list",
994
- enhanced: !0,
995
- "scroll-y": !0,
996
- "lower-threshold": 300,
997
- "enable-flex": e.flex,
998
- "refresher-enabled": e.refresher,
999
- "refresher-triggered": e.refreshing,
1000
- "refresher-background": e.refresherBg,
1001
- onRefresherrefresh: l[0] || (l[0] = (p) => {
1002
- Ue(fn).short("light"), t("refresh");
1003
- }),
1004
- onScrolltolower: l[1] || (l[1] = (p) => t("lower"))
1005
- }), [
1006
- Re(r.$slots, "default"),
1007
- Ht(Se("view", yl, [
1008
- e.loading ? (Gt(), cl(Ue(pt), {
1009
- key: 0,
1010
- spinning: !0
1011
- }, {
1012
- default: ul(() => [
1013
- il(ll(e.loadingText), 1)
1014
- ]),
1015
- _: 1
1016
- })) : Re(r.$slots, "empty", { key: 1 }, () => [
1017
- Se("van-empty", {
1018
- image: e.emptyType,
1019
- description: e.emptyText
1020
- }, [
1021
- Re(r.$slots, "empty-content")
1022
- ], 8, hl)
1023
- ])
1024
- ], 512), [
1025
- [qt, !e.data.length]
1026
- ]),
1027
- Ht(Se("view", gl, [
1028
- dl(Ue(pt), {
1029
- spinning: !0,
1030
- size: "small"
1031
- })
1032
- ], 512), [
1033
- [qt, e.data.length && e.loading && !e.refreshing]
1034
- ]),
1035
- l[2] || (l[2] = Se("view", { style: { position: "absolute", height: "1px", width: "1px", overflow: "hidden" } }, null, -1))
1036
- ], 16, vl));
1037
- }
1038
- }), Wt = oe, ml = ae, bl = H, Yt = F, Xt = z, $l = X, wl = ["show", "title", "close-on-click-overlay"], _l = {
1039
- key: 0,
1040
- class: "van-button-container van-button-group"
1041
- }, Tl = ["disabled"], Ri = /* @__PURE__ */ L({
1042
- __name: "index",
1043
- props: {
1044
- show: { type: Boolean },
1045
- title: {},
1046
- showButtons: { type: Boolean, default: !0 },
1047
- confirmText: { default: "确认" },
1048
- confirmDisabled: { type: Boolean }
1049
- },
1050
- emits: ["update:show", "confirm"],
1051
- setup(e, { emit: n }) {
1052
- const t = n, r = D(0), l = C(() => r.value === 0);
1053
- function p(c) {
1054
- r.value = c.height;
1055
- }
1056
- return zn(p), tt(() => {
1057
- Rn(p);
1058
- }), (c, y) => (Yt(), Xt("van-action-sheet", {
1059
- show: c.show,
1060
- title: c.title,
1061
- "close-on-click-overlay": l.value,
1062
- onClose: y[1] || (y[1] = (v) => t("update:show", !1))
1063
- }, [
1064
- Wt(c.$slots, "default"),
1065
- c.showButtons ? (Yt(), Xt("view", _l, [
1066
- Wt(c.$slots, "buttons", {}, () => [
1067
- bl("van-button", {
1068
- type: "primary",
1069
- round: "true",
1070
- block: "true",
1071
- disabled: c.confirmDisabled,
1072
- onClick: y[0] || (y[0] = (v) => t("confirm"))
1073
- }, ml(c.confirmText), 9, Tl)
1074
- ])
1075
- ])) : $l("", !0)
1076
- ], 40, wl));
1077
- }
1078
- });
1079
- function Ze() {
1080
- const e = new Yn();
1081
- return tt(() => {
1082
- e.next(), e.complete();
1083
- }), e;
1084
- }
1085
- function jl() {
1086
- const e = Ze();
1087
- return ve(e);
1088
- }
1089
- function Jt(e, n) {
1090
- const t = D(n);
1091
- return (typeof e == "function" ? e() : e).pipe(jl()).subscribe((l) => {
1092
- t.value = l;
1093
- }), t;
1094
- }
1095
- const M = {};
1096
- function Ui(e) {
1097
- Object.assign(M, e);
1098
- }
1099
- class Sl {
1100
- constructor() {
1101
- this.duration = 2e3;
1102
- }
1103
- primary(n, t = "#van-notify") {
1104
- return M.notify({ type: "primary", message: n, duration: this.duration, selector: t });
1105
- }
1106
- success(n, t = "#van-notify") {
1107
- return M.notify({ type: "success", message: n, duration: this.duration, selector: t });
1108
- }
1109
- warning(n, t = "#van-notify") {
1110
- return M.notify({ type: "warning", message: n, duration: this.duration, selector: t });
1111
- }
1112
- danger(n, t = "#van-notify") {
1113
- return M.notify({ type: "danger", message: n, duration: this.duration, selector: t });
1114
- }
1115
- dismiss() {
1116
- return M.notify.clear();
1117
- }
1118
- }
1119
- class Cl {
1120
- /**
1121
- * 展示确认对话框
1122
- * @param title
1123
- * @param message
1124
- * @param options 其他 dialog 选项
1125
- */
1126
- confirm(n, t, r) {
1127
- return M.dialog.confirm({
1128
- title: n,
1129
- message: t,
1130
- ...r
1131
- });
1132
- }
1133
- /**
1134
- * 展示警告对话框
1135
- * @param title
1136
- * @param message
1137
- * @param options 其他 dialog 选项
1138
- */
1139
- alert(n, t, r) {
1140
- return M.dialog.alert({
1141
- title: n,
1142
- message: t,
1143
- ...r
1144
- });
1145
- }
1146
- /**
1147
- * 关闭对话框
1148
- */
1149
- dismiss() {
1150
- return M.dialog.close();
1151
- }
1152
- }
1153
- const kl = new Cl(), Gi = new Sl(), K = me, w = H, q = ae, Ol = dn, Al = Be, Zt = be, Bl = Qe, pe = F, fe = z, Vl = nt, Pl = Ve, Dl = et, El = pn, Il = { class: "sun-opper-controller" }, Kl = ["show"], Nl = { key: 0 }, xl = { class: "sun-opper-controller-device" }, Ml = { class: "sun-opper-controller-device-header" }, Ll = { class: "sun-opper-controller-device-name" }, Fl = { class: "sun-opper-controller-device-infos" }, zl = { class: "sun-opper-controller-device-info" }, Rl = { class: "color-secondary" }, Ul = { class: "sun-opper-controller-device-info" }, Gl = { class: "color-secondary" }, ql = { class: "sun-opper-controller-device-info" }, Hl = { class: "color-secondary" }, Wl = { class: "sun-opper-controller-device-info" }, Yl = { class: "color-secondary" }, Xl = { class: "van-button-container" }, Jl = { key: 1 }, Zl = ["title", "label", "onTap"], Ql = { class: "van-button-container" }, ei = ["show"], qi = /* @__PURE__ */ L({
1154
- __name: "index",
1155
- props: {
1156
- show: { type: Boolean, default: !1 },
1157
- autoconnect: {},
1158
- opper: {}
1159
- },
1160
- emits: ["update:show", "connect", "disconnect"],
1161
- setup(e, { emit: n }) {
1162
- const t = e, r = n, l = t.opper, p = Ze(), c = Ze(), y = D({}), v = D(!1), m = Jt(() => l.connected), h = D(!1), b = C(() => Object.values(y.value)), $ = Jt(() => l.connected.pipe(
1163
- Xn(Boolean),
1164
- ue(() => {
1165
- const d = l.device;
1166
- return Jn({
1167
- id: Ie(d.id),
1168
- name: d.name,
1169
- version: d.firmwareRevision,
1170
- accuracy: l.accuracyChange,
1171
- volt: l.batteryChange.pipe(
1172
- Ke(([a]) => a)
1173
- ),
1174
- charging: l.batteryChange.pipe(
1175
- Ke(([, a]) => !!a)
1176
- ),
1177
- serialNumber: d.serialNumber
1178
- });
1179
- })
1180
- ), {}), O = [
1181
- { id: 1, name: "断开连接" },
1182
- { id: 2, name: "断开连接并关机", color: "var(--color-danger)" }
1183
- ];
1184
- let k = !1;
1185
- function A() {
1186
- if (!dt()) return;
1187
- let d = null;
1188
- v.value = !0, ie.openAdapter().pipe(
1189
- Ne((a) => {
1190
- var g, S;
1191
- if ((S = (g = a.errMsg) == null ? void 0 : g.includes) != null && S.call(g, "already"))
1192
- return Ie(null);
1193
- throw a;
1194
- }),
1195
- ue(
1196
- () => ie.startDevicesDiscovery({
1197
- allowDuplicatesKey: !0,
1198
- powerLevel: "high"
1199
- })
1200
- ),
1201
- ft(
1202
- () => Zn(0, 1250).pipe(
1203
- ve(c)
1204
- ).subscribe(() => fn.short())
1205
- ),
1206
- ue(() => ie.devicesChange),
1207
- Ke((a) => a.filter((g) => Hn({
1208
- id: g.deviceId,
1209
- localName: g.localName,
1210
- name: g.name
1211
- }))),
1212
- ve(c),
1213
- Ne((a) => {
1214
- var g, S, B;
1215
- throw a.errno === 103 ? E.modal("温馨提示", "请先授予小程序蓝牙与位置权限").then(() => {
1216
- Gn();
1217
- }) : (S = (g = a.errMsg) == null ? void 0 : g.includes) != null && S.call(g, "permission") ? E.tips("请先授予微信蓝牙与位置权限") : (B = a.errMsg) != null && B.includes("frequently") ? E.tips("操作频繁,请稍后再试") : E.tips(a.errMsg), T(), a;
1218
- }),
1219
- xe(() => {
1220
- v.value = !1, y.value = {}, ie.stopDevicesDiscovery().subscribe();
1221
- })
1222
- ).subscribe((a) => {
1223
- const g = t.autoconnect;
1224
- if (g) {
1225
- const B = g.slice(-5).replace(":", ""), Te = a.find(
1226
- (ct) => ct.deviceId === t.autoconnect || // 由于 iOS 的 deviceId 不是 MAC,但是蓝牙名字上有 MAC 后四位,这里通过比对 MAC 来选择设备
1227
- ct.name.endsWith(B)
1228
- );
1229
- if (Te)
1230
- return i(Te.deviceId);
1231
- }
1232
- if (a.length === 1) {
1233
- if (d != null || (d = Date.now()), Date.now() - d > 3e3)
1234
- return i(a[0].deviceId);
1235
- } else a.length > 1 && (d = null);
1236
- Object.keys(y.value).forEach((B) => {
1237
- y.value[B].recommended = !1, Date.now() - y.value[B].discoveryTime > 5e3 && delete y.value[B];
1238
- }), a.forEach((B) => {
1239
- y.value[B.deviceId] = B, B.discoveryTime = Date.now();
1240
- });
1241
- const S = [...Object.values(y.value)].sort((B, Te) => Te.RSSI - B.RSSI)[0];
1242
- S && (S.recommended = !0);
1243
- });
1244
- }
1245
- function T() {
1246
- c.next();
1247
- }
1248
- function i(d) {
1249
- k || (E.loading("正在连接"), k = !0, p.next(), l.connect(new Wn(d)).pipe(
1250
- ve(p),
1251
- xe(() => k = !1)
1252
- ).subscribe({
1253
- next: () => {
1254
- T();
1255
- },
1256
- error: (a) => {
1257
- a.errCode === 10003 ? E.tips("连接超时,请重试") : (E.tips(`连接失败,原因:${a.errCode}:${a.errMsg}`), console.error("连接失败", a));
1258
- }
1259
- }), l.device.connectedChange.pipe(
1260
- ve(p)
1261
- ).subscribe((a) => {
1262
- a ? (r("connect", d), setTimeout(u, 600)) : r("disconnect", d), a ? E.success("连接成功") : E.error("连接断开");
1263
- }));
1264
- }
1265
- function o() {
1266
- dt() && (v.value = !0, ie.openAdapter().pipe(
1267
- xe(() => {
1268
- v.value = !1;
1269
- })
1270
- ).subscribe(() => {
1271
- i(t.autoconnect);
1272
- }));
1273
- }
1274
- function s() {
1275
- l.disconnect().pipe(
1276
- Fn("正在断开")
1277
- ).subscribe();
1278
- }
1279
- function f({ detail: d }) {
1280
- switch (d.id) {
1281
- case 1:
1282
- s();
1283
- break;
1284
- case 2:
1285
- Qn(kl.confirm("温馨提示", "您确定要关闭设备电源吗?")).pipe(
1286
- ft(() => E.loading("正在关机")),
1287
- ue(() => l.shutdown()),
1288
- Ne(() => Ie(null)),
1289
- // 关机后距离信号丢失还有一段时间,这里主动断开连接,改进用户体验
1290
- ue(() => l.disconnect())
1291
- ).subscribe(() => {
1292
- E.success("设备已关机");
1293
- });
1294
- break;
1295
- }
1296
- }
1297
- function u() {
1298
- r("update:show", !1);
1299
- }
1300
- return Mn(() => t.show, async (d) => {
1301
- if (d) {
1302
- if (!m.value)
1303
- if (t.autoconnect) {
1304
- const { platform: a } = await Un();
1305
- a === "ios" ? A() : o();
1306
- } else
1307
- A();
1308
- } else
1309
- v.value && T();
1310
- }), tt(() => {
1311
- T();
1312
- }), (d, a) => (pe(), fe("view", Il, [
1313
- w("van-action-sheet", {
1314
- show: d.show,
1315
- title: "OPPER",
1316
- "close-on-click-overlay": !0,
1317
- onClose: a[2] || (a[2] = (g) => u())
1318
- }, [
1319
- K(m) ? (pe(), fe("block", Nl, [
1320
- w("view", xl, [
1321
- w("view", Ml, [
1322
- a[7] || (a[7] = w("view", { class: "sun-opper-controller-device-title" }, "设备已连接", -1)),
1323
- w("view", Ll, [
1324
- Bl(q(K($).name || "OPPER") + " ", 1),
1325
- w("view", {
1326
- class: Zt(K($).charging ? "color-success" : "color-primary")
1327
- }, [
1328
- a[6] || (a[6] = w("van-icon", {
1329
- "class-prefix": "iconfont",
1330
- name: "lightning"
1331
- }, null, -1)),
1332
- Al(w("text", null, q(K($).volt) + "%", 513), [
1333
- [Ol, K($).volt]
1334
- ])
1335
- ], 2)
1336
- ])
1337
- ]),
1338
- w("view", Fl, [
1339
- w("view", zl, [
1340
- a[8] || (a[8] = w("view", { class: "color-gray" }, "设备号", -1)),
1341
- w("view", Rl, q(K($).id), 1)
1342
- ]),
1343
- w("view", Ul, [
1344
- a[9] || (a[9] = w("view", { class: "color-gray" }, "秤台精度", -1)),
1345
- w("view", Gl, q(K($).accuracy || 1) + "克", 1)
1346
- ]),
1347
- w("view", ql, [
1348
- a[10] || (a[10] = w("view", { class: "color-gray" }, "固件版本", -1)),
1349
- w("view", Hl, q(K($).version), 1)
1350
- ]),
1351
- w("view", Wl, [
1352
- a[11] || (a[11] = w("view", { class: "color-gray" }, "序列号", -1)),
1353
- w("view", Yl, q(K($).serialNumber), 1)
1354
- ])
1355
- ])
1356
- ]),
1357
- w("view", Xl, [
1358
- w("van-button", {
1359
- type: "danger",
1360
- round: "true",
1361
- block: "true",
1362
- onTap: a[0] || (a[0] = (g) => h.value = !0)
1363
- }, " 断开连接 ", 32)
1364
- ])
1365
- ])) : (pe(), fe("block", Jl, [
1366
- El(K(xn), {
1367
- class: "sun-opper-controller-device-list",
1368
- refresher: !1,
1369
- data: b.value,
1370
- loading: v.value,
1371
- "loading-text": "正在扫描",
1372
- "empty-type": "search",
1373
- "empty-text": "暂无设备"
1374
- }, {
1375
- default: Dl(() => [
1376
- (pe(!0), fe(Pl, null, Vl(b.value, (g) => (pe(), fe("van-cell", {
1377
- key: g.deviceId,
1378
- title: g.localName || g.name,
1379
- label: g.deviceId,
1380
- size: "large",
1381
- clickable: !0,
1382
- onTap: (S) => i(g.deviceId)
1383
- }, [
1384
- w("text", {
1385
- class: Zt({ "color-success": g.recommended })
1386
- }, q(g.RSSI) + "dBm", 3)
1387
- ], 40, Zl))), 128))
1388
- ]),
1389
- _: 1
1390
- }, 8, ["data", "loading"]),
1391
- w("view", Ql, [
1392
- w("van-button", {
1393
- type: "primary",
1394
- round: "true",
1395
- block: "true",
1396
- onTap: a[1] || (a[1] = (g) => v.value ? T() : A())
1397
- }, q(v.value ? "停止扫描" : "扫描 OPPER 设备"), 33)
1398
- ])
1399
- ]))
1400
- ], 40, Kl),
1401
- w("van-action-sheet", {
1402
- show: h.value,
1403
- actions: O,
1404
- "cancel-text": "取消",
1405
- onSelect: a[3] || (a[3] = (g) => f(g)),
1406
- onCancel: a[4] || (a[4] = (g) => h.value = !1),
1407
- onClose: a[5] || (a[5] = (g) => h.value = !1)
1408
- }, null, 40, ei)
1409
- ]));
1410
- }
1411
- }), Hi = {
1412
- install(e) {
1413
- e.directive("readonly", Ks);
1414
- }
1415
- }, ti = me, ni = re, ri = H, Qt = F, en = z, oi = X, ai = ["show"], si = ["title", "value-key", "columns", "loading", "default-index"], Wi = /* @__PURE__ */ L({
1416
- inheritAttrs: !1,
1417
- __name: "index",
1418
- props: {
1419
- show: { type: Boolean },
1420
- labelKey: { default: "fullName" },
1421
- valueKey: { default: "id" },
1422
- searchable: { type: Boolean, default: !0 },
1423
- title: {},
1424
- loading: { type: Boolean },
1425
- options: {},
1426
- modelValue: {},
1427
- required: { type: Boolean }
1428
- },
1429
- emits: ["close", "cancel", "confirm", "update:show", "update:modelValue"],
1430
- setup(e, { emit: n }) {
1431
- const t = n, r = e, l = C(() => {
1432
- var h;
1433
- return (h = r.options.findIndex((b) => b[r.valueKey] === r.modelValue)) != null ? h : 0;
1434
- }), { keyword: p, filteredList: c } = vn(
1435
- () => r.options,
1436
- (h, b) => h[r.labelKey].toLowerCase().includes(b.value.toLowerCase())
1437
- );
1438
- function y() {
1439
- r.required || t("update:modelValue", null), t("cancel", r.modelValue), v();
1440
- }
1441
- function v() {
1442
- t("update:show", !1), t("close");
1443
- }
1444
- function m({ detail: h }) {
1445
- t("update:modelValue", h.value[r.valueKey]), t("confirm", h.value), t("update:show", !1);
1446
- }
1447
- return (h, b) => (Qt(), en("van-popup", {
1448
- show: h.show,
1449
- position: "bottom",
1450
- round: !0,
1451
- "close-on-click-overlay": !0,
1452
- onClose: b[3] || (b[3] = ($) => v())
1453
- }, [
1454
- ri("van-picker", ni(h.$attrs, {
1455
- title: h.title,
1456
- "show-toolbar": !0,
1457
- "value-key": h.labelKey,
1458
- columns: ti(c),
1459
- loading: h.loading,
1460
- "default-index": l.value,
1461
- onCancel: b[0] || (b[0] = ($) => y()),
1462
- onConfirm: b[1] || (b[1] = ($) => m($))
1463
- }), null, 16, si),
1464
- h.searchable && h.options.length ? (Qt(), en("van-search", {
1465
- key: 0,
1466
- shape: "round",
1467
- "input-align": "center",
1468
- placeholder: "请输入搜索关键词",
1469
- onChange: b[2] || (b[2] = ($) => p.value = $.detail)
1470
- }, null, 32)) : oi("", !0)
1471
- ], 40, ai));
1472
- }
1473
- }), Ge = oe, V = F, P = z, W = X, tn = re, li = un, nn = Be, Q = me, rn = ae, ee = H, on = be, qe = Ln, an = et, sn = cn, ii = nt, ln = Ve, ui = ["label", "value", "placeholder", "required", "disabled"], ci = ["label", "value", "placeholder", "use-right-icon-slot", "disabled"], di = ["show", "title"], pi = ["value"], fi = { key: 1 }, vi = ["onTap"], yi = {
1474
- class: "sun-selector-option-label",
1475
- name: "title"
1476
- }, hi = {
1477
- key: 0,
1478
- class: "sun-selector-option-icon",
1479
- slot: "right-icon",
1480
- name: "success"
1481
- }, gi = ["onTap"], mi = {
1482
- class: "sun-selector-option-label",
1483
- name: "title"
1484
- }, bi = {
1485
- key: 0,
1486
- class: "sun-selector-option-icon",
1487
- slot: "right-icon",
1488
- name: "success"
1489
- }, $i = {
1490
- key: 3,
1491
- class: "van-button-container"
1492
- }, Yi = /* @__PURE__ */ L({
1493
- __name: "index",
1494
- props: {
1495
- type: { default: "field" },
1496
- mode: { default: "single" },
1497
- label: {},
1498
- placeholder: { default: "请选择" },
1499
- modelValue: {},
1500
- options: {},
1501
- labelKey: { default: "fullName" },
1502
- valueKey: { default: "id" },
1503
- loading: { type: Boolean },
1504
- height: { default: "70vh" },
1505
- required: { type: Boolean },
1506
- disabled: { type: Boolean },
1507
- delimiter: { default: "," },
1508
- searchable: { type: Boolean, default: !0 },
1509
- virtual: { type: [Boolean, Object] },
1510
- refresher: { type: Boolean },
1511
- refreshing: { type: Boolean }
1512
- },
1513
- emits: ["update:modelValue", "select", "unselect", "clear", "close", "confirm", "refresh"],
1514
- setup(e, { emit: n }) {
1515
- const t = e, r = n, l = D(!1), p = D(!1), { keyword: c, filteredList: y } = vn(
1516
- () => t.options,
1517
- (o, s) => o[t.labelKey].includes(s.value)
1518
- ), v = C(() => {
1519
- var o;
1520
- if (h.value) {
1521
- const s = t.options.find((f) => f[t.valueKey] === t.modelValue);
1522
- return (s == null ? void 0 : s[t.labelKey]) || "";
1523
- }
1524
- return (o = t.modelValue) == null ? void 0 : o.map(
1525
- (s) => {
1526
- var f;
1527
- return ((f = t.options.find((u) => u[t.valueKey] === s)) == null ? void 0 : f[t.labelKey]) || "";
1528
- }
1529
- ).join(t.delimiter);
1530
- }), m = C(() => t.modelValue && !t.required), h = C(() => t.mode === "single"), b = C(() => {
1531
- var f, u;
1532
- let o, s = 44;
1533
- return typeof t.virtual != "boolean" && (f = t.virtual) != null && f.itemSize && (s = (u = t.virtual) == null ? void 0 : u.itemSize), { id: o, itemSize: s };
1534
- });
1535
- function $(o) {
1536
- var f;
1537
- const s = o[t.valueKey];
1538
- return h.value ? t.modelValue === s : ((f = t.modelValue) == null ? void 0 : f.includes(s)) || !1;
1539
- }
1540
- function O() {
1541
- t.disabled || (l.value = !0, p.value || setTimeout(() => {
1542
- p.value = !0;
1543
- }, 300));
1544
- }
1545
- function k() {
1546
- l.value = !1, r("close");
1547
- }
1548
- function A() {
1549
- const o = t.modelValue.map(
1550
- (s) => t.options.find((f) => f[t.valueKey] === s)
1551
- );
1552
- r("confirm", o), k();
1553
- }
1554
- function T(o) {
1555
- const s = o[t.valueKey];
1556
- let f = t.modelValue;
1557
- h.value ? ($(o) ? t.required || (r("unselect", o), f = null) : (r("select", o), f = s), k()) : $(o) ? (r("unselect", o), f = t.modelValue.filter((u) => u !== s)) : (r("select", o), f = (t.modelValue || []).concat(o[t.valueKey])), r("update:modelValue", f);
1558
- }
1559
- function i() {
1560
- r("clear", t.modelValue), r("update:modelValue", null);
1561
- }
1562
- return (o, s) => {
1563
- const f = li("readonly");
1564
- return V(), P(ln, null, [
1565
- Ge(o.$slots, "default", {
1566
- present: O,
1567
- label: v.value
1568
- }, () => [
1569
- o.type === "field" ? nn((V(), P("van-field", tn({ key: 0 }, o.$attrs, {
1570
- class: "sun-selector",
1571
- label: o.label,
1572
- value: v.value,
1573
- placeholder: o.placeholder,
1574
- required: o.required,
1575
- disabled: o.disabled,
1576
- onClickInput: s[1] || (s[1] = (u) => O())
1577
- }), [
1578
- m.value ? (V(), P("van-icon", {
1579
- key: 0,
1580
- slot: "right-icon",
1581
- name: "clear",
1582
- onTap: s[0] || (s[0] = (u) => i())
1583
- }, null, 32)) : W("", !0)
1584
- ], 16, ui)), [
1585
- [f]
1586
- ]) : o.type === "search" ? nn((V(), P("van-search", tn({ key: 1 }, o.$attrs, {
1587
- class: "sun-selector",
1588
- label: o.label,
1589
- value: v.value,
1590
- placeholder: o.placeholder,
1591
- "use-right-icon-slot": m.value,
1592
- shape: "round",
1593
- clearable: !1,
1594
- disabled: o.disabled,
1595
- onClickInput: s[3] || (s[3] = (u) => O())
1596
- }), [
1597
- m.value ? (V(), P("van-icon", {
1598
- key: 0,
1599
- slot: "right-icon",
1600
- name: "clear",
1601
- onTap: s[2] || (s[2] = (u) => i())
1602
- }, null, 32)) : W("", !0)
1603
- ], 16, ci)), [
1604
- [f]
1605
- ]) : W("", !0)
1606
- ]),
1607
- ee("van-action-sheet", {
1608
- show: l.value,
1609
- title: o.placeholder,
1610
- "close-on-click-overlay": !0,
1611
- onClose: s[8] || (s[8] = (u) => k()),
1612
- onCancel: s[9] || (s[9] = (u) => k())
1613
- }, [
1614
- o.searchable ? (V(), P("van-search", {
1615
- key: 0,
1616
- shape: "round",
1617
- "input-align": "center",
1618
- value: Q(c),
1619
- placeholder: "输入关键字搜索",
1620
- onChange: s[4] || (s[4] = (u) => c.value = u.detail.trim())
1621
- }, null, 40, pi)) : W("", !0),
1622
- o.virtual ? (V(), P("block", fi, [
1623
- p.value ? (V(), sn(Q(qn), {
1624
- key: 0,
1625
- class: "sun-selector-options",
1626
- refresher: o.refresher,
1627
- refreshing: o.refreshing,
1628
- items: Q(y),
1629
- "item-size": b.value.itemSize,
1630
- "item-key": o.valueKey,
1631
- style: qe({ height: o.height }),
1632
- onRefresh: s[5] || (s[5] = (u) => r("refresh"))
1633
- }, {
1634
- default: an(({ item: u, index: d }) => [
1635
- Ge(o.$slots, "option", {
1636
- option: u,
1637
- index: d,
1638
- active: $(u),
1639
- select: () => T(u)
1640
- }, () => [
1641
- ee("van-cell", {
1642
- class: on(["sun-selector-option", { "sun-selector-option-active": $(u) }]),
1643
- clickable: !0,
1644
- size: "large",
1645
- onTap: (a) => T(u)
1646
- }, [
1647
- ee("slot-view", yi, rn(u[o.labelKey]), 1),
1648
- $(u) ? (V(), P("van-icon", hi)) : W("", !0)
1649
- ], 42, vi)
1650
- ])
1651
- ]),
1652
- _: 3
1653
- }, 8, ["refresher", "refreshing", "items", "item-size", "item-key", "style"])) : (V(), P("view", {
1654
- key: 1,
1655
- style: qe({ height: o.height })
1656
- }, null, 4))
1657
- ])) : (V(), sn(Q(xn), {
1658
- key: 2,
1659
- class: "sun-selector-options",
1660
- refresher: o.refresher,
1661
- refreshing: o.refreshing,
1662
- data: Q(y),
1663
- loading: o.loading,
1664
- "empty-type": "search",
1665
- style: qe({ height: o.height }),
1666
- onRefresh: s[6] || (s[6] = (u) => r("refresh"))
1667
- }, {
1668
- default: an(() => [
1669
- (V(!0), P(ln, null, ii(Q(y), (u, d) => Ge(o.$slots, "option", {
1670
- key: u[o.valueKey],
1671
- option: u,
1672
- index: d,
1673
- active: $(u),
1674
- select: () => T(u)
1675
- }, () => [
1676
- ee("van-cell", {
1677
- class: on(["sun-selector-option", { "sun-selector-option-active": $(u) }]),
1678
- clickable: !0,
1679
- size: "large",
1680
- onTap: (a) => T(u)
1681
- }, [
1682
- ee("slot-view", mi, rn(u[o.labelKey]), 1),
1683
- $(u) ? (V(), P("van-icon", bi)) : W("", !0)
1684
- ], 42, gi)
1685
- ])), 128))
1686
- ]),
1687
- _: 3
1688
- }, 8, ["refresher", "refreshing", "data", "loading", "style"])),
1689
- h.value ? W("", !0) : (V(), P("view", $i, [
1690
- ee("van-button", {
1691
- type: "primary",
1692
- round: "true",
1693
- block: "true",
1694
- onTap: s[7] || (s[7] = (u) => A())
1695
- }, "确定", 32)
1696
- ]))
1697
- ], 40, di)
1698
- ], 64);
1699
- };
1700
- }
1701
- }), wi = nt, _i = Ve, Ce = F, ke = z, Ti = oe, ji = X, Si = ae, Ci = Qe, ki = be, Oi = re, Ai = ["scroll-left"], Bi = ["onTap"], Vi = ["name"], Xi = /* @__PURE__ */ L({
1702
- __name: "index",
1703
- props: {
1704
- tabs: {},
1705
- active: { default: 0 }
1706
- },
1707
- emits: ["update:active", "toggle"],
1708
- setup(e, { emit: n }) {
1709
- const t = n, r = e, l = C(() => r.active > 2 ? (r.active - 2) * 150 + "rpx" : 0);
1710
- function p(c) {
1711
- t("toggle", c), t("update:active", c);
1712
- }
1713
- return (c, y) => (Ce(), ke("scroll-view", Oi(c.$attrs, {
1714
- class: "sun-tabbar",
1715
- "scroll-x": !0,
1716
- "enable-flex": !0,
1717
- enhanced: !0,
1718
- "show-scrollbar": !1,
1719
- "scroll-with-animation": !0,
1720
- "scroll-left": l.value
1721
- }), [
1722
- (Ce(!0), ke(_i, null, wi(c.tabs, (v, m) => (Ce(), ke("view", {
1723
- key: m,
1724
- class: ki(["sun-tabbar-item", {
1725
- "sun-tabbar-item-active": c.active === m,
1726
- "sun-tabbar-item-icon-only": !v.text,
1727
- "sun-tabbar-item-text-only": !v.icon
1728
- }]),
1729
- onTap: (h) => p(m)
1730
- }, [
1731
- Ti(c.$slots, "default", {
1732
- tab: v,
1733
- index: m
1734
- }, () => [
1735
- v.icon ? (Ce(), ke("van-icon", {
1736
- key: 0,
1737
- name: c.active === m && v.icon[1] || v.icon[0]
1738
- }, null, 8, Vi)) : ji("", !0),
1739
- Ci(" " + Si(v.text), 1)
1740
- ])
1741
- ], 42, Bi))), 128))
1742
- ], 16, Ai));
1743
- }
1744
- });
1
+ import { SolarVant as o } from "./index2.js";
2
+ import { default as a } from "./index3.js";
3
+ import { default as l } from "./index4.js";
4
+ import { default as p } from "./index5.js";
5
+ import { default as n } from "./index6.js";
6
+ import { default as x } from "./index7.js";
7
+ import { default as S } from "./index8.js";
8
+ import { default as c } from "./index9.js";
9
+ import { default as v } from "./index10.js";
10
+ import { default as P } from "./index11.js";
11
+ import { vBindFn as D } from "./index12.js";
12
+ import { vDatetimePicker as C } from "./index13.js";
13
+ import { vReadonly as R } from "./index14.js";
14
+ import { Dialog as F, Notify as I, dialog as L, notify as M, setupOverlay as N } from "./index15.js";
1745
15
  export {
1746
- Cl as Dialog,
1747
- Sl as Notify,
1748
- Hi as SolarVant,
1749
- Mi as SunCascaderPicker,
1750
- Fi as SunDateRangePicker,
1751
- zi as SunItem,
1752
- xn as SunList,
1753
- Ri as SunModal,
1754
- qi as SunOpperController,
1755
- Wi as SunSelectPicker,
1756
- Yi as SunSelector,
1757
- Xi as SunTabbar,
1758
- kl as dialog,
1759
- Gi as notify,
1760
- Ui as setupOverlay,
1761
- Li as vBindFn,
1762
- Is as vDatetimePicker,
1763
- Ks as vReadonly
16
+ F as Dialog,
17
+ I as Notify,
18
+ o as SolarVant,
19
+ a as SunCascaderPicker,
20
+ l as SunDateRangePicker,
21
+ p as SunItem,
22
+ n as SunList,
23
+ x as SunModal,
24
+ S as SunOpperController,
25
+ c as SunSelectPicker,
26
+ v as SunSelector,
27
+ P as SunTabbar,
28
+ L as dialog,
29
+ M as notify,
30
+ N as setupOverlay,
31
+ D as vBindFn,
32
+ C as vDatetimePicker,
33
+ R as vReadonly
1764
34
  };