@wfrog/vc-ui 1.1.0 → 1.2.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 (132) hide show
  1. package/README.md +3 -3
  2. package/dist/es/chunk/{OEa4tYPF.mjs → -ga82G_B.mjs} +1 -1
  3. package/dist/es/chunk/B1BnPYNG.mjs +163 -0
  4. package/dist/es/chunk/{DFOLES4O.mjs → BA2yoAwy.mjs} +403 -502
  5. package/dist/es/chunk/{BpqBBo4z.mjs → BDyXj_90.mjs} +2 -2
  6. package/dist/es/chunk/{BI0vrXwX.mjs → BI-fNJhk.mjs} +6 -3
  7. package/dist/es/chunk/{BsGCX4td.mjs → BK4T_2ha.mjs} +1 -1
  8. package/dist/es/chunk/{73YgKz3H.mjs → BLLKi_0v.mjs} +1 -1
  9. package/dist/es/chunk/{DTLPXrjb.mjs → BTsEMnf_.mjs} +1 -1
  10. package/dist/es/chunk/{B5UQmWXg.mjs → BUf50Y7Y.mjs} +41 -21
  11. package/dist/es/chunk/{BzedaLtg.mjs → BYVaz5Or.mjs} +2 -2
  12. package/dist/es/chunk/BaJ7k5Lg.mjs +209 -0
  13. package/dist/es/chunk/{Bp9jXKX0.mjs → BambM7zX.mjs} +2 -2
  14. package/dist/es/chunk/{CizMbf5K.mjs → Bl0WQiki.mjs} +1 -1
  15. package/dist/es/chunk/{CLbj8G-F.mjs → Bnot0Gwc.mjs} +12 -4
  16. package/dist/es/chunk/{4eyJqDa9.mjs → BoGGHTrJ.mjs} +4 -2
  17. package/dist/es/chunk/C7Dgjpd1.mjs +242 -0
  18. package/dist/es/chunk/{D0LB3gF-.mjs → CKbkzlkO.mjs} +104 -72
  19. package/dist/es/chunk/{DrgvuOYH.mjs → CL5WTCB3.mjs} +4 -2
  20. package/dist/es/chunk/{XwSiBVsA.mjs → CM_I1FoA.mjs} +2 -2
  21. package/dist/es/chunk/{DouIsSPi.mjs → CNILa-hz.mjs} +1 -1
  22. package/dist/es/chunk/{DRoyW749.mjs → CcKUdl3e.mjs} +12 -6
  23. package/dist/es/chunk/CidLkmft.mjs +188 -0
  24. package/dist/es/chunk/{HAog8AWU.mjs → CitH0taR.mjs} +816 -539
  25. package/dist/es/chunk/{Cu6erWl4.mjs → CzqeSQn4.mjs} +73 -38
  26. package/dist/es/chunk/{CLCfXfvv.mjs → D7JQbDFE.mjs} +154 -118
  27. package/dist/es/chunk/{DaCDeO95.mjs → D9iEroQw.mjs} +1 -207
  28. package/dist/es/chunk/{cPBw23yt.mjs → DEPZhJ0Z.mjs} +21 -16
  29. package/dist/es/chunk/{CPERtDRX.mjs → DHpbQMGk.mjs} +32 -22
  30. package/dist/es/chunk/{BHsNc7jl.mjs → DKpRXDRE.mjs} +82 -55
  31. package/dist/es/chunk/{CLMc8GzD.mjs → DMYHOxhk.mjs} +462 -311
  32. package/dist/es/chunk/{CBSopeeE.mjs → DQHGjqG5.mjs} +9 -4
  33. package/dist/es/chunk/DTEM_vYZ.mjs +23 -0
  34. package/dist/es/chunk/{NQBKROII.mjs → DWcIzeMM.mjs} +1 -1
  35. package/dist/es/chunk/{FHvLvzEB.mjs → DX38FfmL.mjs} +1088 -697
  36. package/dist/es/chunk/{DZD-YnCt.mjs → Dcm-lOj8.mjs} +4 -4
  37. package/dist/es/chunk/{09Ec85_u.mjs → DdmNdV7I.mjs} +398 -278
  38. package/dist/es/chunk/{f0-vIQGp.mjs → DfHTA5LW.mjs} +3 -3
  39. package/dist/es/chunk/DgFT6snA.mjs +835 -0
  40. package/dist/es/chunk/{DwKWIlzw.mjs → DgSzI6Fw.mjs} +106 -71
  41. package/dist/es/chunk/{BcTuAX8r.mjs → Dsye5ZEp.mjs} +5 -3
  42. package/dist/es/chunk/{BsLJxiSC.mjs → Dw-yyl2m.mjs} +1 -1
  43. package/dist/es/chunk/{DXPWe_a5.mjs → U13Qpiki.mjs} +19 -13
  44. package/dist/es/chunk/{axpwSky6.mjs → _8u_XVHh.mjs} +168 -120
  45. package/dist/es/chunk/egk9EEzo.mjs +66 -0
  46. package/dist/es/chunk/{BUEEWLrd.mjs → ezK_XQQd.mjs} +15 -6
  47. package/dist/es/chunk/{Bl2KlMdP.mjs → oW98L-44.mjs} +8 -3
  48. package/dist/es/chunk/{Dk6Bx0KT.mjs → plK2vnjp.mjs} +8 -5
  49. package/dist/es/components/awesome-icon/awesome-icon.mjs +2 -1
  50. package/dist/es/components/backbottom/backbottom.mjs +2 -2
  51. package/dist/es/components/button/button.mjs +105 -76
  52. package/dist/es/components/choice/choice.mjs +2 -2
  53. package/dist/es/components/config-provider/config-provider.d.ts +1 -0
  54. package/dist/es/components/config-provider/config-provider.mjs +13 -5
  55. package/dist/es/components/cropper/cropper.mjs +44 -33
  56. package/dist/es/components/currency/currency.mjs +5 -5
  57. package/dist/es/components/daterange-picker/daterange-picker.mjs +2267 -1522
  58. package/dist/es/components/dialog/dialog.mjs +213 -172
  59. package/dist/es/components/dialog/index.css +1 -1
  60. package/dist/es/components/dialog-camera-upload/dialog-camera-upload.mjs +11 -11
  61. package/dist/es/components/dialog-map-point/dialog-map-point.mjs +5 -4
  62. package/dist/es/components/dialog-upload-images/dialog-upload-images.mjs +495 -314
  63. package/dist/es/components/dialog-upload-images/index.css +1 -1
  64. package/dist/es/components/drag-verify/drag-verify.mjs +3 -3
  65. package/dist/es/components/drawer/drawer.mjs +136 -94
  66. package/dist/es/components/drawer/index.css +1 -1
  67. package/dist/es/components/easy-pagination/easy-pagination.mjs +2 -2
  68. package/dist/es/components/el-icon/el-icon.mjs +1 -1
  69. package/dist/es/components/el-icon/index.css +3 -2
  70. package/dist/es/components/flag/flag.mjs +2 -1
  71. package/dist/es/components/icon/icon.mjs +10 -31
  72. package/dist/es/components/icon/icon.vue.d.ts +1 -1
  73. package/dist/es/components/icon/icon2.mjs +1 -1
  74. package/dist/es/components/icon/index.mjs +2 -2
  75. package/dist/es/components/icon-picker/components/collections.vue.d.ts +625 -0
  76. package/dist/es/components/icon-picker/components/panel.vue.d.ts +9 -0
  77. package/dist/es/components/icon-picker/icon-picker.d.ts +40 -0
  78. package/dist/es/components/icon-picker/icon-picker.mjs +1375 -0
  79. package/dist/es/components/icon-picker/icon-picker.vue.d.ts +9 -0
  80. package/dist/es/components/icon-picker/index.css +121 -0
  81. package/dist/es/components/icon-picker/index.d.ts +4 -0
  82. package/dist/es/components/icon-picker/index.mjs +6 -0
  83. package/dist/es/components/iconify-icon/iconify-icon.d.ts +5 -0
  84. package/dist/es/components/iconify-icon/iconify-icon.mjs +1860 -0
  85. package/dist/es/components/iconify-icon/iconify-icon.vue.d.ts +6 -0
  86. package/dist/es/components/iconify-icon/index.css +11 -0
  87. package/dist/es/components/iconify-icon/index.d.ts +4 -0
  88. package/dist/es/components/iconify-icon/index.mjs +6 -0
  89. package/dist/es/components/image/image.mjs +5 -5
  90. package/dist/es/components/input/input.mjs +4 -4
  91. package/dist/es/components/input/input.vue.d.ts +63 -54
  92. package/dist/es/components/input-number/input-number.mjs +5 -5
  93. package/dist/es/components/pca-picker/components/c.vue.d.ts +4 -4
  94. package/dist/es/components/pca-picker/index.css +1 -1
  95. package/dist/es/components/pca-picker/pca-picker.mjs +154 -160
  96. package/dist/es/components/pca-picker/pca-picker.vue.d.ts +12 -11
  97. package/dist/es/components/qr-code/qr-code.mjs +2 -1
  98. package/dist/es/components/screenfull/screenfull.mjs +6 -5
  99. package/dist/es/components/scrollbar/index.css +18 -0
  100. package/dist/es/components/scrollbar/index.d.ts +4 -0
  101. package/dist/es/components/scrollbar/index.mjs +6 -0
  102. package/dist/es/components/scrollbar/scrollbar.d.ts +4 -0
  103. package/dist/es/components/scrollbar/scrollbar.mjs +65 -0
  104. package/dist/es/components/scrollbar/scrollbar.vue.d.ts +588 -0
  105. package/dist/es/components/select/select.mjs +7 -7
  106. package/dist/es/components/single-player/index.css +1 -1
  107. package/dist/es/components/single-player/single-player.mjs +265 -166
  108. package/dist/es/components/svg-icon/index.css +3 -2
  109. package/dist/es/components/svg-icon/svg-icon.mjs +3 -3
  110. package/dist/es/components/switch/switch.mjs +2 -2
  111. package/dist/es/components/sync-scroll-container/sync-scroll-container.mjs +2 -2
  112. package/dist/es/components/tags/tags.mjs +9 -9
  113. package/dist/es/components/text-ellipsis/text-ellipsis.mjs +4 -4
  114. package/dist/es/components/thousand-input/thousand-input.mjs +5 -4
  115. package/dist/es/components/thousand-input/thousand-input.vue.d.ts +126 -108
  116. package/dist/es/components/tinymce/index.css +1 -1
  117. package/dist/es/components/tinymce/tinymce.mjs +9 -8
  118. package/dist/es/components/tree-picker/components/popover-cascader.vue.d.ts +179 -141
  119. package/dist/es/components/tree-picker/popover-cascader.css +1 -1
  120. package/dist/es/components/tree-picker/tree-picker.mjs +10 -10
  121. package/dist/es/components/tree-picker/tree-picker.vue.d.ts +12 -11
  122. package/dist/es/components/upload-file/upload-file.mjs +3 -3
  123. package/dist/es/index.d.ts +3 -0
  124. package/dist/es/index.mjs +41 -31
  125. package/dist/global.d.ts +3 -0
  126. package/dist/index.css +166 -22
  127. package/package.json +8 -2
  128. package/dist/es/chunk/BtTIs3tG.mjs +0 -138
  129. package/dist/es/chunk/C7wQNvSS.mjs +0 -728
  130. package/dist/es/chunk/Cbhe4I9Z.mjs +0 -16
  131. package/dist/es/chunk/DihosKp1.mjs +0 -140
  132. package/dist/es/components/icon/index.css +0 -9
