@das-fed/ui 7.1.0-dev.12 → 7.1.0-dev.13

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.
@@ -1,7 +1,7 @@
1
1
  import '@das-fed/ui/packages/business-components/video-dialog/style.css';
2
- import { getCurrentScope as ue, onScopeDispose as de, getCurrentInstance as pe, onMounted as te, nextTick as x, unref as l, ref as w, watch as N, defineComponent as D, useCssVars as ve, computed as P, createElementBlock as F, openBlock as v, normalizeClass as fe, renderSlot as oe, createCommentVNode as I, Fragment as B, renderList as me, createBlock as R, withCtx as y, withModifiers as h, createVNode as f, createElementVNode as m, toDisplayString as j, toRefs as ge, mergeProps as ye } from "vue";
3
- import { withInstall as Ce } from "@das-fed/utils/with-install/index";
4
- import { t as C, setI18nRule as ke } from "@das-fed/web/packages/i18n/index";
2
+ import { getCurrentScope as ue, onScopeDispose as de, getCurrentInstance as pe, onMounted as te, nextTick as x, unref as l, ref as w, watch as S, defineComponent as U, useCssVars as ve, computed as P, createElementBlock as z, openBlock as v, normalizeClass as fe, renderSlot as oe, createCommentVNode as I, Fragment as B, renderList as me, createBlock as R, withCtx as C, withModifiers as h, createVNode as f, createElementVNode as m, toDisplayString as j, toRefs as ge, mergeProps as Ce } from "vue";
3
+ import { withInstall as ye } from "@das-fed/utils/with-install/index";
4
+ import { t as y, setI18nRule as ke } from "@das-fed/web/packages/i18n/index";
5
5
  import { DasDialog as he } from "@das-fed/ui/packages/components/dialog/index";
6
6
  import { DasTooltip as _ } from "@das-fed/ui/packages/components/tooltip/index";
7
7
  import { DasIconFullscreen2 as we } from "@das-fed/ui/packages/icons/fullscreen-2/index";
@@ -11,15 +11,15 @@ import { DasSpin as Ie } from "@das-fed/ui/packages/components/spin/index";
11
11
  import { DasHlsPlayer as Ee } from "@das-fed/ui/packages/components/hls-player/index";
12
12
  import Re from "dayjs";
13
13
  import { createService as M } from "@das-fed/utils/api-services/src/create-service";
14
- import { getProjectInfo as q, getToken as Se } from "@das-fed/utils/common-info";
14
+ import { getProjectInfo as q, getToken as Ne } from "@das-fed/utils/common-info";
15
15
  var G;
