@aochuang/common 1.0.147 → 1.0.149

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.
@@ -9,6 +9,13 @@ import { md5 } from '../../utils/string'
9
9
  export default {
10
10
  name: 'BiStaticMap',
11
11
  props: {
12
+ type: {
13
+ type: String,
14
+ default: 'tencent',
15
+ validator (value) {
16
+ return ['tencent', 'amap'].includes(value)
17
+ }
18
+ },
12
19
  width: {
13
20
  type: String,
14
21
  default: '400'
@@ -39,6 +46,9 @@ export default {
39
46
  },
40
47
  computed: {
41
48
  mapHref () {
49
+ if (this.type === 'amap') {
50
+ return `https://uri.amap.com/marker?position=${this.amapCenter}&src=workphone&coordinate=gaode&callnative=0`
51
+ }
42
52
  return `https://apis.map.qq.com/uri/v1/geocoder?coord=${this.center}&referer=workphone`
43
53
  },
44
54
  isVisible () {
@@ -47,6 +57,9 @@ export default {
47
57
  center () {
48
58
  return `${this.lat},${this.lng}`
49
59
  },
60
+ amapCenter () {
61
+ return `${this.lng},${this.lat}`
62
+ },
50
63
  size () {
51
64
  return `${this.width}*${this.height}`
52
65
  },
@@ -60,20 +73,27 @@ export default {
60
73
  return `/ws/staticmap/v2/?center=${this.center}&key=${this.mapKey}&markers=color:blue|${this.center}&size=${this.size}&zoom=15pIwHI3PGMl0wtRP7Zvj1kqlXlQiVej7B`
61
74
  },
62
75
  mapUrl () {
76
+ if (this.type === 'amap') {
77
+ return `https://gps.rpa.cn/v3/staticmap?location=${this.amapCenter}&zoom=15&size=${this.size}&markers=mid,,A:${this.amapCenter}&key=${this.mapKey}`
78
+ }
63
79
  return `https://apis.map.qq.com/ws/staticmap/v2/?size=${this.size}&key=${this.mapKey}&center=${this.center}&markers=color:blue|${this.center}&zoom=15&sig=${this.sign}`
64
80
  }
65
81
  },
66
82
  created () {
67
83
  this.ready = false
68
84
  if (!this.mapKey) {
69
- throw new Error('缺少腾讯地图授权key配置')
85
+ throw new Error(`缺少${this.type === 'amap' ? '高德' : '腾讯'}地图授权key配置`)
70
86
  }
71
- md5(this.encryptUrl).then(rs => {
72
- this.sign = rs
73
- this.ready = true
74
- }, () => {
87
+ if (this.type === 'amap') {
75
88
  this.ready = true
76
- })
89
+ } else {
90
+ md5(this.encryptUrl).then(rs => {
91
+ this.sign = rs
92
+ this.ready = true
93
+ }, () => {
94
+ this.ready = true
95
+ })
96
+ }
77
97
  this.$emit('map-created', {
78
98
  mapHref: this.mapHref
79
99
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aochuang/common",
3
- "version": "1.0.147",
3
+ "version": "1.0.149",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
@@ -1,2 +0,0 @@
1
- export { Avatar, Button, Empty, Image, InputSearch as Searchbox, Modal as Dialog, Popover, Radio, RadioGroup, Skeleton, Spin as Loading, Tooltip, } from '@arco-design/web-vue';
2
- export { IconLoading as Icon } from '@arco-design/web-vue/es/icon';
@@ -1,6 +0,0 @@
1
- export * from './arco';
2
- export * from './utils';
3
- export { default as Resizable } from './resizable/resizable.vue';
4
- export { default as StaticMap } from './static-map/static-map.vue';
5
- export { default as Video } from './video/video.vue';
6
- export { default as VoicePlayer } from './voice-player/voice-player.vue';
@@ -1,526 +0,0 @@
1
- import { Avatar as Ue, Button as Oe, Modal as Ve, Empty as He, Image as We, Spin as Ge, Popover as Ke, Radio as Xe, RadioGroup as je, InputSearch as Ye, Skeleton as Ze, Tooltip as Je } from "@arco-design/web-vue";
2
- import { getCurrentInstance as Q, inject as ee, defineComponent as L, computed as y, openBlock as _, createElementBlock as z, normalizeStyle as F, normalizeClass as B, createElementVNode as S, ref as k, watch as H, onBeforeUnmount as J, Fragment as W, renderSlot as M, onMounted as te, resolveComponent as w, createBlock as C, resolveDynamicComponent as ne, withCtx as x, createVNode as N, createTextVNode as A, toDisplayString as q, renderList as re, createCommentVNode as oe } from "vue";
3
- const ae = /* @__PURE__ */ Symbol("ArcoConfigProvider"), ie = "arco", le = "$arco", se = (i) => {
4
- var d, n, u;
5
- const s = Q(), c = ee(ae, void 0);
6
- return `${(u = (n = c?.prefixCls) != null ? n : (d = s?.appContext.config.globalProperties[le]) == null ? void 0 : d.classPrefix) != null ? u : ie}-${i}`;
7
- }, ue = Object.prototype.toString;
8
- function ce(i) {
9
- return ue.call(i) === "[object Number]" && i === i;
10
- }
11
- var de = (i, d) => {
12
- for (const [n, u] of d)
13
- i[n] = u;
14
- return i;
15
- };
16
- const fe = L({
17
- name: "IconLoading",
18
- props: {
19
- size: {
20
- type: [Number, String]
21
- },
22
- strokeWidth: {
23
- type: Number,
24
- default: 4
25
- },
26
- strokeLinecap: {
27
- type: String,
28
- default: "butt",
29
- validator: (i) => ["butt", "round", "square"].includes(i)
30
- },
31
- strokeLinejoin: {
32
- type: String,
33
- default: "miter",
34
- validator: (i) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(i)
35
- },
36
- rotate: Number,
37
- spin: Boolean
38
- },
39
- emits: {
40
- click: (i) => !0
41
- },
42
- setup(i, { emit: d }) {
43
- const n = se("icon"), u = y(() => [n, `${n}-loading`, { [`${n}-spin`]: i.spin }]), s = y(() => {
44
- const f = {};
45
- return i.size && (f.fontSize = ce(i.size) ? `${i.size}px` : i.size), i.rotate && (f.transform = `rotate(${i.rotate}deg)`), f;
46
- });
47
- return {
48
- cls: u,
49
- innerStyle: s,
50
- onClick: (f) => {
51
- d("click", f);
52
- }
53
- };
54
- }
55
- }), pe = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
56
- function ve(i, d, n, u, s, c) {
57
- return _(), z("svg", {
58
- viewBox: "0 0 48 48",
59
- fill: "none",
60
- xmlns: "http://www.w3.org/2000/svg",
61
- stroke: "currentColor",
62
- class: B(i.cls),
63
- style: F(i.innerStyle),
64
- "stroke-width": i.strokeWidth,
65
- "stroke-linecap": i.strokeLinecap,
66
- "stroke-linejoin": i.strokeLinejoin,
67
- onClick: d[0] || (d[0] = (...f) => i.onClick && i.onClick(...f))
68
- }, d[1] || (d[1] = [
69
- S("path", { d: "M42 24c0 9.941-8.059 18-18 18S6 33.941 6 24 14.059 6 24 6" }, null, -1)
70
- ]), 14, pe);
71
- }
72
- var D = /* @__PURE__ */ de(fe, [["render", ve]]);
73
- const Te = Object.assign(D, {
74
- install: (i, d) => {
75
- var n;
76
- const u = (n = d?.iconPrefix) != null ? n : "";
77
- i.component(u + D.name, D);
78
- }
79
- });
80
- function Me() {
81
- return typeof navigator < "u" && /Android|iPhone|iPad|iPod|Mobile/i.test(navigator.userAgent);
82
- }
83
- function Ee(i) {
84
- if (i instanceof Date) return i;
85
- if (i == null || i === "") return null;
86
- const d = new Date(i);
87
- return Number.isNaN(d.getTime()) ? null : d;
88
- }
89
- function Ie(i = "") {
90
- if (typeof document > "u") return i;
91
- const d = document.createElement("textarea");
92
- return d.innerHTML = i, d.value;
93
- }
94
- function G(i) {
95
- return i ? /^(?:https?:|data:|blob:|\/)/i.test(i) ? i : `/${i.replace(/^\/+/, "")}` : "";
96
- }
97
- const me = { class: "bi-resizable__content" }, he = { class: "bi-resizable__content" }, ge = /* @__PURE__ */ L({
98
- __name: "resizable",
99
- props: {
100
- direction: { default: "horizontal" },
101
- initialSize: { default: 200 },
102
- minSize: { default: 100 },
103
- maxSize: { default: 400 }
104
- },
105
- emits: ["change"],
106
- setup(i, { emit: d }) {
107
- const n = i, u = d, s = k(n.initialSize), c = k(!1);
108
- let f = 0;
109
- const a = y(() => n.direction === "horizontal" ? { width: `${s.value}px` } : { height: `${s.value}px` });
110
- H(() => n.initialSize, (e) => s.value = e);
111
- function v(e) {
112
- const l = "touches" in e ? e.touches[0] : e;
113
- return n.direction === "horizontal" ? l?.clientX ?? 0 : l?.clientY ?? 0;
114
- }
115
- function r(e) {
116
- if (!c.value) return;
117
- const l = v(e), h = n.direction === "horizontal" ? l - f : f - l, m = s.value;
118
- s.value = Math.max(n.minSize, Math.min(m + h, n.maxSize)), f = l, m !== s.value && u("change", s.value, { size: s.value, oldSize: m, direction: n.direction });
119
- }
120
- function t() {
121
- c.value = !1, document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", t), document.removeEventListener("touchmove", r), document.removeEventListener("touchend", t), document.body.style.userSelect = "";
122
- }
123
- function o(e) {
124
- e.preventDefault(), c.value = !0, f = v(e), document.addEventListener("mousemove", r), document.addEventListener("mouseup", t), document.addEventListener("touchmove", r, { passive: !1 }), document.addEventListener("touchend", t), document.body.style.userSelect = "none";
125
- }
126
- return J(t), (e, l) => (_(), z("div", {
127
- class: B(["bi-resizable", `is-${i.direction}`])
128
- }, [
129
- i.direction === "horizontal" ? (_(), z(W, { key: 0 }, [
130
- S("div", {
131
- class: "bi-resizable__panel",
132
- style: F(a.value)
133
- }, [
134
- M(e.$slots, "panel", {}, void 0, !0)
135
- ], 4),
136
- S("div", {
137
- class: B(["bi-resizable__handle", { "is-dragging": c.value }]),
138
- onMousedown: o,
139
- onTouchstart: o
140
- }, null, 34),
141
- S("div", me, [
142
- M(e.$slots, "content", {}, void 0, !0)
143
- ])
144
- ], 64)) : (_(), z(W, { key: 1 }, [
145
- S("div", he, [
146
- M(e.$slots, "content", {}, void 0, !0)
147
- ]),
148
- S("div", {
149
- class: B(["bi-resizable__handle", { "is-dragging": c.value }]),
150
- onMousedown: o,
151
- onTouchstart: o
152
- }, null, 34),
153
- S("div", {
154
- class: "bi-resizable__panel",
155
- style: F(a.value)
156
- }, [
157
- M(e.$slots, "panel", {}, void 0, !0)
158
- ], 4)
159
- ], 64))
160
- ], 2));
161
- }
162
- }), E = (i, d) => {
163
- const n = i.__vccOpts || i;
164
- for (const [u, s] of d)
165
- n[u] = s;
166
- return n;
167
- }, Pe = /* @__PURE__ */ E(ge, [["__scopeId", "data-v-43fc5378"]]);
168
- function ye(i) {
169
- return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
170
- }
171
- var R = { exports: {} }, U = { exports: {} }, K;
172
- function _e() {
173
- return K || (K = 1, (function() {
174
- var i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", d = {
175
- // Bit-wise rotation left
176
- rotl: function(n, u) {
177
- return n << u | n >>> 32 - u;
178
- },
179
- // Bit-wise rotation right
180
- rotr: function(n, u) {
181
- return n << 32 - u | n >>> u;
182
- },
183
- // Swap big-endian to little-endian and vice versa
184
- endian: function(n) {
185
- if (n.constructor == Number)
186
- return d.rotl(n, 8) & 16711935 | d.rotl(n, 24) & 4278255360;
187
- for (var u = 0; u < n.length; u++)
188
- n[u] = d.endian(n[u]);
189
- return n;
190
- },
191
- // Generate an array of any length of random bytes
192
- randomBytes: function(n) {
193
- for (var u = []; n > 0; n--)
194
- u.push(Math.floor(Math.random() * 256));
195
- return u;
196
- },
197
- // Convert a byte array to big-endian 32-bit words
198
- bytesToWords: function(n) {
199
- for (var u = [], s = 0, c = 0; s < n.length; s++, c += 8)
200
- u[c >>> 5] |= n[s] << 24 - c % 32;
201
- return u;
202
- },
203
- // Convert big-endian 32-bit words to a byte array
204
- wordsToBytes: function(n) {
205
- for (var u = [], s = 0; s < n.length * 32; s += 8)
206
- u.push(n[s >>> 5] >>> 24 - s % 32 & 255);
207
- return u;
208
- },
209
- // Convert a byte array to a hex string
210
- bytesToHex: function(n) {
211
- for (var u = [], s = 0; s < n.length; s++)
212
- u.push((n[s] >>> 4).toString(16)), u.push((n[s] & 15).toString(16));
213
- return u.join("");
214
- },
215
- // Convert a hex string to a byte array
216
- hexToBytes: function(n) {
217
- for (var u = [], s = 0; s < n.length; s += 2)
218
- u.push(parseInt(n.substr(s, 2), 16));
219
- return u;
220
- },
221
- // Convert a byte array to a base-64 string
222
- bytesToBase64: function(n) {
223
- for (var u = [], s = 0; s < n.length; s += 3)
224
- for (var c = n[s] << 16 | n[s + 1] << 8 | n[s + 2], f = 0; f < 4; f++)
225
- s * 8 + f * 6 <= n.length * 8 ? u.push(i.charAt(c >>> 6 * (3 - f) & 63)) : u.push("=");
226
- return u.join("");
227
- },
228
- // Convert a base-64 string to a byte array
229
- base64ToBytes: function(n) {
230
- n = n.replace(/[^A-Z0-9+\/]/ig, "");
231
- for (var u = [], s = 0, c = 0; s < n.length; c = ++s % 4)
232
- c != 0 && u.push((i.indexOf(n.charAt(s - 1)) & Math.pow(2, -2 * c + 8) - 1) << c * 2 | i.indexOf(n.charAt(s)) >>> 6 - c * 2);
233
- return u;
234
- }
235
- };
236
- U.exports = d;
237
- })()), U.exports;
238
- }
239
- var O, X;
240
- function j() {
241
- if (X) return O;
242
- X = 1;
243
- var i = {
244
- // UTF-8 encoding
245
- utf8: {
246
- // Convert a string to a byte array
247
- stringToBytes: function(d) {
248
- return i.bin.stringToBytes(unescape(encodeURIComponent(d)));
249
- },
250
- // Convert a byte array to a string
251
- bytesToString: function(d) {
252
- return decodeURIComponent(escape(i.bin.bytesToString(d)));
253
- }
254
- },
255
- // Binary encoding
256
- bin: {
257
- // Convert a string to a byte array
258
- stringToBytes: function(d) {
259
- for (var n = [], u = 0; u < d.length; u++)
260
- n.push(d.charCodeAt(u) & 255);
261
- return n;
262
- },
263
- // Convert a byte array to a string
264
- bytesToString: function(d) {
265
- for (var n = [], u = 0; u < d.length; u++)
266
- n.push(String.fromCharCode(d[u]));
267
- return n.join("");
268
- }
269
- }
270
- };
271
- return O = i, O;
272
- }
273
- var V, Y;
274
- function Se() {
275
- if (Y) return V;
276
- Y = 1, V = function(n) {
277
- return n != null && (i(n) || d(n) || !!n._isBuffer);
278
- };
279
- function i(n) {
280
- return !!n.constructor && typeof n.constructor.isBuffer == "function" && n.constructor.isBuffer(n);
281
- }
282
- function d(n) {
283
- return typeof n.readFloatLE == "function" && typeof n.slice == "function" && i(n.slice(0, 0));
284
- }
285
- return V;
286
- }
287
- var Z;
288
- function $e() {
289
- return Z || (Z = 1, (function() {
290
- var i = _e(), d = j().utf8, n = Se(), u = j().bin, s = function(c, f) {
291
- c.constructor == String ? f && f.encoding === "binary" ? c = u.stringToBytes(c) : c = d.stringToBytes(c) : n(c) ? c = Array.prototype.slice.call(c, 0) : !Array.isArray(c) && c.constructor !== Uint8Array && (c = c.toString());
292
- for (var a = i.bytesToWords(c), v = c.length * 8, r = 1732584193, t = -271733879, o = -1732584194, e = 271733878, l = 0; l < a.length; l++)
293
- a[l] = (a[l] << 8 | a[l] >>> 24) & 16711935 | (a[l] << 24 | a[l] >>> 8) & 4278255360;
294
- a[v >>> 5] |= 128 << v % 32, a[(v + 64 >>> 9 << 4) + 14] = v;
295
- for (var h = s._ff, m = s._gg, g = s._hh, p = s._ii, l = 0; l < a.length; l += 16) {
296
- var $ = r, T = t, I = o, P = e;
297
- r = h(r, t, o, e, a[l + 0], 7, -680876936), e = h(e, r, t, o, a[l + 1], 12, -389564586), o = h(o, e, r, t, a[l + 2], 17, 606105819), t = h(t, o, e, r, a[l + 3], 22, -1044525330), r = h(r, t, o, e, a[l + 4], 7, -176418897), e = h(e, r, t, o, a[l + 5], 12, 1200080426), o = h(o, e, r, t, a[l + 6], 17, -1473231341), t = h(t, o, e, r, a[l + 7], 22, -45705983), r = h(r, t, o, e, a[l + 8], 7, 1770035416), e = h(e, r, t, o, a[l + 9], 12, -1958414417), o = h(o, e, r, t, a[l + 10], 17, -42063), t = h(t, o, e, r, a[l + 11], 22, -1990404162), r = h(r, t, o, e, a[l + 12], 7, 1804603682), e = h(e, r, t, o, a[l + 13], 12, -40341101), o = h(o, e, r, t, a[l + 14], 17, -1502002290), t = h(t, o, e, r, a[l + 15], 22, 1236535329), r = m(r, t, o, e, a[l + 1], 5, -165796510), e = m(e, r, t, o, a[l + 6], 9, -1069501632), o = m(o, e, r, t, a[l + 11], 14, 643717713), t = m(t, o, e, r, a[l + 0], 20, -373897302), r = m(r, t, o, e, a[l + 5], 5, -701558691), e = m(e, r, t, o, a[l + 10], 9, 38016083), o = m(o, e, r, t, a[l + 15], 14, -660478335), t = m(t, o, e, r, a[l + 4], 20, -405537848), r = m(r, t, o, e, a[l + 9], 5, 568446438), e = m(e, r, t, o, a[l + 14], 9, -1019803690), o = m(o, e, r, t, a[l + 3], 14, -187363961), t = m(t, o, e, r, a[l + 8], 20, 1163531501), r = m(r, t, o, e, a[l + 13], 5, -1444681467), e = m(e, r, t, o, a[l + 2], 9, -51403784), o = m(o, e, r, t, a[l + 7], 14, 1735328473), t = m(t, o, e, r, a[l + 12], 20, -1926607734), r = g(r, t, o, e, a[l + 5], 4, -378558), e = g(e, r, t, o, a[l + 8], 11, -2022574463), o = g(o, e, r, t, a[l + 11], 16, 1839030562), t = g(t, o, e, r, a[l + 14], 23, -35309556), r = g(r, t, o, e, a[l + 1], 4, -1530992060), e = g(e, r, t, o, a[l + 4], 11, 1272893353), o = g(o, e, r, t, a[l + 7], 16, -155497632), t = g(t, o, e, r, a[l + 10], 23, -1094730640), r = g(r, t, o, e, a[l + 13], 4, 681279174), e = g(e, r, t, o, a[l + 0], 11, -358537222), o = g(o, e, r, t, a[l + 3], 16, -722521979), t = g(t, o, e, r, a[l + 6], 23, 76029189), r = g(r, t, o, e, a[l + 9], 4, -640364487), e = g(e, r, t, o, a[l + 12], 11, -421815835), o = g(o, e, r, t, a[l + 15], 16, 530742520), t = g(t, o, e, r, a[l + 2], 23, -995338651), r = p(r, t, o, e, a[l + 0], 6, -198630844), e = p(e, r, t, o, a[l + 7], 10, 1126891415), o = p(o, e, r, t, a[l + 14], 15, -1416354905), t = p(t, o, e, r, a[l + 5], 21, -57434055), r = p(r, t, o, e, a[l + 12], 6, 1700485571), e = p(e, r, t, o, a[l + 3], 10, -1894986606), o = p(o, e, r, t, a[l + 10], 15, -1051523), t = p(t, o, e, r, a[l + 1], 21, -2054922799), r = p(r, t, o, e, a[l + 8], 6, 1873313359), e = p(e, r, t, o, a[l + 15], 10, -30611744), o = p(o, e, r, t, a[l + 6], 15, -1560198380), t = p(t, o, e, r, a[l + 13], 21, 1309151649), r = p(r, t, o, e, a[l + 4], 6, -145523070), e = p(e, r, t, o, a[l + 11], 10, -1120210379), o = p(o, e, r, t, a[l + 2], 15, 718787259), t = p(t, o, e, r, a[l + 9], 21, -343485551), r = r + $ >>> 0, t = t + T >>> 0, o = o + I >>> 0, e = e + P >>> 0;
298
- }
299
- return i.endian([r, t, o, e]);
300
- };
301
- s._ff = function(c, f, a, v, r, t, o) {
302
- var e = c + (f & a | ~f & v) + (r >>> 0) + o;
303
- return (e << t | e >>> 32 - t) + f;
304
- }, s._gg = function(c, f, a, v, r, t, o) {
305
- var e = c + (f & v | a & ~v) + (r >>> 0) + o;
306
- return (e << t | e >>> 32 - t) + f;
307
- }, s._hh = function(c, f, a, v, r, t, o) {
308
- var e = c + (f ^ a ^ v) + (r >>> 0) + o;
309
- return (e << t | e >>> 32 - t) + f;
310
- }, s._ii = function(c, f, a, v, r, t, o) {
311
- var e = c + (a ^ (f | ~v)) + (r >>> 0) + o;
312
- return (e << t | e >>> 32 - t) + f;
313
- }, s._blocksize = 16, s._digestsize = 16, R.exports = function(c, f) {
314
- if (c == null)
315
- throw new Error("Illegal argument " + c);
316
- var a = i.wordsToBytes(s(c, f));
317
- return f && f.asBytes ? a : f && f.asString ? u.bytesToString(a) : i.bytesToHex(a);
318
- };
319
- })()), R.exports;
320
- }
321
- var ke = $e();
322
- const xe = /* @__PURE__ */ ye(ke), ze = /* @__PURE__ */ L({
323
- __name: "static-map",
324
- props: {
325
- width: { default: 400 },
326
- height: { default: 300 },
327
- mapKey: {},
328
- mapSecret: {},
329
- enableLink: { type: Boolean, default: !1 },
330
- lng: {},
331
- lat: {}
332
- },
333
- emits: ["map-created"],
334
- setup(i, { emit: d }) {
335
- const n = i, u = d, s = y(() => `${n.lat},${n.lng}`), c = y(() => `${n.width}*${n.height}`), f = y(() => `https://apis.map.qq.com/uri/v1/geocoder?coord=${s.value}&referer=workphone`), a = y(() => n.mapSecret ? xe(`/ws/staticmap/v2/?center=${s.value}&key=${n.mapKey}&markers=color:blue|${s.value}&size=${c.value}&zoom=15${n.mapSecret}`) : ""), v = y(() => {
336
- const t = new URLSearchParams({ size: c.value, key: n.mapKey ?? "", center: s.value, markers: `color:blue|${s.value}`, zoom: "15" });
337
- return a.value && t.set("sig", a.value), `https://apis.map.qq.com/ws/staticmap/v2/?${t}`;
338
- }), r = y(() => ({ width: `${n.width}px`, height: `${n.height}px` }));
339
- return te(() => u("map-created", { mapHref: f.value })), (t, o) => {
340
- const e = w("a-image"), l = w("a-empty");
341
- return _(), C(ne(i.enableLink ? "a" : "div"), {
342
- href: i.enableLink ? f.value : void 0,
343
- target: "_blank",
344
- class: "bi-static-map",
345
- style: F(r.value)
346
- }, {
347
- default: x(() => [
348
- i.mapKey && i.lng !== void 0 && i.lat !== void 0 ? (_(), C(e, {
349
- key: 0,
350
- src: v.value,
351
- fit: "cover",
352
- width: "100%",
353
- height: "100%"
354
- }, null, 8, ["src"])) : (_(), C(l, {
355
- key: 1,
356
- description: "暂无位置信息"
357
- }))
358
- ]),
359
- _: 1
360
- }, 8, ["href", "style"]);
361
- };
362
- }
363
- }), Ne = /* @__PURE__ */ E(ze, [["__scopeId", "data-v-f845fad0"]]), we = ["src", "poster", "autoplay", "controls"], be = /* @__PURE__ */ L({
364
- __name: "video",
365
- props: {
366
- src: {},
367
- poster: {},
368
- autoplay: { type: Boolean },
369
- controls: { type: Boolean, default: !0 }
370
- },
371
- setup(i) {
372
- const d = k(!0);
373
- return (n, u) => {
374
- const s = w("a-spin");
375
- return _(), C(s, { loading: d.value }, {
376
- default: x(() => [
377
- S("video", {
378
- class: "ui-video",
379
- src: i.src,
380
- poster: i.poster,
381
- autoplay: i.autoplay,
382
- controls: i.controls,
383
- onLoadeddata: u[0] || (u[0] = (c) => d.value = !1)
384
- }, null, 40, we)
385
- ]),
386
- _: 1
387
- }, 8, ["loading"]);
388
- };
389
- }
390
- }), Ae = /* @__PURE__ */ E(be, [["__scopeId", "data-v-afcc8694"]]), Be = ["max", "value"], Ce = { class: "ac-voice-player__time" }, Fe = /* @__PURE__ */ L({
391
- __name: "voice-player",
392
- props: {
393
- id: {},
394
- url: {},
395
- type: { default: "default" },
396
- seconds: {},
397
- allowDownload: { type: Boolean, default: !0 },
398
- getUrlMethod: {},
399
- enableConvertToWav: { type: Boolean, default: !1 },
400
- updateWavMethod: {}
401
- },
402
- emits: ["error", "play", "pause", "ended"],
403
- setup(i, { emit: d }) {
404
- const n = i, u = d, s = new Audio(), c = k(!1), f = k(!1), a = k(0), v = k(Number(n.seconds) || 0), r = k(1), t = y(() => v.value ? a.value / v.value * 100 : 0), o = y(() => `${e(a.value)} / ${e(v.value)}`);
405
- H(r, (p) => s.playbackRate = p), H(() => n.url, (p) => {
406
- s.src = G(p);
407
- }, { immediate: !0 }), s.addEventListener("timeupdate", () => a.value = s.currentTime), s.addEventListener("durationchange", () => v.value = Number.isFinite(s.duration) ? s.duration : v.value), s.addEventListener("ended", () => {
408
- f.value = !1, u("ended");
409
- });
410
- function e(p) {
411
- const $ = Math.max(0, Math.floor(p || 0));
412
- return `${String(Math.floor($ / 60)).padStart(2, "0")}:${String($ % 60).padStart(2, "0")}`;
413
- }
414
- async function l() {
415
- if (s.src) return;
416
- if (!n.getUrlMethod) throw new Error("缺少语音资源地址");
417
- const p = await n.getUrlMethod({ id: n.id });
418
- s.src = G(p);
419
- }
420
- async function h() {
421
- try {
422
- if (f.value) {
423
- s.pause(), f.value = !1, u("pause");
424
- return;
425
- }
426
- c.value = !0, await l(), await s.play(), f.value = !0, u("play");
427
- } catch (p) {
428
- u("error", p);
429
- } finally {
430
- c.value = !1;
431
- }
432
- }
433
- function m(p) {
434
- s.currentTime = Number(p.target.value);
435
- }
436
- function g() {
437
- const p = document.createElement("a");
438
- p.href = s.src, p.download = "", p.click();
439
- }
440
- return J(() => {
441
- s.pause(), s.src = "";
442
- }), (p, $) => {
443
- const T = w("a-button"), I = w("a-option"), P = w("a-select");
444
- return _(), z("div", {
445
- class: B(["ac-voice-player", `ac-voice-player--${i.type}`])
446
- }, [
447
- N(T, {
448
- type: "text",
449
- shape: "circle",
450
- loading: c.value,
451
- "aria-label": f.value ? "暂停" : "播放",
452
- onClick: h
453
- }, {
454
- default: x(() => [
455
- A(q(f.value ? "■" : "▶"), 1)
456
- ]),
457
- _: 1
458
- }, 8, ["loading", "aria-label"]),
459
- S("input", {
460
- class: "ac-voice-player__progress",
461
- type: "range",
462
- min: "0",
463
- max: v.value,
464
- step: "0.01",
465
- value: a.value,
466
- style: F({ "--progress": `${t.value}%` }),
467
- onInput: m
468
- }, null, 44, Be),
469
- S("span", Ce, q(o.value), 1),
470
- N(P, {
471
- modelValue: r.value,
472
- "onUpdate:modelValue": $[0] || ($[0] = (b) => r.value = b),
473
- size: "mini",
474
- class: "ac-voice-player__rate"
475
- }, {
476
- default: x(() => [
477
- (_(), z(W, null, re([0.5, 1, 1.5, 2], (b) => N(I, {
478
- key: b,
479
- value: b
480
- }, {
481
- default: x(() => [
482
- A(q(b) + "x", 1)
483
- ]),
484
- _: 2
485
- }, 1032, ["value"])), 64))
486
- ]),
487
- _: 1
488
- }, 8, ["modelValue"]),
489
- i.allowDownload ? (_(), C(T, {
490
- key: 0,
491
- type: "text",
492
- size: "mini",
493
- onClick: g
494
- }, {
495
- default: x(() => [...$[1] || ($[1] = [
496
- A("下载", -1)
497
- ])]),
498
- _: 1
499
- })) : oe("", !0)
500
- ], 2);
501
- };
502
- }
503
- }), qe = /* @__PURE__ */ E(Fe, [["__scopeId", "data-v-2d333072"]]);
504
- export {
505
- Ue as Avatar,
506
- Oe as Button,
507
- Ve as Dialog,
508
- He as Empty,
509
- Te as Icon,
510
- We as Image,
511
- Ge as Loading,
512
- Ke as Popover,
513
- Xe as Radio,
514
- je as RadioGroup,
515
- Pe as Resizable,
516
- Ye as Searchbox,
517
- Ze as Skeleton,
518
- Ne as StaticMap,
519
- Je as Tooltip,
520
- Ae as Video,
521
- qe as VoicePlayer,
522
- Ie as decodeHtmlEntities,
523
- G as formatOssPath,
524
- Me as isMobile,
525
- Ee as parseDate
526
- };
@@ -1,42 +0,0 @@
1
- type __VLS_Props = {
2
- direction?: 'horizontal' | 'vertical';
3
- initialSize?: number;
4
- minSize?: number;
5
- maxSize?: number;
6
- };
7
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
8
- type __VLS_Slots = {} & {
9
- panel?: (props: typeof __VLS_1) => any;
10
- } & {
11
- content?: (props: typeof __VLS_3) => any;
12
- } & {
13
- content?: (props: typeof __VLS_5) => any;
14
- } & {
15
- panel?: (props: typeof __VLS_7) => any;
16
- };
17
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
- change: (size: number, detail: {
19
- size: number;
20
- oldSize: number;
21
- direction: string;
22
- }) => any;
23
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
24
- onChange?: ((size: number, detail: {
25
- size: number;
26
- oldSize: number;
27
- direction: string;
28
- }) => any) | undefined;
29
- }>, {
30
- direction: "horizontal" | "vertical";
31
- initialSize: number;
32
- minSize: number;
33
- maxSize: number;
34
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
36
- declare const _default: typeof __VLS_export;
37
- export default _default;
38
- type __VLS_WithSlots<T, S> = T & {
39
- new (): {
40
- $slots: S;
41
- };
42
- };
@@ -1,24 +0,0 @@
1
- type __VLS_Props = {
2
- width?: string | number;
3
- height?: string | number;
4
- mapKey?: string;
5
- mapSecret?: string;
6
- enableLink?: boolean;
7
- lng?: string | number;
8
- lat?: string | number;
9
- };
10
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
- "map-created": (payload: {
12
- mapHref: string;
13
- }) => any;
14
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
- "onMap-created"?: ((payload: {
16
- mapHref: string;
17
- }) => any) | undefined;
18
- }>, {
19
- height: string | number;
20
- width: string | number;
21
- enableLink: boolean;
22
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
- declare const _default: typeof __VLS_export;
24
- export default _default;
@@ -1 +0,0 @@
1
- .bi-resizable[data-v-43fc5378]{display:flex;width:100%;height:100%}.bi-resizable.is-horizontal[data-v-43fc5378]{flex-direction:row}.bi-resizable.is-vertical[data-v-43fc5378]{flex-direction:column}.bi-resizable__content[data-v-43fc5378]{min-width:0;min-height:0;flex:1}.bi-resizable__panel[data-v-43fc5378]{flex:none;overflow:hidden}.bi-resizable__handle[data-v-43fc5378]{flex:none;background:var(--color-border-2)}.is-horizontal>.bi-resizable__handle[data-v-43fc5378]{width:1px;cursor:col-resize}.is-vertical>.bi-resizable__handle[data-v-43fc5378]{height:1px;cursor:row-resize}.bi-resizable__handle[data-v-43fc5378]:hover,.bi-resizable__handle.is-dragging[data-v-43fc5378]{background:rgb(var(--primary-6))}.bi-static-map[data-v-f845fad0]{display:flex;align-items:center;justify-content:center;overflow:hidden;background:var(--color-fill-2)}.ui-video[data-v-afcc8694]{display:block;max-width:100%}.ac-voice-player[data-v-2d333072]{display:flex;align-items:center;gap:8px;min-width:280px}.ac-voice-player__progress[data-v-2d333072]{min-width:80px;flex:1;accent-color:rgb(var(--primary-6))}.ac-voice-player__time[data-v-2d333072]{color:var(--color-text-2);font-variant-numeric:tabular-nums;white-space:nowrap}.ac-voice-player__rate[data-v-2d333072]{width:72px}
@@ -1,5 +0,0 @@
1
- export type DateValue = string | number | Date | null | undefined;
2
- export declare function isMobile(): boolean;
3
- export declare function parseDate(value: DateValue): Date | null;
4
- export declare function decodeHtmlEntities(value?: string): string;
5
- export declare function formatOssPath(value?: string | null): string;
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- type __VLS_Props = {
2
- src?: string;
3
- poster?: string;
4
- autoplay?: boolean;
5
- controls?: boolean;
6
- };
7
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
8
- controls: boolean;
9
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
- declare const _default: typeof __VLS_export;
11
- export default _default;
@@ -1,32 +0,0 @@
1
- type __VLS_Props = {
2
- id: string | number;
3
- url?: string;
4
- type?: string;
5
- seconds?: string | number;
6
- allowDownload?: boolean;
7
- getUrlMethod?: (payload: {
8
- id: string | number;
9
- }) => Promise<string> | string;
10
- enableConvertToWav?: boolean;
11
- updateWavMethod?: (payload: {
12
- id: string | number;
13
- url: string;
14
- }) => Promise<string> | string;
15
- };
16
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
- ended: () => any;
18
- error: (error: unknown) => any;
19
- pause: () => any;
20
- play: () => any;
21
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
22
- onEnded?: (() => any) | undefined;
23
- onError?: ((error: unknown) => any) | undefined;
24
- onPause?: (() => any) | undefined;
25
- onPlay?: (() => any) | undefined;
26
- }>, {
27
- type: string;
28
- allowDownload: boolean;
29
- enableConvertToWav: boolean;
30
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
31
- declare const _default: typeof __VLS_export;
32
- export default _default;