@@ -1,20 +1,20 @@
1
1
  import { defineComponent, markRaw, ref, effectScope, computed, shallowRef, watch, nextTick, onMounted, createBlock, openBlock, unref, withCtx, createVNode, Transition, createElementVNode, normalizeStyle, normalizeClass, createCommentVNode, createElementBlock, renderSlot, withModifiers, Fragment, createTextVNode, toDisplayString, resolveDynamicComponent, useAttrs, mergeProps, createSlots, normalizeProps, guardReactiveProps } from 'vue';
2
2
  import { clamp, useEventListener, isClient, useThrottleFn, useIntersectionObserver } from '@vueuse/core';
3
- import { b as ElTeleport, d as ElFocusTrap } from './CLMc8GzD.mjs';
4
- import { E as ElIcon } from './cPBw23yt.mjs';
3
+ import { b as ElTeleport, d as ElFocusTrap } from './DMYHOxhk.mjs';
4
+ import { E as ElIcon } from './DEPZhJ0Z.mjs';
5
5
  import { ScaleToOriginal, FullScreen, Close, ArrowLeft, ArrowRight, ZoomOut, ZoomIn, RefreshLeft, RefreshRight } from '@element-plus/icons-vue';
6
- import { f as isNumber, c as buildProps, d as definePropType, u as useNamespace, m as fromPairs, i as isArray, n as isElement, h as isString, o as isWindow } from './DRoyW749.mjs';
6
+ import { f as isNumber, c as buildProps, d as definePropType, u as useNamespace, m as fromPairs, i as isArray, n as isElement, h as isString, o as isWindow } from './CcKUdl3e.mjs';
7
7
  import { m as mutable } from './B-rxnVJv.mjs';