16
- const A = typeof window < "u", Ne = (t) => typeof t == "string", Fe = () => {
16
+ const A = typeof window < "u", Se = (t) => typeof t == "string", ze = () => {
17
17
  };
18
18
  A && ((G = window == null ? void 0 : window.navigator) != null && G.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
19
19
  function ne(t) {
20
20
  return typeof t == "function" ? t() : l(t);
21
21
  }
22
- function ze(t) {
22
+ function Fe(t) {
23
23
  return t;
24
24
  }
25
25
  function le(t) {
@@ -33,20 +33,20 @@ function ie(t) {
33
33
  const e = ne(t);
34
34
  return (n = e == null ? void 0 : e.$el) != null ? n : e;
35
35
  }
36
- const Oe = A ? window : void 0, De = A ? window.document : void 0;
37
- function Ue(...t) {
36
+ const Oe = A ? window : void 0, Ue = A ? window.document : void 0;
37
+ function De(...t) {
38
38
  let n, e, i, r;
39
- if (Ne(t[0]) || Array.isArray(t[0]) ? ([e, i, r] = t, n = Oe) : [n, e, i, r] = t, !n)
40
- return Fe;
39
+ if (Se(t[0]) || Array.isArray(t[0]) ? ([e, i, r] = t, n = Oe) : [n, e, i, r] = t, !n)
40
+ return ze;
41
41
  Array.isArray(e) || (e = [e]), Array.isArray(i) || (i = [i]);
42
- const o = [], s = () => {
42
+ const o = [], c = () => {
43
43
  o.forEach((a) => a()), o.length = 0;
44
- }, g = (a, p, k, b) => (a.addEventListener(p, k, b), () => a.removeEventListener(p, k, b)), u = N(() => [ie(n), ne(r)], ([a, p]) => {
45
- s(), a && o.push(...e.flatMap((k) => i.map((b) => g(a, k, b, p))));
46
- }, { immediate: !0, flush: "post" }), c = () => {
47
- u(), s();
44
+ }, g = (a, p, k, b) => (a.addEventListener(p, k, b), () => a.removeEventListener(p, k, b)), u = S(() => [ie(n), ne(r)], ([a, p]) => {
45
+ c(), a && o.push(...e.flatMap((k) => i.map((b) => g(a, k, b, p))));
46
+ }, { immediate: !0, flush: "post" }), s = () => {
47
+ u(), c();
48
48
  };
49
- return le(c), c;
49
+ return le(s), s;
50
50
  }
51
51
  function $e(t, n = !1) {
52
52
  const e = w(), i = () => e.value = !!t();
@@ -97,38 +97,38 @@ const Z = [
97
97
  ]
98
98
  ];
99
99
  function ae(t, n = {}) {
100
- const { document: e = De, autoExit: i = !1 } = n, r = t || (e == null ? void 0 : e.querySelector("html")), o = w(!1);
101
- let s = Z[0];
100
+ const { document: e = Ue, autoExit: i = !1 } = n, r = t || (e == null ? void 0 : e.querySelector("html")), o = w(!1);
101
+ let c = Z[0];
102
102
  const g = $e(() => {
103
103
  if (e) {
104
- for (const S of Z)
105
- if (S[1] in e)
106
- return s = S, !0;
104
+ for (const N of Z)
105
+ if (N[1] in e)
106
+ return c = N, !0;
107
107
  } else
108
108
  return !1;
109
109
  return !1;
110
- }), [u, c, a, , p] = s;
110
+ }), [u, s, a, , p] = c;
111
111
  async function k() {
112
- g.value && (e != null && e[a] && await e[c](), o.value = !1);
112
+ g.value && (e != null && e[a] && await e[s](), o.value = !1);
113
113
  }
114
114
  async function b() {
115
115
  if (!g.value)
116
116
  return;
117
117
  await k();
118
- const S = ie(r);
119
- S && (await S[u](), o.value = !0);
118
+ const N = ie(r);
119
+ N && (await N[u](), o.value = !0);
120
120
  }
121
- async function z() {
121
+ async function F() {
122
122
  o.value ? await k() : await b();
123
123
  }
124
- return e && Ue(e, p, () => {
124
+ return e && De(e, p, () => {
125
125
  o.value = !!(e != null && e[a]);
126
126
  }, !1), i && le(k), {
127
127
  isSupported: g,
128
128
  isFullscreen: o,
129
129
  enter: b,
130
130
  exit: k,
131
- toggle: z
131
+ toggle: F
132
132
  };
133
133
  }
134
134
  var K;
@@ -170,9 +170,9 @@ const He = {
170
170
  easeInOutBack: [0.68, -0.6, 0.32, 1.6]
171
171
  };
172
172
  Be({
173
- linear: ze
173
+ linear: Fe
174
174
  }, He);
175
- const Ve = /* @__PURE__ */ D({
175
+ const Ve = /* @__PURE__ */ U({
176
176
  __name: "GridItem",
177
177
  props: {
178
178
  active: { type: Boolean },
@@ -180,25 +180,25 @@ const Ve = /* @__PURE__ */ D({
180
180
  },
181
181
  emits: ["itemClick"],
182
182
  setup(t, { emit: n }) {
183
- ve((c) => ({
183
+ ve((s) => ({
184
184
  a769b0be: u.value
185
185
  }));
186
- const e = t, i = n, r = w(), { toggle: o } = ae(r), s = () => {
186
+ const e = t, i = n, r = w(), { toggle: o } = ae(r), c = () => {
187
187
  o();
188
188
  }, g = () => {
189
189
  i("itemClick");
190
190
  }, u = P(() => `calc(100% / ${Math.sqrt(e.gridNum)})`);
191
- return (c, a) => (v(), F(
191
+ return (s, a) => (v(), z(
192
192
  "div",
193
193
  {
194
194
  ref_key: "containerRef",
195
195
  ref: r,
196
196
  class: fe(["wrapper", { "is-active": e.active }]),
197
- onDblclick: a[0] || (a[0] = (p) => s()),
197
+ onDblclick: a[0] || (a[0] = (p) => c()),
198
198
  onClick: a[1] || (a[1] = (p) => g())
199
199
  },
200
200
  [
201
- oe(c.$slots, "default", {}, void 0, !0)
201
+ oe(s.$slots, "default", {}, void 0, !0)
202
202
  ],
203
203
  34
204
204
  /* CLASS, NEED_HYDRATION */
@@ -209,7 +209,7 @@ const Ve = /* @__PURE__ */ D({
209
209
  for (const [i, r] of n)
210
210
  e[i] = r;
211
211
  return e;
212
- }, je = /* @__PURE__ */ H(Ve, [["__scopeId", "data-v-97d987a9"]]), Me = { class: "layout-wrapper" }, Ae = /* @__PURE__ */ D({
212
+ }, je = /* @__PURE__ */ H(Ve, [["__scopeId", "data-v-97d987a9"]]), Me = { class: "layout-wrapper" }, Ae = /* @__PURE__ */ U({
213
213
  __name: "GridLayout",
214
214
  props: {
215
215
  gridNum: {},
@@ -221,17 +221,17 @@ const Ve = /* @__PURE__ */ D({
221
221
  const e = t, i = n, r = (o) => {
222
222
  i("update:activeIndex", o);
223
223
  };
224
- return (o, s) => (v(), F("div", Me, [
224
+ return (o, c) => (v(), z("div", Me, [
225
225
  I(' :active="index === activeIndex" '),
226
- (v(!0), F(
226
+ (v(!0), z(
227
227
  B,
228
228
  null,
229
229
  me(e.gridNum, (g, u) => (v(), R(je, {
230
230
  active: !1,
231
231
  "grid-num": e.gridNum,
232
- onItemClick: (c) => r(u)
232
+ onItemClick: (s) => r(u)
233
233
  }, {
234
- default: y(() => [
234
+ default: C(() => [
235
235
  o.showFn(u) ? oe(o.$slots, "default", {
236
236
  key: 0,
237
237
  index: u
@@ -245,123 +245,123 @@ const Ve = /* @__PURE__ */ D({
245
245
  ))
246
246
  ]));
247
247
  }
248
- }), Qe = /* @__PURE__ */ H(Ae, [["__scopeId", "data-v-661e2289"]]), qe = /* @__PURE__ */ D({
248
+ }), Qe = /* @__PURE__ */ H(Ae, [["__scopeId", "data-v-661e2289"]]), qe = /* @__PURE__ */ U({
249
249
  __name: "DirectionControl",
250
250
  emits: ["change"],
251
251
  setup(t, { emit: n }) {
252
252
  const e = n, i = (r) => {
253
253
  e("change", r);
254
254
  };
255
- return (r, o) => (v(), F(
255
+ return (r, o) => (v(), z(
256
256
  "div",
257
257
  {
258
258
  class: "direction-control",
259
- onDblclick: o[9] || (o[9] = h((s) => s.stopPropagation(), ["stop"]))
259
+ onDblclick: o[9] || (o[9] = h((c) => c.stopPropagation(), ["stop"]))
260
260
  },
261
261
  [
262
262
  f(l(_), {
263
- content: l(C)("左上")
263
+ content: l(y)("左上")
264
264
  }, {
265
- default: y(() => [
265
+ default: C(() => [
266
266
  m("div", {
267
267
  class: "icon icon-top-left",
268
- onClick: o[0] || (o[0] = h((s) => i("leftUp"), ["stop"]))
268
+ onClick: o[0] || (o[0] = h((c) => i("leftUp"), ["stop"]))
269
269
  })
270
270
  ]),
271
271
  _: 1
272
272
  /* STABLE */
273
273
  }, 8, ["content"]),
274
274
  f(l(_), {
275
- content: l(C)("上")
275
+ content: l(y)("上")
276
276
  }, {
277
- default: y(() => [
277
+ default: C(() => [
278
278
  m("div", {
279
279
  class: "icon icon-top",
280
- onClick: o[1] || (o[1] = h((s) => i("up"), ["stop"]))
280
+ onClick: o[1] || (o[1] = h((c) => i("up"), ["stop"]))
281
281
  })
282
282
  ]),
283
283
  _: 1
284
284
  /* STABLE */
285
285
  }, 8, ["content"]),
286
286
  f(l(_), {
287
- content: l(C)("右上")
287
+ content: l(y)("右上")
288
288
  }, {
289
- default: y(() => [
289
+ default: C(() => [
290
290
  m("div", {
291
291
  class: "icon icon-top-right",
292
- onClick: o[2] || (o[2] = h((s) => i("rightUp"), ["stop"]))
292
+ onClick: o[2] || (o[2] = h((c) => i("rightUp"), ["stop"]))
293
293
  })
294
294
  ]),
295
295
  _: 1
296
296
  /* STABLE */
297
297
  }, 8, ["content"]),
298
298
  f(l(_), {
299
- content: l(C)("左")
299
+ content: l(y)("左")
300
300
  }, {
301
- default: y(() => [
301
+ default: C(() => [
302
302
  m("div", {
303
303
  class: "icon icon-left",
304
- onClick: o[3] || (o[3] = h((s) => i("left"), ["stop"]))
304
+ onClick: o[3] || (o[3] = h((c) => i("left"), ["stop"]))
305
305
  })
306
306
  ]),
307
307
  _: 1
308
308
  /* STABLE */
309
309
  }, 8, ["content"]),
310
310
  f(l(_), {
311
- content: l(C)("自动")
311
+ content: l(y)("自动")
312
312
  }, {
313
- default: y(() => [
313
+ default: C(() => [
314
314
  m("div", {
315
315
  class: "icon icon-auto",
316
- onClick: o[4] || (o[4] = h((s) => i("auto"), ["stop"]))
316
+ onClick: o[4] || (o[4] = h((c) => i("auto"), ["stop"]))
317
317
  })
318
318
  ]),
319
319
  _: 1
320
320
  /* STABLE */
321
321
  }, 8, ["content"]),
322
322
  f(l(_), {
323
- content: l(C)("右")
323
+ content: l(y)("右")
324
324
  }, {
325
- default: y(() => [
325
+ default: C(() => [
326
326
  m("div", {
327
327
  class: "icon icon-right",
328
- onClick: o[5] || (o[5] = h((s) => i("right"), ["stop"]))
328
+ onClick: o[5] || (o[5] = h((c) => i("right"), ["stop"]))
329
329
  })
330
330
  ]),
331
331
  _: 1
332
332
  /* STABLE */
333
333
  }, 8, ["content"]),
334
334
  f(l(_), {
335
- content: l(C)("左下")
335
+ content: l(y)("左下")
336
336
  }, {
337
- default: y(() => [
337
+ default: C(() => [
338
338
  m("div", {
339
339
  class: "icon icon-bottom-left",
340
- onClick: o[6] || (o[6] = h((s) => i("leftDown"), ["stop"]))
340
+ onClick: o[6] || (o[6] = h((c) => i("leftDown"), ["stop"]))
341
341
  })
342
342
  ]),
343
343
  _: 1
344
344
  /* STABLE */
345
345
  }, 8, ["content"]),
346
346
  f(l(_), {
347
- content: l(C)("下")
347
+ content: l(y)("下")
348
348
  }, {
349
- default: y(() => [
349
+ default: C(() => [
350
350
  m("div", {
351
351
  class: "icon icon-bottom",
352
- onClick: o[7] || (o[7] = h((s) => i("down"), ["stop"]))
352
+ onClick: o[7] || (o[7] = h((c) => i("down"), ["stop"]))
353
353
  })
354
354
  ]),
355
355
  _: 1
356
356
  /* STABLE */
357
357
  }, 8, ["content"]),
358
358
  f(l(_), {
359
- content: l(C)("右下")
359
+ content: l(y)("右下")
360
360
  }, {
361
- default: y(() => [
361
+ default: C(() => [
362
362
  m("div", {
363
363
  class: "icon icon-bottom-right",
364
- onClick: o[8] || (o[8] = h((s) => i("rightDown"), ["stop"]))
364
+ onClick: o[8] || (o[8] = h((c) => i("rightDown"), ["stop"]))
365
365
  })
366
366
  ]),
367
367
  _: 1
@@ -375,7 +375,7 @@ const Ve = /* @__PURE__ */ D({
375
375
  }), Ge = /* @__PURE__ */ H(qe, [["__scopeId", "data-v-db2e8ec2"]]), We = { class: "video-wrapper" }, Ye = { class: "video-top" }, Ze = { class: "video-top_l" }, Ke = { class: "video-title-wrapper" }, Xe = { class: "video-title" }, Je = { class: "video-top_r" }, et = {
376
376
  key: 0,
377
377
  class: "play-status"
378
- }, tt = { class: "video-bottom" }, ot = { class: "video-bottom_r" }, nt = /* @__PURE__ */ D({
378
+ }, tt = { class: "video-bottom" }, ot = { class: "video-bottom_r" }, nt = /* @__PURE__ */ U({
379
379
  __name: "index",
380
380
  props: {
381
381
  videoUrl: {},
@@ -400,24 +400,24 @@ const Ve = /* @__PURE__ */ D({
400
400
  "direction-control": import("@das-fed/ui/packages/icons/direction-control"),
401
401
  screenshot: import("@das-fed/ui/packages/icons/screenshot")
402
402
  });
403
- const r = w(!0), o = w(), s = w(!1), g = w(), u = P(() => {
403
+ const r = w(!0), o = w(), c = w(!1), g = w(), u = P(() => {
404
404
  var d;
405
405
  return (d = g.value) == null ? void 0 : d.video;
406
- }), c = w(!1), a = w(!0), p = (d) => {
406
+ }), s = w(!1), a = w(!0), p = (d) => {
407
407
  o.value = d, !e.isHls && o.value.on(window.mpegts.Events.ERROR, (E) => {
408
408
  });
409
409
  }, k = () => {
410
410
  r.value = !r.value, i("handleClick", r.value ? "MUTE" : "UNMUTE"), o.value && (o.value.muted = r.value);
411
411
  }, b = () => {
412
- s.value = !s.value;
413
- }, z = w(""), S = () => {
412
+ c.value = !c.value;
413
+ }, F = w(""), N = () => {
414
414
  const d = document.createElement("canvas");
415
415
  if (i("handleClick", "SCREENSHOT"), u.value) {
416
416
  d.width = u.value.clientWidth, d.height = u.value.clientHeight;
417
417
  const E = d.getContext("2d");
418
418
  E == null || E.drawImage(u.value, 0, 0, d.width, d.height);
419
419
  const O = d.toDataURL("image/jpg"), ce = `【${e.title}】${Re().format("YYYYMMDDHHmmss").toString()}.jpg`;
420
- if (z.value = O, "download" in document.createElement("a")) {
420
+ if (F.value = O, "download" in document.createElement("a")) {
421
421
  const L = document.createElement("a");
422
422
  L.download = ce, L.style.display = "none", L.href = O, document.body.appendChild(L), document.body.appendChild(d), L.click(), URL.revokeObjectURL(L.href), document.body.removeChild(L), document.body.removeChild(d);
423
423
  }
@@ -426,29 +426,29 @@ const Ve = /* @__PURE__ */ D({
426
426
  i("directionControl", d);
427
427
  }, T = (d) => {
428
428
  i("zoomControl", d);
429
- }, U = (d) => e.authType.includes(d);
430
- return N(
429
+ }, D = (d) => e.authType.includes(d);
430
+ return S(
431
431
  () => u.value,
432
432
  () => {
433
433
  u.value && u.value.addEventListener("ended", () => {
434
- c.value = !0, e.type === "playback" && (a.value = !1);
434
+ s.value = !0, e.type === "playback" && (a.value = !1);
435
435
  });
436
436
  }
437
- ), N(
437
+ ), S(
438
438
  () => u.value,
439
439
  () => {
440
440
  u.value && x(() => {
441
441
  u.value.playbackRate = e.playbackRate || 1;
442
442
  });
443
443
  }
444
- ), N(
444
+ ), S(
445
445
  () => o.value,
446
446
  () => {
447
447
  o.value && x(() => {
448
448
  o.value.muted = r.value;
449
449
  });
450
450
  }
451
- ), N(
451
+ ), S(
452
452
  () => e.playbackRate,
453
453
  () => {
454
454
  u.value && (u.value.playbackRate = e.playbackRate || 1);
@@ -456,25 +456,25 @@ const Ve = /* @__PURE__ */ D({
456
456
  {
457
457
  immediate: !0
458
458
  }
459
- ), N(
459
+ ), S(
460
460
  () => e.paused,
461
461
  () => {
462
462
  o.value && (e.paused ? o.value.pause() : o.value.play());
463
463
  }
464
- ), N(
464
+ ), S(
465
465
  () => e.videoUrl,
466
466
  () => {
467
467
  a.value = !1, x(() => {
468
468
  a.value = !0;
469
469
  });
470
470
  }
471
- ), (d, E) => (v(), F("div", We, [
471
+ ), (d, E) => (v(), z("div", We, [
472
472
  f(l(Ie), {
473
473
  spinning: e.loading,
474
474
  type: "component",
475
- tip: l(C)("加载中...")
475
+ tip: l(y)("加载中...")
476
476
  }, {
477
- default: y(() => [
477
+ default: C(() => [
478
478
  m("div", Ye, [
479
479
  m("div", Ze, [
480
480
  m("div", Ke, [
@@ -488,17 +488,17 @@ const Ve = /* @__PURE__ */ D({
488
488
  ])
489
489
  ]),
490
490
  m("div", Je, [
491
- ["live"].includes(d.type) ? (v(), F(
491
+ ["live"].includes(d.type) ? (v(), z(
492
492
  "span",
493
493
  et,
494
- j(l(C)("正在实时预览")),
494
+ j(l(y)("正在实时预览")),
495
495
  1
496
496
  /* TEXT */
497
497
  )) : I("v-if", !0),
498
498
  I(' <das-icon v-if="isFullscreen" class="icon close-icon" icon="close" @click.stop="handleClose"></das-icon> ')
499
499
  ])
500
500
  ]),
501
- d.isHls ? (v(), F(
501
+ d.isHls ? (v(), z(
502
502
  B,
503
503
  { key: 1 },
504
504
  [
@@ -513,7 +513,7 @@ const Ve = /* @__PURE__ */ D({
513
513
  ],
514
514
  64
515
515
  /* STABLE_FRAGMENT */
516
- )) : (v(), F(
516
+ )) : (v(), z(
517
517
  B,
518
518
  { key: 0 },
519
519
  [
@@ -547,9 +547,9 @@ const Ve = /* @__PURE__ */ D({
547
547
  },
548
548
  [
549
549
  f(l(_), {
550
- content: l(C)("声音")
550
+ content: l(y)("声音")
551
551
  }, {
552
- default: y(() => [
552
+ default: C(() => [
553
553
  f(l($), {
554
554
  class: "icon icon-volume",
555
555
  icon: r.value ? "muted" : "volume",
@@ -560,23 +560,23 @@ const Ve = /* @__PURE__ */ D({
560
560
  /* STABLE */
561
561
  }, 8, ["content"]),
562
562
  f(l(_), {
563
- content: l(C)("截图")
563
+ content: l(y)("截图")
564
564
  }, {
565
- default: y(() => [
565
+ default: C(() => [
566
566
  f(l($), {
567
567
  class: "icon icon-screenshot",
568
568
  icon: "screenshot",
569
- onClick: h(S, ["stop"])
569
+ onClick: h(N, ["stop"])
570
570
  })
571
571
  ]),
572
572
  _: 1
573
573
  /* STABLE */
574
574
  }, 8, ["content"]),
575
- U("control") ? (v(), R(l(_), {
575
+ D("control") ? (v(), R(l(_), {
576
576
  key: 0,
577
- content: l(C)("聚焦-")
577
+ content: l(y)("聚焦-")
578
578
  }, {
579
- default: y(() => [
579
+ default: C(() => [
580
580
  ["live", "polling"].includes(e.type) ? (v(), R(l($), {
581
581
  key: 0,
582
582
  class: "icon icon-shrink",
@@ -587,11 +587,11 @@ const Ve = /* @__PURE__ */ D({
587
587
  _: 1
588
588
  /* STABLE */
589
589
  }, 8, ["content"])) : I("v-if", !0),
590
- U("control") ? (v(), R(l(_), {
590
+ D("control") ? (v(), R(l(_), {
591
591
  key: 1,
592
- content: l(C)("聚焦+")
592
+ content: l(y)("聚焦+")
593
593
  }, {
594
- default: y(() => [
594
+ default: C(() => [
595
595
  ["live", "polling"].includes(e.type) ? (v(), R(l($), {
596
596
  key: 0,
597
597
  class: "icon icon-enlarge",
@@ -602,11 +602,11 @@ const Ve = /* @__PURE__ */ D({
602
602
  _: 1
603
603
  /* STABLE */
604
604
  }, 8, ["content"])) : I("v-if", !0),
605
- U("control") ? (v(), R(l(_), {
605
+ D("control") ? (v(), R(l(_), {
606
606
  key: 2,
607
- content: l(C)("方向控制")
607
+ content: l(y)("方向控制")
608
608
  }, {
609
- default: y(() => [
609
+ default: C(() => [
610
610
  ["live", "polling"].includes(e.type) ? (v(), R(l($), {
611
611
  key: 0,
612
612
  class: "icon icon-direction-control",
@@ -623,7 +623,7 @@ const Ve = /* @__PURE__ */ D({
623
623
  )
624
624
  ])
625
625
  ]),
626
- s.value ? (v(), R(Ge, {
626
+ c.value ? (v(), R(Ge, {
627
627
  key: 2,
628
628
  onChange: V
629
629
  })) : I("v-if", !0)
@@ -658,11 +658,11 @@ function ct(t) {
658
658
  });
659
659
  }
660
660
  const ut = (t) => {
661
- const n = Se();
661
+ const n = Ne();
662
662
  return `${t}?token=${n}`;
663
663
  };
664
664
  w([]);
665
- const dt = /* @__PURE__ */ D({
665
+ const dt = /* @__PURE__ */ U({
666
666
  props: {
667
667
  deviceInfo: {
668
668
  type: Object,
@@ -687,21 +687,21 @@ const dt = /* @__PURE__ */ D({
687
687
  source: i,
688
688
  isHls: r,
689
689
  baseURL: o
690
- } = ge(t), s = w(!1), g = w(""), u = async () => {
690
+ } = ge(t), c = w(!1), g = w(""), u = async () => {
691
691
  var b;
692
692
  if (!((b = e.value) != null && b.deviceId)) return;
693
- s.value = !0;
693
+ c.value = !0;
694
694
  const [p, k] = await st({
695
695
  productId: e.value.productId,
696
696
  deviceId: e.value.deviceId,
697
697
  source: i.value
698
698
  });
699
699
  if (!p) {
700
- let z = r.value ? "httpHlsStreamURL" : "wsFlvStreamURL";
701
- g.value = ut(k == null ? void 0 : k[z]);
700
+ let F = r.value ? "httpHlsStreamURL" : "wsFlvStreamURL";
701
+ g.value = ut(k == null ? void 0 : k[F]);
702
702
  }
703
- s.value = !1;
704
- }, c = (p) => {
703
+ c.value = !1;
704
+ }, s = (p) => {
705
705
  ee({
706
706
  productId: e.value.productId,
707
707
  deviceId: e.value.deviceId,
@@ -720,14 +720,14 @@ const dt = /* @__PURE__ */ D({
720
720
  };
721
721
  return te(async () => {
722
722
  o.value && await ct(o.value), u();
723
- }), N(() => e.value, () => {
723
+ }), S(() => e.value, () => {
724
724
  u();
725
725
  }, {
726
726
  deep: !0
727
727
  }), () => f(B, null, [n.default({
728
728
  videoUrl: g.value,
729
- loading: s.value,
730
- onDirectionControl: c,
729
+ loading: c.value,
730
+ onDirectionControl: s,
731
731
  onZoomControl: a,
732
732
  isHls: r.value
733
733
  })]);
@@ -738,24 +738,24 @@ function pt(t) {
738
738
  toggle: i,
739
739
  isFullscreen: r,
740
740
  exit: o
741
- } = ae(e), s = (c, a) => {
741
+ } = ae(e), c = (s, a) => {
742
742
  r.value && o();
743
- }, g = (c) => {
743
+ }, g = (s) => {
744
744
  var a;
745
- (a = t == null ? void 0 : t.handleClick) == null || a.call(t, c);
745
+ (a = t == null ? void 0 : t.handleClick) == null || a.call(t, s);
746
746
  };
747
747
  return {
748
748
  render: () => f(Qe, {
749
749
  ref: e,
750
750
  gridNum: t.gridNum,
751
751
  activeIndex: n.value,
752
- "onUpdate:activeIndex": (c) => n.value = c,
753
- showFn: (c) => !!t.deviceList[c]
752
+ "onUpdate:activeIndex": (s) => n.value = s,
753
+ showFn: (s) => !!t.deviceList[s]
754
754
  }, {
755
755
  default: ({
756
- index: c
756
+ index: s
757
757
  }) => {
758
- const a = t.deviceList[c], p = t.source, k = t.isHls, b = t.baseURL;
758
+ const a = t.deviceList[s], p = t.source, k = t.isHls, b = t.baseURL;
759
759
  return f(dt, {
760
760
  deviceInfo: a,
761
761
  baseURL: b,
@@ -763,23 +763,23 @@ function pt(t) {
763
763
  isHls: k
764
764
  }, {
765
765
  default: ({
766
- videoUrl: z,
767
- onDirectionControl: S,
766
+ videoUrl: F,
767
+ onDirectionControl: N,
768
768
  onZoomControl: V,
769
769
  loading: T,
770
- isHls: U
770
+ isHls: D
771
771
  }) => f(lt, {
772
772
  type: "live",
773
773
  loading: T,
774
774
  isFullscreen: r.value,
775
- videoUrl: z,
775
+ videoUrl: F,
776
776
  title: a.deviceName,
777
- onClose: () => s(),
778
- onDirectionControl: S,
777
+ onClose: () => c(),
778
+ onDirectionControl: N,
779
779
  onZoomControl: V,
780
780
  onHandleClick: g,
781
781
  authType: a.authType === 2 ? ["control"] : [],
782
- isHls: U
782
+ isHls: D
783
783
  }, null)
784
784
  });
785
785
  }
@@ -787,7 +787,7 @@ function pt(t) {
787
787
  toggleFullscreen: i
788
788
  };
789
789
  }
790
- const vt = /* @__PURE__ */ D({
790
+ const vt = /* @__PURE__ */ U({
791
791
  __name: "index",
792
792
  props: {
793
793
  visible: { type: Boolean, default: !1 },
@@ -795,32 +795,33 @@ const vt = /* @__PURE__ */ D({
795
795
  gridNum: { default: 4 },
796
796
  source: {},
797
797
  isHls: { type: Boolean, default: !1 },
798
- resizable: { type: Boolean },
798
+ draggable: { type: Boolean, default: !0 },
799
+ resizable: { type: Boolean, default: !0 },
799
800
  dialogTitle: { default: "" },
800
801
  baseURL: { default: "/api/device-relation/deviceproject/v1/project/device/video" },
801
802
  handleClick: {}
802
803
  },
803
804
  emits: ["update:visible"],
804
805
  setup(t, { emit: n }) {
805
- const e = t, i = P(() => e.dialogTitle || C("视频监控")), r = n, o = P({
806
+ const e = t, i = P(() => e.dialogTitle || y("视频监控")), r = n, o = P({
806
807
  get: () => e.visible,
807
- set: (c) => r("update:visible", c)
808
- }), { render: s, toggleFullscreen: g } = pt(e), u = P(() => {
809
- let c = {};
808
+ set: (s) => r("update:visible", s)
809
+ }), { render: c, toggleFullscreen: g } = pt(e), u = P(() => {
810
+ let s = {};
810
811
  switch (e.gridNum) {
811
812
  case 1:
812
- c = { width: "933px", height: "595px" };
813
+ s = { width: "933px", height: "595px" };
813
814
  break;
814
815
  case 4:
815
- c = { width: "933px", height: "595px" };
816
+ s = { width: "933px", height: "595px" };
816
817
  break;
817
818
  case 9:
818
- c = { width: "1370px", height: "840px" };
819
+ s = { width: "1370px", height: "840px" };
819
820
  break;
820
821
  }
821
- return c;
822
+ return s;
822
823
  });
823
- return (c, a) => (v(), R(l(he), ye({
824
+ return (s, a) => (v(), R(l(he), Ce({
824
825
  size: "mini",
825
826
  title: i.value,
826
827
  "custom-class": "das-linakge-video-dialog",
@@ -831,10 +832,12 @@ const vt = /* @__PURE__ */ D({
831
832
  "close-on-press-escape": !1,
832
833
  modal: !1,
833
834
  "header-style": { display: "flex", justifyContent: "space-between", alignItems: "center" },
834
- resizable: c.resizable,
835
- dialogStyle: u.value
836
- }, c.$attrs), {
837
- header: y(() => [
835
+ draggable: s.draggable,
836
+ resizable: s.resizable,
837
+ width: u.value.width,
838
+ height: u.value.height
839
+ }, s.$attrs), {
840
+ header: C(() => [
838
841
  m("div", null, [
839
842
  m(
840
843
  "span",
@@ -845,9 +848,9 @@ const vt = /* @__PURE__ */ D({
845
848
  )
846
849
  ]),
847
850
  f(l(_), {
848
- content: l(C)("页面全屏")
851
+ content: l(y)("页面全屏")
849
852
  }, {
850
- default: y(() => [
853
+ default: C(() => [
851
854
  f(l(we), {
852
855
  class: "icon",
853
856
  color: "#999",
@@ -858,12 +861,12 @@ const vt = /* @__PURE__ */ D({
858
861
  /* STABLE */
859
862
  }, 8, ["content"])
860
863
  ]),
861
- default: y(() => [
862
- o.value ? (v(), R(l(s), { key: 0 })) : I("v-if", !0)
864
+ default: C(() => [
865
+ o.value ? (v(), R(l(c), { key: 0 })) : I("v-if", !0)
863
866
  ]),
864
867
  _: 1
865
868
  /* STABLE */
866
- }, 16, ["title", "modelValue", "resizable", "dialogStyle"]));
869
+ }, 16, ["title", "modelValue", "draggable", "resizable", "width", "height"]));
867
870
  }
868
871
  }), ft = {
869
872
  加载中: { "zh-CN": "加载中", en: "Loading", _appCode: "framework" },
@@ -888,9 +891,9 @@ const vt = /* @__PURE__ */ D({
888
891
  "聚焦+": { "zh-CN": "聚焦+", en: "Focus+", _appCode: "framework" }
889
892
  };
890
893
  ke(ft);
891
- const Nt = Ce(vt), Ft = () => w(null);
894
+ const St = ye(vt), zt = () => w(null);
892
895
  export {
893
- Nt as DasVideoDialog,
894
- Ft as DasVideoDialogRef,
896
+ St as DasVideoDialog,
897
+ zt as DasVideoDialogRef,
895
898
  pt as useVideo
896
899
  };