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