8
- import { _ as _export_sfc, w as withInstall } from './DTLPXrjb.mjs';
9
- import { u as useLocale } from './Dk6Bx0KT.mjs';
10
- import { u as useZIndex } from './BI0vrXwX.mjs';
11
- import { u as useLockscreen } from './CLbj8G-F.mjs';
8
+ import { _ as _export_sfc, w as withInstall } from './BTsEMnf_.mjs';
9
+ import { u as useLocale } from './plK2vnjp.mjs';
10
+ import { u as useZIndex } from './BI-fNJhk.mjs';
11
+ import { u as useLockscreen } from './Bnot0Gwc.mjs';
12
12
  import { g as getEventCode, E as EVENT_CODE } from './BTpNRPQW.mjs';
13
13
  import { k as keysOf } from './DVNTpOBR.mjs';
14
- import { d as debounce } from './Bp9jXKX0.mjs';
15
- import { i as isObject } from './NQBKROII.mjs';
16
- import { u as useAttrs$1 } from './BUEEWLrd.mjs';
17
- import { g as getScrollContainer } from './Bl2KlMdP.mjs';
14
+ import { d as debounce } from './BambM7zX.mjs';
15
+ import { i as isObject } from './DWcIzeMM.mjs';
16
+ import { u as useAttrs$1 } from './ezK_XQQd.mjs';
17
+ import { g as getScrollContainer } from './oW98L-44.mjs';
18
18
 
19
19
  /** Error message constants. */
20
20
  var FUNC_ERROR_TEXT = 'Expected a function';
@@ -131,16 +131,16 @@ const imageViewerEmits = {
131
131
  rotate: (deg) => isNumber(deg)
132
132
  };
133
133
 
134
- const __default__$1 = defineComponent({
135
- name: "ElImageViewer"
136
- });
137
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
138
- ...__default__$1,
134
+ const _hoisted_1$1 = ["src", "crossorigin"];
135
+ const _sfc_main$1 = defineComponent({
136
+ ...{
137
+ name: "ElImageViewer"
138
+ },
139
+ __name: "image-viewer",
139
140
  props: imageViewerProps,
140
141
  emits: imageViewerEmits,
141
- setup(__props, { expose, emit }) {
142
+ setup(__props, { expose: __expose, emit: __emit }) {
142
143
  var _a;
143
- const props = __props;
144
144
  const modes = {
145
145
  CONTAIN: {
146
146
  name: "contain",
@@ -151,6 +151,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
151
151
  icon: markRaw(ScaleToOriginal)
152
152
  }
153
153
  };
154
+ const props = __props;
155
+ const emit = __emit;
154
156
  let stopWheelListener;
155
157
  const { t } = useLocale();
156
158
  const ns = useNamespace("image-viewer");
@@ -211,7 +213,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
211
213
  }
212
214
  return style;
213
215
  });
214
- const progress = computed(() => `${activeIndex.value + 1} / ${props.urlList.length}`);
216
+ const progress = computed(
217
+ () => `${activeIndex.value + 1} / ${props.urlList.length}`
218
+ );
215
219
  function hide() {
216
220
  unregisterEventListener();
217
221
  stopWheelListener == null ? void 0 : stopWheelListener();
@@ -356,12 +360,16 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
356
360
  switch (action) {
357
361
  case "zoomOut":
358
362
  if (transform.value.scale > minScale) {
359
- transform.value.scale = Number.parseFloat((transform.value.scale / zoomRate).toFixed(3));
363
+ transform.value.scale = Number.parseFloat(
364
+ (transform.value.scale / zoomRate).toFixed(3)
365
+ );
360
366
  }
361
367
  break;
362
368
  case "zoomIn":
363
369
  if (transform.value.scale < maxScale) {
364
- transform.value.scale = Number.parseFloat((transform.value.scale * zoomRate).toFixed(3));
370
+ transform.value.scale = Number.parseFloat(
371
+ (transform.value.scale * zoomRate).toFixed(3)
372
+ );
365
373
  }
366
374
  break;
367
375
  case "clockwise":
@@ -397,9 +405,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
397
405
  return false;
398
406
  }
399
407
  }
400
- watch(() => scaleClamped.value, (val) => {
401
- transform.value.scale = val;
402
- });
408
+ watch(
409
+ () => scaleClamped.value,
410
+ (val) => {
411
+ transform.value.scale = val;
412
+ }
413
+ );
403
414
  watch(currentImg, () => {
404
415
  nextTick(() => {
405
416
  const $img = imgRef.value;
@@ -419,7 +430,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
419
430
  passive: false
420
431
  });
421
432
  });
422
- expose({
433
+ __expose({
423
434
  setActiveItem
424
435
  });
425
436
  return (_ctx, _cache) => {
@@ -433,163 +444,226 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
433
444
  appear: ""
434
445
  }, {
435
446
  default: withCtx(() => [
436
- createElementVNode("div", {
437
- ref_key: "wrapper",
438
- ref: wrapper,
439
- tabindex: -1,
440
- class: normalizeClass(unref(ns).e("wrapper")),
441
- style: normalizeStyle({ zIndex: zIndex.value })
442
- }, [
443
- createVNode(unref(ElFocusTrap), {
444
- loop: "",
445
- trapped: "",
446
- "focus-trap-el": wrapper.value,
447
- "focus-start-el": "container",
448
- onFocusoutPrevented,
449
- onReleaseRequested: onCloseRequested
450
- }, {
451
- default: withCtx(() => [
452
- createElementVNode("div", {
453
- class: normalizeClass(unref(ns).e("mask")),
454
- onClick: withModifiers(($event) => _ctx.hideOnClickModal && hide(), ["self"])
455
- }, null, 10, ["onClick"]),
456
- createCommentVNode(" CLOSE "),
457
- createElementVNode("span", {
458
- class: normalizeClass([unref(ns).e("btn"), unref(ns).e("close")]),
459
- onClick: hide
460
- }, [
461
- createVNode(unref(ElIcon), null, {
462
- default: withCtx(() => [
463
- createVNode(unref(Close))
464
- ]),
465
- _: 1
466
- })
467
- ], 2),
468
- createCommentVNode(" ARROW "),
469
- !unref(isSingle) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
470
- createElementVNode("span", {
471
- class: normalizeClass(unref(arrowPrevKls)),
472
- onClick: prev
473
- }, [
474
- createVNode(unref(ElIcon), null, {
475
- default: withCtx(() => [
476
- createVNode(unref(ArrowLeft))
477
- ]),
478
- _: 1
479
- })
480
- ], 2),
481
- createElementVNode("span", {
482
- class: normalizeClass(unref(arrowNextKls)),
483
- onClick: next
484
- }, [
485
- createVNode(unref(ElIcon), null, {
486
- default: withCtx(() => [
487
- createVNode(unref(ArrowRight))
488
- ]),
489
- _: 1
490
- })
491
- ], 2)
492
- ], 64)) : createCommentVNode("v-if", true),
493
- _ctx.$slots.progress || _ctx.showProgress ? (openBlock(), createElementBlock("div", {
494
- key: 1,
495
- class: normalizeClass([unref(ns).e("btn"), unref(ns).e("progress")])
496
- }, [
497
- renderSlot(_ctx.$slots, "progress", {
498
- activeIndex: activeIndex.value,
499
- total: _ctx.urlList.length
500
- }, () => [
501
- createTextVNode(toDisplayString(unref(progress)), 1)
502
- ])
503
- ], 2)) : createCommentVNode("v-if", true),
504
- createCommentVNode(" ACTIONS "),
505
- createElementVNode("div", {
506
- class: normalizeClass([unref(ns).e("btn"), unref(ns).e("actions")])
507
- }, [
508
- createElementVNode("div", {
509
- class: normalizeClass(unref(ns).e("actions__inner"))
510
- }, [
511
- renderSlot(_ctx.$slots, "toolbar", {
512
- actions: handleActions,
513
- prev,
514
- next,
515
- reset: toggleMode,
516
- activeIndex: activeIndex.value,
517
- setActiveItem
518
- }, () => [
519
- createVNode(unref(ElIcon), {
520
- onClick: ($event) => handleActions("zoomOut")
521
- }, {
522
- default: withCtx(() => [
523
- createVNode(unref(ZoomOut))
524
- ]),
525
- _: 1
526
- }, 8, ["onClick"]),
527
- createVNode(unref(ElIcon), {
528
- onClick: ($event) => handleActions("zoomIn")
529
- }, {
447
+ createElementVNode(
448
+ "div",
449
+ {
450
+ ref_key: "wrapper",
451
+ ref: wrapper,
452
+ tabindex: -1,
453
+ class: normalizeClass(unref(ns).e("wrapper")),
454
+ style: normalizeStyle({ zIndex: zIndex.value })
455
+ },
456
+ [
457
+ createVNode(unref(ElFocusTrap), {
458
+ loop: "",
459
+ trapped: "",
460
+ "focus-trap-el": wrapper.value,
461
+ "focus-start-el": "container",
462
+ onFocusoutPrevented,
463
+ onReleaseRequested: onCloseRequested
464
+ }, {
465
+ default: withCtx(() => [
466
+ createElementVNode(
467
+ "div",
468
+ {
469
+ class: normalizeClass(unref(ns).e("mask")),
470
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.hideOnClickModal && hide(), ["self"]))
471
+ },
472
+ null,
473
+ 2
474
+ ),
475
+ createCommentVNode(" CLOSE "),
476
+ createElementVNode(
477
+ "span",
478
+ {
479
+ class: normalizeClass([unref(ns).e("btn"), unref(ns).e("close")]),
480
+ onClick: hide
481
+ },
482
+ [
483
+ createVNode(unref(ElIcon), null, {
530
484
  default: withCtx(() => [
531
- createVNode(unref(ZoomIn))
485
+ createVNode(unref(Close))
532
486
  ]),
533
487
  _: 1
534
- }, 8, ["onClick"]),
535
- createElementVNode("i", {
536
- class: normalizeClass(unref(ns).e("actions__divider"))
537
- }, null, 2),
538
- createVNode(unref(ElIcon), { onClick: toggleMode }, {
539
- default: withCtx(() => [
540
- (openBlock(), createBlock(resolveDynamicComponent(unref(mode).icon)))
541
- ]),
542
- _: 1
543
- }),
544
- createElementVNode("i", {
545
- class: normalizeClass(unref(ns).e("actions__divider"))
546
- }, null, 2),
547
- createVNode(unref(ElIcon), {
548
- onClick: ($event) => handleActions("anticlockwise")
549
- }, {
550
- default: withCtx(() => [
551
- createVNode(unref(RefreshLeft))
552
- ]),
553
- _: 1
554
- }, 8, ["onClick"]),
555
- createVNode(unref(ElIcon), {
556
- onClick: ($event) => handleActions("clockwise")
557
- }, {
558
- default: withCtx(() => [
559
- createVNode(unref(RefreshRight))
560
- ]),
561
- _: 1
562
- }, 8, ["onClick"])
563
- ])
564
- ], 2)
565
- ], 2),
566
- createCommentVNode(" CANVAS "),
567
- createElementVNode("div", {
568
- class: normalizeClass(unref(ns).e("canvas"))
569
- }, [
570
- loadError.value && _ctx.$slots["viewer-error"] ? renderSlot(_ctx.$slots, "viewer-error", {
571
- key: 0,
572
- activeIndex: activeIndex.value,
573
- src: unref(currentImg)
574
- }) : (openBlock(), createElementBlock("img", {
575
- ref_key: "imgRef",
576
- ref: imgRef,
577
- key: unref(currentImg),
578
- src: unref(currentImg),
579
- style: normalizeStyle(unref(imgStyle)),
580
- class: normalizeClass(unref(ns).e("img")),
581
- crossorigin: _ctx.crossorigin,
582
- onLoad: handleImgLoad,
583
- onError: handleImgError,
584
- onMousedown: handleMouseDown,
585
- onTouchstart: handleTouchStart
586
- }, null, 46, ["src", "crossorigin"]))
587
- ], 2),
588
- renderSlot(_ctx.$slots, "default")
589
- ]),
590
- _: 3
591
- }, 8, ["focus-trap-el"])
592
- ], 6)
488
+ })
489
+ ],
490
+ 2
491
+ ),
492
+ createCommentVNode(" ARROW "),
493
+ !isSingle.value ? (openBlock(), createElementBlock(
494
+ Fragment,
495
+ { key: 0 },
496
+ [
497
+ createElementVNode(
498
+ "span",
499
+ {
500
+ class: normalizeClass(arrowPrevKls.value),
501
+ onClick: prev
502
+ },
503
+ [
504
+ createVNode(unref(ElIcon), null, {
505
+ default: withCtx(() => [
506
+ createVNode(unref(ArrowLeft))
507
+ ]),
508
+ _: 1
509
+ })
510
+ ],
511
+ 2
512
+ ),
513
+ createElementVNode(
514
+ "span",
515
+ {
516
+ class: normalizeClass(arrowNextKls.value),
517
+ onClick: next
518
+ },
519
+ [
520
+ createVNode(unref(ElIcon), null, {
521
+ default: withCtx(() => [
522
+ createVNode(unref(ArrowRight))
523
+ ]),
524
+ _: 1
525
+ })
526
+ ],
527
+ 2
528
+ )
529
+ ],
530
+ 64
531
+ )) : createCommentVNode("v-if", true),
532
+ _ctx.$slots.progress || _ctx.showProgress ? (openBlock(), createElementBlock(
533
+ "div",
534
+ {
535
+ key: 1,
536
+ class: normalizeClass([unref(ns).e("btn"), unref(ns).e("progress")])
537
+ },
538
+ [
539
+ renderSlot(_ctx.$slots, "progress", {
540
+ activeIndex: activeIndex.value,
541
+ total: _ctx.urlList.length
542
+ }, () => [
543
+ createTextVNode(
544
+ toDisplayString(progress.value),
545
+ 1
546
+ )
547
+ ])
548
+ ],
549
+ 2
550
+ )) : createCommentVNode("v-if", true),
551
+ createCommentVNode(" ACTIONS "),
552
+ createElementVNode(
553
+ "div",
554
+ {
555
+ class: normalizeClass([unref(ns).e("btn"), unref(ns).e("actions")])
556
+ },
557
+ [
558
+ createElementVNode(
559
+ "div",
560
+ {
561
+ class: normalizeClass(unref(ns).e("actions__inner"))
562
+ },
563
+ [
564
+ renderSlot(_ctx.$slots, "toolbar", {
565
+ actions: handleActions,
566
+ prev,
567
+ next,
568
+ reset: toggleMode,
569
+ activeIndex: activeIndex.value,
570
+ setActiveItem
571
+ }, () => [
572
+ createVNode(unref(ElIcon), {
573
+ onClick: _cache[1] || (_cache[1] = ($event) => handleActions("zoomOut"))
574
+ }, {
575
+ default: withCtx(() => [
576
+ createVNode(unref(ZoomOut))
577
+ ]),
578
+ _: 1
579
+ }),
580
+ createVNode(unref(ElIcon), {
581
+ onClick: _cache[2] || (_cache[2] = ($event) => handleActions("zoomIn"))
582
+ }, {
583
+ default: withCtx(() => [
584
+ createVNode(unref(ZoomIn))
585
+ ]),
586
+ _: 1
587
+ }),
588
+ createElementVNode(
589
+ "i",
590
+ {
591
+ class: normalizeClass(unref(ns).e("actions__divider"))
592
+ },
593
+ null,
594
+ 2
595
+ ),
596
+ createVNode(unref(ElIcon), { onClick: toggleMode }, {
597
+ default: withCtx(() => [
598
+ (openBlock(), createBlock(resolveDynamicComponent(mode.value.icon)))
599
+ ]),
600
+ _: 1
601
+ }),
602
+ createElementVNode(
603
+ "i",
604
+ {
605
+ class: normalizeClass(unref(ns).e("actions__divider"))
606
+ },
607
+ null,
608
+ 2
609
+ ),
610
+ createVNode(unref(ElIcon), {
611
+ onClick: _cache[3] || (_cache[3] = ($event) => handleActions("anticlockwise"))
612
+ }, {
613
+ default: withCtx(() => [
614
+ createVNode(unref(RefreshLeft))
615
+ ]),
616
+ _: 1
617
+ }),
618
+ createVNode(unref(ElIcon), {
619
+ onClick: _cache[4] || (_cache[4] = ($event) => handleActions("clockwise"))
620
+ }, {
621
+ default: withCtx(() => [
622
+ createVNode(unref(RefreshRight))
623
+ ]),
624
+ _: 1
625
+ })
626
+ ])
627
+ ],
628
+ 2
629
+ )
630
+ ],
631
+ 2
632
+ ),
633
+ createCommentVNode(" CANVAS "),
634
+ createElementVNode(
635
+ "div",
636
+ {
637
+ class: normalizeClass(unref(ns).e("canvas"))
638
+ },
639
+ [
640
+ loadError.value && _ctx.$slots["viewer-error"] ? renderSlot(_ctx.$slots, "viewer-error", {
641
+ key: 0,
642
+ activeIndex: activeIndex.value,
643
+ src: currentImg.value
644
+ }) : (openBlock(), createElementBlock("img", {
645
+ ref_key: "imgRef",
646
+ ref: imgRef,
647
+ key: currentImg.value,
648
+ src: currentImg.value,
649
+ style: normalizeStyle(imgStyle.value),
650
+ class: normalizeClass(unref(ns).e("img")),
651
+ crossorigin: _ctx.crossorigin,
652
+ onLoad: handleImgLoad,
653
+ onError: handleImgError,
654
+ onMousedown: handleMouseDown,
655
+ onTouchstart: handleTouchStart
656
+ }, null, 46, _hoisted_1$1))
657
+ ],
658
+ 2
659
+ ),
660
+ renderSlot(_ctx.$slots, "default")
661
+ ]),
662
+ _: 3
663
+ }, 8, ["focus-trap-el"])
664
+ ],
665
+ 6
666
+ )
593
667
  ]),
594
668
  _: 3
595
669
  })
@@ -599,7 +673,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
599
673
  };
600
674
  }
601
675
  });
602
- var ImageViewer = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "image-viewer.vue"]]);
676
+ var ImageViewer = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/image-viewer/src/image-viewer.vue"]]);
603
677
 
604
678
  const ElImageViewer = withInstall(ImageViewer);
605
679
 
@@ -671,21 +745,28 @@ const imageEmits = {
671
745
  show: () => true
672
746
  };
673
747
 
674
- const __default__ = defineComponent({
675
- name: "ElImage",
676
- inheritAttrs: false
677
- });
678
- const _sfc_main = /* @__PURE__ */ defineComponent({
679
- ...__default__,
748
+ const _hoisted_1 = ["src", "loading", "crossorigin"];
749
+ const _hoisted_2 = { key: 0 };
750
+ const _sfc_main = defineComponent({
751
+ ...{
752
+ name: "ElImage",
753
+ inheritAttrs: false
754
+ },
755
+ __name: "image",
680
756
  props: imageProps,
681
757
  emits: imageEmits,
682
- setup(__props, { expose, emit }) {
758
+ setup(__props, { expose: __expose, emit: __emit }) {
683
759
  const props = __props;
760
+ const emit = __emit;
684
761
  const { t } = useLocale();
685
762
  const ns = useNamespace("image");
686
763
  const rawAttrs = useAttrs();
687
764
  const containerAttrs = computed(() => {
688
- return fromPairs(Object.entries(rawAttrs).filter(([key]) => /^(data-|on[A-Z])/i.test(key) || ["id", "style"].includes(key)));
765
+ return fromPairs(
766
+ Object.entries(rawAttrs).filter(
767
+ ([key]) => /^(data-|on[A-Z])/i.test(key) || ["id", "style"].includes(key)
768
+ )
769
+ );
689
770
  });
690
771
  const imgAttrs = useAttrs$1({
691
772
  excludeListeners: true,
@@ -768,9 +849,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
768
849
  const scrollContainer2 = getScrollContainer(container.value);
769
850
  _scrollContainer.value = isWindow(scrollContainer2) ? void 0 : scrollContainer2;
770
851
  }
771
- const { stop } = useIntersectionObserver(container, ([entry]) => {
772
- lazyLoadHandler(entry.isIntersecting);
773
- }, { root: _scrollContainer });
852
+ const { stop } = useIntersectionObserver(
853
+ container,
854
+ ([entry]) => {
855
+ lazyLoadHandler(entry.isIntersecting);
856
+ },
857
+ { root: _scrollContainer }
858
+ );
774
859
  stopScrollListener = stop;
775
860
  }
776
861
  function removeLazyLoadListener() {
@@ -793,16 +878,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
793
878
  function switchViewer(val) {
794
879
  emit("switch", val);
795
880
  }
796
- watch(() => props.src, () => {
797
- if (isManual.value) {
798
- isLoading.value = true;
799
- hasLoadError.value = false;
800
- removeLazyLoadListener();
801
- addLazyLoadListener();
802
- } else {
803
- loadImage();
881
+ watch(
882
+ () => props.src,
883
+ () => {
884
+ if (isManual.value) {
885
+ isLoading.value = true;
886
+ hasLoadError.value = false;
887
+ removeLazyLoadListener();
888
+ addLazyLoadListener();
889
+ } else {
890
+ loadImage();
891
+ }
804
892
  }
805
- });
893
+ );
806
894
  onMounted(() => {
807
895
  if (isManual.value) {
808
896
  addLazyLoadListener();
@@ -810,90 +898,122 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
810
898
  loadImage();
811
899
  }
812
900
  });
813
- expose({
901
+ __expose({
814
902
  showPreview: clickHandler
815
903
  });
816
904
  return (_ctx, _cache) => {
817
- return openBlock(), createElementBlock("div", mergeProps({
818
- ref_key: "container",
819
- ref: container
820
- }, unref(containerAttrs), {
821
- class: [unref(ns).b(), _ctx.$attrs.class]
822
- }), [
823
- hasLoadError.value ? renderSlot(_ctx.$slots, "error", { key: 0 }, () => [
824
- createElementVNode("div", {
825
- class: normalizeClass(unref(ns).e("error"))
826
- }, toDisplayString(unref(t)("el.image.error")), 3)
827
- ]) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
828
- imageSrc.value !== void 0 ? (openBlock(), createElementBlock("img", mergeProps({ key: 0 }, unref(imgAttrs), {
829
- src: imageSrc.value,
830
- loading: _ctx.loading,
831
- style: unref(imageStyle),
832
- class: unref(imageKls),
833
- crossorigin: _ctx.crossorigin,
834
- onClick: clickHandler,
835
- onLoad: handleLoad,
836
- onError: handleError
837
- }), null, 16, ["src", "loading", "crossorigin"])) : createCommentVNode("v-if", true),
838
- isLoading.value ? (openBlock(), createElementBlock("div", {
839
- key: 1,
840
- class: normalizeClass(unref(ns).e("wrapper"))
841
- }, [
842
- renderSlot(_ctx.$slots, "placeholder", {}, () => [
843
- createElementVNode("div", {
844
- class: normalizeClass(unref(ns).e("placeholder"))
845
- }, null, 2)
846
- ])
847
- ], 2)) : createCommentVNode("v-if", true)
848
- ], 64)),
849
- unref(preview) ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
850
- showViewer.value ? (openBlock(), createBlock(unref(ElImageViewer), {
851
- key: 0,
852
- "z-index": _ctx.zIndex,
853
- "initial-index": unref(imageIndex),
854
- infinite: _ctx.infinite,
855
- "zoom-rate": _ctx.zoomRate,
856
- "min-scale": _ctx.minScale,
857
- "max-scale": _ctx.maxScale,
858
- "show-progress": _ctx.showProgress,
859
- "url-list": _ctx.previewSrcList,
860
- scale: _ctx.scale,
861
- crossorigin: _ctx.crossorigin,
862
- "hide-on-click-modal": _ctx.hideOnClickModal,
863
- teleported: _ctx.previewTeleported,
864
- "close-on-press-escape": _ctx.closeOnPressEscape,
865
- onClose: closeViewer,
866
- onSwitch: switchViewer
867
- }, createSlots({
868
- toolbar: withCtx((toolbar) => [
869
- renderSlot(_ctx.$slots, "toolbar", normalizeProps(guardReactiveProps(toolbar)))
870
- ]),
871
- default: withCtx(() => [
872
- _ctx.$slots.viewer ? (openBlock(), createElementBlock("div", { key: 0 }, [
873
- renderSlot(_ctx.$slots, "viewer")
874
- ])) : createCommentVNode("v-if", true)
875
- ]),
876
- _: 2
877
- }, [
878
- _ctx.$slots.progress ? {
879
- name: "progress",
880
- fn: withCtx((progress) => [
881
- renderSlot(_ctx.$slots, "progress", normalizeProps(guardReactiveProps(progress)))
882
- ])
883
- } : void 0,
884
- _ctx.$slots["viewer-error"] ? {
885
- name: "viewer-error",
886
- fn: withCtx((viewerError) => [
887
- renderSlot(_ctx.$slots, "viewer-error", normalizeProps(guardReactiveProps(viewerError)))
888
- ])
889
- } : void 0
890
- ]), 1032, ["z-index", "initial-index", "infinite", "zoom-rate", "min-scale", "max-scale", "show-progress", "url-list", "scale", "crossorigin", "hide-on-click-modal", "teleported", "close-on-press-escape"])) : createCommentVNode("v-if", true)
891
- ], 64)) : createCommentVNode("v-if", true)
892
- ], 16);
905
+ return openBlock(), createElementBlock(
906
+ "div",
907
+ mergeProps({
908
+ ref_key: "container",
909
+ ref: container
910
+ }, containerAttrs.value, {
911
+ class: [unref(ns).b(), _ctx.$attrs.class]
912
+ }),
913
+ [
914
+ hasLoadError.value ? renderSlot(_ctx.$slots, "error", { key: 0 }, () => [
915
+ createElementVNode(
916
+ "div",
917
+ {
918
+ class: normalizeClass(unref(ns).e("error"))
919
+ },
920
+ toDisplayString(unref(t)("el.image.error")),
921
+ 3
922
+ )
923
+ ]) : (openBlock(), createElementBlock(
924
+ Fragment,
925
+ { key: 1 },
926
+ [
927
+ imageSrc.value !== void 0 ? (openBlock(), createElementBlock("img", mergeProps({ key: 0 }, unref(imgAttrs), {
928
+ src: imageSrc.value,
929
+ loading: _ctx.loading,
930
+ style: imageStyle.value,
931
+ class: imageKls.value,
932
+ crossorigin: _ctx.crossorigin,
933
+ onClick: clickHandler,
934
+ onLoad: handleLoad,
935
+ onError: handleError
936
+ }), null, 16, _hoisted_1)) : createCommentVNode("v-if", true),
937
+ isLoading.value ? (openBlock(), createElementBlock(
938
+ "div",
939
+ {
940
+ key: 1,
941
+ class: normalizeClass(unref(ns).e("wrapper"))
942
+ },
943
+ [
944
+ renderSlot(_ctx.$slots, "placeholder", {}, () => [
945
+ createElementVNode(
946
+ "div",
947
+ {
948
+ class: normalizeClass(unref(ns).e("placeholder"))
949
+ },
950
+ null,
951
+ 2
952
+ )
953
+ ])
954
+ ],
955
+ 2
956
+ )) : createCommentVNode("v-if", true)
957
+ ],
958
+ 64
959
+ )),
960
+ preview.value ? (openBlock(), createElementBlock(
961
+ Fragment,
962
+ { key: 2 },
963
+ [
964
+ showViewer.value ? (openBlock(), createBlock(unref(ElImageViewer), {
965
+ key: 0,
966
+ "z-index": _ctx.zIndex,
967
+ "initial-index": imageIndex.value,
968
+ infinite: _ctx.infinite,
969
+ "zoom-rate": _ctx.zoomRate,
970
+ "min-scale": _ctx.minScale,
971
+ "max-scale": _ctx.maxScale,
972
+ "show-progress": _ctx.showProgress,
973
+ "url-list": _ctx.previewSrcList,
974
+ scale: _ctx.scale,
975
+ crossorigin: _ctx.crossorigin,
976
+ "hide-on-click-modal": _ctx.hideOnClickModal,
977
+ teleported: _ctx.previewTeleported,
978
+ "close-on-press-escape": _ctx.closeOnPressEscape,
979
+ onClose: closeViewer,
980
+ onSwitch: switchViewer
981
+ }, createSlots({
982
+ toolbar: withCtx((toolbar) => [
983
+ renderSlot(_ctx.$slots, "toolbar", normalizeProps(guardReactiveProps(toolbar)))
984
+ ]),
985
+ default: withCtx(() => [
986
+ _ctx.$slots.viewer ? (openBlock(), createElementBlock("div", _hoisted_2, [
987
+ renderSlot(_ctx.$slots, "viewer")
988
+ ])) : createCommentVNode("v-if", true)
989
+ ]),
990
+ _: 2
991
+ }, [
992
+ _ctx.$slots.progress ? {
993
+ name: "progress",
994
+ fn: withCtx((progress) => [
995
+ renderSlot(_ctx.$slots, "progress", normalizeProps(guardReactiveProps(progress)))
996
+ ]),
997
+ key: "0"
998
+ } : void 0,
999
+ _ctx.$slots["viewer-error"] ? {
1000
+ name: "viewer-error",
1001
+ fn: withCtx((viewerError) => [
1002
+ renderSlot(_ctx.$slots, "viewer-error", normalizeProps(guardReactiveProps(viewerError)))
1003
+ ]),
1004
+ key: "1"
1005
+ } : void 0
1006
+ ]), 1032, ["z-index", "initial-index", "infinite", "zoom-rate", "min-scale", "max-scale", "show-progress", "url-list", "scale", "crossorigin", "hide-on-click-modal", "teleported", "close-on-press-escape"])) : createCommentVNode("v-if", true)
1007
+ ],
1008
+ 64
1009
+ )) : createCommentVNode("v-if", true)
1010
+ ],
1011
+ 16
1012
+ );
893
1013
  };
894
1014
  }
895
1015
  });
896
- var Image = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "image.vue"]]);
1016
+ var Image = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/image/src/image.vue"]]);
897
1017
 
898
1018
  const ElImage = withInstall(Image);
899
1019