vue-devui 1.5.5 → 1.5.6

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 (68) hide show
  1. package/alert/index.es.js +3 -3
  2. package/alert/index.umd.js +1 -1
  3. package/auto-complete/index.es.js +27 -9
  4. package/auto-complete/index.umd.js +19 -1
  5. package/avatar/index.es.js +77 -3
  6. package/avatar/index.umd.js +75 -1
  7. package/checkbox/index.es.js +27 -9
  8. package/checkbox/index.umd.js +19 -1
  9. package/collapse/index.es.js +5 -1
  10. package/collapse/index.umd.js +5 -1
  11. package/date-picker-pro/index.es.js +54 -11
  12. package/date-picker-pro/index.umd.js +44 -1
  13. package/echarts/index.es.js +395 -0
  14. package/echarts/index.umd.js +1 -0
  15. package/echarts/package.json +8 -0
  16. package/form/index.es.js +27 -9
  17. package/form/index.umd.js +22 -4
  18. package/global.d.ts +1 -0
  19. package/image-preview/index.es.js +34 -9
  20. package/image-preview/index.umd.js +26 -1
  21. package/input/index.es.js +27 -9
  22. package/input/index.umd.js +19 -1
  23. package/input-number/index.es.js +35 -11
  24. package/input-number/index.umd.js +30 -6
  25. package/mention/index.es.js +27 -9
  26. package/mention/index.umd.js +19 -1
  27. package/notification/index.es.js +11 -4
  28. package/notification/index.umd.js +8 -1
  29. package/nuxt/components/DChart.js +2 -0
  30. package/nuxt/components/devuiChartProps.js +2 -0
  31. package/package.json +2 -1
  32. package/pagination/index.es.js +34 -13
  33. package/pagination/index.umd.js +22 -1
  34. package/popover/index.es.js +12 -4
  35. package/popover/index.umd.js +9 -1
  36. package/radio/index.es.js +27 -9
  37. package/radio/index.umd.js +30 -12
  38. package/rate/index.es.js +2 -2
  39. package/rate/index.umd.js +1 -1
  40. package/search/index.es.js +31 -11
  41. package/search/index.umd.js +21 -1
  42. package/select/index.es.js +32 -11
  43. package/select/index.umd.js +22 -1
  44. package/skeleton/index.es.js +17 -1
  45. package/skeleton/index.umd.js +17 -1
  46. package/switch/index.es.js +27 -9
  47. package/switch/index.umd.js +25 -7
  48. package/table/index.es.js +27 -9
  49. package/table/index.umd.js +19 -1
  50. package/textarea/index.es.js +27 -9
  51. package/textarea/index.umd.js +19 -1
  52. package/time-picker/index.es.js +27 -9
  53. package/time-picker/index.umd.js +19 -1
  54. package/time-select/index.es.js +32 -11
  55. package/time-select/index.umd.js +27 -6
  56. package/tree/index.es.js +27 -9
  57. package/tree/index.umd.js +19 -1
  58. package/types/avatar/src/components/icon-nobody.d.ts +1 -1
  59. package/types/echarts/index.d.ts +11 -0
  60. package/types/echarts/src/echarts-theme.d.ts +351 -0
  61. package/types/echarts/src/echarts-types.d.ts +8 -0
  62. package/types/echarts/src/echarts.d.ts +16 -0
  63. package/types/timeline/src/components/timeline-item.d.ts +1 -1
  64. package/types/vue-devui.d.ts +2 -1
  65. package/upload/index.es.js +11 -4
  66. package/upload/index.umd.js +8 -1
  67. package/vue-devui.es.js +598 -44
  68. package/vue-devui.umd.js +215 -35
package/global.d.ts CHANGED
@@ -29,6 +29,7 @@ DDRangeDatePickerPro: typeof import('./types/vue-devui')['DRangeDatePickerPro']
29
29
  DDrawer: typeof import('./types/vue-devui')['Drawer']
30
30
  DDropdown: typeof import('./types/vue-devui')['Dropdown']
31
31
  DDropdownMenu: typeof import('./types/vue-devui')['DropdownMenu']
32
+ DDChart: typeof import('./types/vue-devui')['DChart']
32
33
  DEditableSelect: typeof import('./types/vue-devui')['EditableSelect']
33
34
  DEditorMd: typeof import('./types/vue-devui')['EditorMd']
34
35
  DMdRender: typeof import('./types/vue-devui')['MdRender']
@@ -262,7 +262,7 @@ var imagePreview = defineComponent({
262
262
  }, [createVNode("polygon", {
263
263
  "fill": "#293040",
264
264
  "fill-rule": "nonzero",
265
- "points": "8 6.58578644 12.2426407 2.34314575 13.6568542 3.75735931 9.41421356 8 13.6568542 12.2426407 12.2426407 13.6568542 8 9.41421356 3.75735931 13.6568542 2.34314575 12.2426407 6.58578644 8 2.34314575 3.75735931 3.75735931 2.34314575"
265
+ "points": "8 6.58578644 12.2426407 2.34314575 13.6568542 3.75735931 9.41421356 8 13.6568542 12.2426407 12.2426407 13.6568542 8 9.41421356 3.75735931 13.6568542 2.34314575 12.2426407 6.58578644 8 2.34314575 3.75735931 3.75735931 2.34314575"
266
266
  }, null)])])]), createVNode("button", {
267
267
  "class": ns.e("arrow-left"),
268
268
  "onClick": onPrev
@@ -279,7 +279,7 @@ var imagePreview = defineComponent({
279
279
  }, [createVNode("polygon", {
280
280
  "fill": "#293040",
281
281
  "fill-rule": "nonzero",
282
- "points": "10.7071068 12.2928932 9.29289322 13.7071068 3.58578644 8 9.29289322 2.29289322 10.7071068 3.70710678 6.41421356 8"
282
+ "points": "10.7071068 12.2928932 9.29289322 13.7071068 3.58578644 8 9.29289322 2.29289322 10.7071068 3.70710678 6.41421356 8"
283
283
  }, null)])])]), createVNode("button", {
284
284
  "class": ns.e("arrow-right"),
285
285
  "onClick": onNext
@@ -297,7 +297,7 @@ var imagePreview = defineComponent({
297
297
  "fill": "#293040",
298
298
  "fill-rule": "nonzero",
299
299
  "transform": "translate(8.146447, 8.000000) scale(-1, 1) translate(-8.146447, -8.000000) ",
300
- "points": "11.7071068 12.2928932 10.2928932 13.7071068 4.58578644 8 10.2928932 2.29289322 11.7071068 3.70710678 7.41421356 8"
300
+ "points": "11.7071068 12.2928932 10.2928932 13.7071068 4.58578644 8 10.2928932 2.29289322 11.7071068 3.70710678 7.41421356 8"
301
301
  }, null)])])]), createVNode("div", {
302
302
  "class": ns.e("toolbar")
303
303
  }, [createVNode("button", {
@@ -315,7 +315,13 @@ var imagePreview = defineComponent({
315
315
  "fill": "#293040",
316
316
  "fill-rule": "nonzero"
317
317
  }, [createVNode("path", {
318
- "d": "M6,6 L6,4 L8,4 L8,6 L10,6 L10,8 L8,8 L8,10 L6,10 L6,8 L4,8 L4,6 L6,6 Z M12.6063847,11.1921711 L15.6568542,14.2426407 L14.2426407,15.6568542 L11.1921711,12.6063847 C10.0235906,13.4815965 8.5723351,14 7,14 C3.13400675,14 0,10.8659932 0,7 C0,3.13400675 3.13400675,0 7,0 C10.8659932,0 14,3.13400675 14,7 C14,8.5723351 13.4815965,10.0235906 12.6063847,11.1921711 L12.6063847,11.1921711 Z M7,12 C9.76142375,12 12,9.76142375 12,7 C12,4.23857625 9.76142375,2 7,2 C4.23857625,2 2,4.23857625 2,7 C2,9.76142375 4.23857625,12 7,12 Z"
318
+ "d": `M6,6 L6,4 L8,4 L8,6 L10,6 L10,8 L8,8 L8,10 L6,10 L6,8 L4,8 L4,6 L6,6 Z
319
+ M12.6063847,11.1921711 L15.6568542,14.2426407 L14.2426407,15.6568542 L11.1921711,12.6063847
320
+ C10.0235906,13.4815965 8.5723351,14 7,14 C3.13400675,14 0,10.8659932 0,7 C0,3.13400675
321
+ 3.13400675,0 7,0 C10.8659932,0 14,3.13400675 14,7 C14,8.5723351 13.4815965,10.0235906
322
+ 12.6063847,11.1921711 L12.6063847,11.1921711 Z M7,12 C9.76142375,12 12,9.76142375
323
+ 12,7 C12,4.23857625 9.76142375,2 7,2 C4.23857625,2 2,4.23857625 2,7 C2,9.76142375
324
+ 4.23857625,12 7,12 Z`
319
325
  }, null)])])])]), createVNode("button", {
320
326
  "onClick": onZoomOut
321
327
  }, [createVNode("svg", {
@@ -331,7 +337,12 @@ var imagePreview = defineComponent({
331
337
  "fill": "#293040",
332
338
  "fill-rule": "nonzero"
333
339
  }, [createVNode("path", {
334
- "d": "M12.6063847,11.1921711 L15.6568542,14.2426407 L14.2426407,15.6568542 L11.1921711,12.6063847 C10.0235906,13.4815965 8.5723351,14 7,14 C3.13400675,14 0,10.8659932 0,7 C0,3.13400675 3.13400675,0 7,0 C10.8659932,0 14,3.13400675 14,7 C14,8.5723351 13.4815965,10.0235906 12.6063847,11.1921711 L12.6063847,11.1921711 Z M7,12 C9.76142375,12 12,9.76142375 12,7 C12,4.23857625 9.76142375,2 7,2 C4.23857625,2 2,4.23857625 2,7 C2,9.76142375 4.23857625,12 7,12 Z M4,6 L10,6 L10,8 L4,8 L4,6 Z"
340
+ "d": `M12.6063847,11.1921711 L15.6568542,14.2426407 L14.2426407,15.6568542
341
+ L11.1921711,12.6063847 C10.0235906,13.4815965 8.5723351,14 7,14 C3.13400675,14 0,10.8659932
342
+ 0,7 C0,3.13400675 3.13400675,0 7,0 C10.8659932,0 14,3.13400675 14,7 C14,8.5723351
343
+ 13.4815965,10.0235906 12.6063847,11.1921711 L12.6063847,11.1921711 Z M7,12 C9.76142375,12
344
+ 12,9.76142375 12,7 C12,4.23857625 9.76142375,2 7,2 C4.23857625,2 2,4.23857625 2,7 C2,9.76142375
345
+ 4.23857625,12 7,12 Z M4,6 L10,6 L10,8 L4,8 L4,6 Z`
335
346
  }, null)])])])]), createVNode("button", {
336
347
  "onClick": onRotate
337
348
  }, [createVNode("svg", {
@@ -345,7 +356,16 @@ var imagePreview = defineComponent({
345
356
  "fill": "none",
346
357
  "fill-rule": "evenodd"
347
358
  }, [createVNode("path", {
348
- "d": "M7.5,3.02242151 L7.5,4 L4.5,2 L7.5,0 L7.5,1.01640228 C7.66526181,1.00552468 7.83198572,1 8,1 C12.1421356,1 15.5,4.35786438 15.5,8.5 C15.5,12.6421356 12.1421356,16 8,16 C3.85786438,16 0.5,12.6421356 0.5,8.5 C0.5,6.9828355 0.950484514,5.5708873 1.72499011,4.39061882 L3.42173231,5.4510827 C2.83944149,6.32371289 2.5,7.37221604 2.5,8.5 C2.5,11.5375661 4.96243388,14 8,14 C11.0375661,14 13.5,11.5375661 13.5,8.5 C13.5,5.46243388 11.0375661,3 8,3 C7.83145515,3 7.66468102,3.00758131 7.5,3.02242151 Z M8,11 C6.61928813,11 5.5,9.88071187 5.5,8.5 C5.5,7.11928813 6.61928813,6 8,6 C9.38071187,6 10.5,7.11928813 10.5,8.5 C10.5,9.88071187 9.38071187,11 8,11 Z M8,10 C8.82842712,10 9.5,9.32842712 9.5,8.5 C9.5,7.67157288 8.82842712,7 8,7 C7.17157288,7 6.5,7.67157288 6.5,8.5 C6.5,9.32842712 7.17157288,10 8,10 Z",
359
+ "d": `M7.5,3.02242151 L7.5,4 L4.5,2 L7.5,0 L7.5,1.01640228 C7.66526181,1.00552468
360
+ 7.83198572,1 8,1 C12.1421356,1 15.5,4.35786438 15.5,8.5 C15.5,12.6421356
361
+ 12.1421356,16 8,16 C3.85786438,16 0.5,12.6421356 0.5,8.5 C0.5,6.9828355
362
+ 0.950484514,5.5708873 1.72499011,4.39061882 L3.42173231,5.4510827 C2.83944149,6.32371289
363
+ 2.5,7.37221604 2.5,8.5 C2.5,11.5375661 4.96243388,14 8,14 C11.0375661,14 13.5,11.5375661
364
+ 13.5,8.5 C13.5,5.46243388 11.0375661,3 8,3 C7.83145515,3 7.66468102,3.00758131 7.5,3.02242151
365
+ Z M8,11 C6.61928813,11 5.5,9.88071187 5.5,8.5 C5.5,7.11928813 6.61928813,6 8,6 C9.38071187,6
366
+ 10.5,7.11928813 10.5,8.5 C10.5,9.88071187 9.38071187,11 8,11 Z M8,10 C8.82842712,10 9.5,9.32842712
367
+ 9.5,8.5 C9.5,7.67157288 8.82842712,7 8,7 C7.17157288,7 6.5,7.67157288 6.5,8.5 C6.5,9.32842712
368
+ 7.17157288,10 8,10 Z`,
349
369
  "fill": "#293040"
350
370
  }, null)])])]), createVNode("button", {
351
371
  "onClick": onPrev
@@ -362,7 +382,7 @@ var imagePreview = defineComponent({
362
382
  }, [createVNode("polygon", {
363
383
  "fill": "#293040",
364
384
  "fill-rule": "nonzero",
365
- "points": "10.7071068 12.2928932 9.29289322 13.7071068 3.58578644 8 9.29289322 2.29289322 10.7071068 3.70710678 6.41421356 8"
385
+ "points": "10.7071068 12.2928932 9.29289322 13.7071068 3.58578644 8 9.29289322 2.29289322 10.7071068 3.70710678 6.41421356 8"
366
386
  }, null)])])]), createVNode("span", {
367
387
  "class": ns.e("index")
368
388
  }, [index2.value + 1, createTextVNode(":"), props.previewUrlList.length]), createVNode("button", {
@@ -381,7 +401,7 @@ var imagePreview = defineComponent({
381
401
  "fill": "#293040",
382
402
  "fill-rule": "nonzero",
383
403
  "transform": "translate(8.146447, 8.000000) scale(-1, 1) translate(-8.146447, -8.000000) ",
384
- "points": "11.7071068 12.2928932 10.2928932 13.7071068 4.58578644 8 10.2928932 2.29289322 11.7071068 3.70710678 7.41421356 8"
404
+ "points": "11.7071068 12.2928932 10.2928932 13.7071068 4.58578644 8 10.2928932 2.29289322 11.7071068 3.70710678 7.41421356 8"
385
405
  }, null)])])]), createVNode("button", {
386
406
  "onClick": onZoomBest
387
407
  }, [createVNode("svg", {
@@ -394,7 +414,12 @@ var imagePreview = defineComponent({
394
414
  "fill": "none",
395
415
  "fill-rule": "evenodd"
396
416
  }, [createVNode("path", {
397
- "d": "M16,16 L11.429,16 L11.429,15 L14.456,15 L11.006,11.226 L11.652,10.519 L15.086,14.275 L15.086,11 L16,11 L16,16 Z M15.164,1.544 L12.009,4.994 L11.418,4.348 L14.558,0.914 L11.82,0.914 L11.82,0 L16,0 L16,4.571 L15.164,4.571 L15.164,1.544 Z M5,15 L5,16 L0,16 L0,11 L1,11 L1,14.275 L4.756,10.519 L5.463,11.226 L1.689,15 L5,15 Z M4.365,4.994 L0.914,1.544 L0.914,4.571 L3.41060513e-13,4.571 L3.41060513e-13,0 L4.571,0 L4.571,0.914 L1.578,0.914 L5.011,4.348 L4.365,4.994 Z",
417
+ "d": `M16,16 L11.429,16 L11.429,15 L14.456,15 L11.006,11.226 L11.652,10.519 L15.086,14.275
418
+ L15.086,11 L16,11 L16,16 Z M15.164,1.544 L12.009,4.994 L11.418,4.348 L14.558,0.914
419
+ L11.82,0.914 L11.82,0 L16,0 L16,4.571 L15.164,4.571 L15.164,1.544 Z M5,15 L5,16
420
+ L0,16 L0,11 L1,11 L1,14.275 L4.756,10.519 L5.463,11.226 L1.689,15 L5,15 Z M4.365,4.994
421
+ L0.914,1.544 L0.914,4.571 L3.41060513e-13,4.571 L3.41060513e-13,0 L4.571,0 L4.571,0.914
422
+ L1.578,0.914 L5.011,4.348 L4.365,4.994 Z`,
398
423
  "fill": "#293040",
399
424
  "fill-rule": "nonzero"
400
425
  }, null)])])]), createVNode("button", {
@@ -1 +1,26 @@
1
- var X=Object.defineProperty;var Y=(l,e,c)=>e in l?X(l,e,{enumerable:!0,configurable:!0,writable:!0,value:c}):l[e]=c;var i=(l,e,c)=>(Y(l,typeof e!="symbol"?e+"":e,c),c);(function(l,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(l=typeof globalThis!="undefined"?globalThis:l||self,e(l.index={},l.Vue))})(this,function(l,e){"use strict";const c={url:{type:String,default:"",required:!0},previewUrlList:{type:Array,default:()=>[],required:!0},zIndex:{type:Number,required:!1},backDropZIndex:{type:Number,required:!1}};class I{constructor(t,n={}){i(this,"el");i(this,"oTransformX",0);i(this,"oTransformY",0);i(this,"transformX");i(this,"transformY");i(this,"zoom");i(this,"rotate");i(this,"STEP",.25);i(this,"MIN_SCALE",.2);i(this,"MAX_SCALE",2.5);i(this,"TRANSFORMX",0);i(this,"TRANSFORMY",0);i(this,"ZOOM",1);i(this,"ROTATE",0);this.el=t,this.transformX=n.transformX||this.TRANSFORMX,this.transformY=n.transformY||this.TRANSFORMY,this.zoom=n.zoom||this.ZOOM,this.rotate=n.rotate||this.ROTATE,this.handleDefaultDraggable(),this.onDraggable(),this.onMouseWheel()}handleDefaultDraggable(){document.body.ondragstart=()=>(window.event.returnValue=!1,!1)}onDraggable(){this.el.onmousedown=t=>{const n=t.clientX,r=t.clientY;document.onmousemove=s=>{const d=s.clientX-n,m=s.clientY-r;this.transformX=this.oTransformX+d,this.transformY=this.oTransformY+m,this.el.style.cursor="grabbing",this.setPosition()}},document.onmouseup=()=>{document.onmousemove=null,this.oTransformX=this.transformX,this.oTransformY=this.transformY,this.el.style.cursor="grab"}}onMouseWheel(){const t=this.throttle(this.setMouseWheel,100);this.el.onmousewheel=n=>{const r=-n.wheelDelta||n.deltaY||n.detail;t(r)}}throttle(t,n){let r=null;return(...s)=>{r||setTimeout(()=>{r=null,t.apply(this,s)},n)}}setMouseWheel(t){if(t<0){if(this.zoom>=this.MAX_SCALE){this.el.style.cursor="not-allowed";return}this.el.style.cursor="zoom-in",this.setZoomIn(this.STEP)}else{if(this.zoom<=this.MIN_SCALE){this.el.style.cursor="not-allowed";return}this.el.style.cursor="zoom-out",this.setZoomOut(this.STEP)}this.setPosition()}setZoomIn(t=this.STEP){this.zoom=Math.min(this.MAX_SCALE,this.zoom+t),this.setPosition()}setZoomOut(t=this.STEP){this.zoom=Math.max(this.MIN_SCALE,this.zoom-t),this.setPosition()}setZoomBest(){this.reset(),this.setPosition()}setZoomOriginal(){this.reset(),this.setPosition()}setRotate(){this.rotate+=.25,this.setPosition()}reset(){this.transformX=this.TRANSFORMX,this.transformY=this.TRANSFORMY,this.oTransformX=this.transformX,this.oTransformY=this.transformY,this.zoom=this.ZOOM}setPosition(){this.el.style.transform=`translate(${this.transformX}px, ${this.transformY}px) scale(${this.zoom}) rotate(${this.rotate}turn)`}}function f(o,t,n){let r=o;return t&&(r+=`__${t}`),n&&(r+=`--${n}`),r}function Z(o,t=!1){const n=t?`.devui-${o}`:`devui-${o}`;return{b:()=>f(n),e:a=>a?f(n,a):"",m:a=>a?f(n,"",a):"",em:(a,L)=>a&&L?f(n,a,L):""}}var R="",b=e.defineComponent({name:"DImagePreview",props:c,emits:[],setup(o){const t=Z("image-preview");let n=null;const r=e.ref(0),s=e.computed(()=>o.previewUrlList[r.value]),d=o.zIndex?{zIndex:o.zIndex}:{},m=o.backDropZIndex?{zIndex:o.backDropZIndex}:{};function a(){const h=document.querySelector(`.${t.e("main-image")}`);n=new I(h)}function L(){r.value=o.previewUrlList.findIndex(h=>h===o.url)}function g(){r.value=r.value<=0?o.previewUrlList.length-1:r.value-1}function p(){r.value=r.value>=o.previewUrlList.length-1?0:r.value+1}function V(){u.close()}function T(){n.setZoomIn()}function $(){n.setZoomOut()}function D(){n.setRotate()}function A(){n.setZoomBest()}function E(){n.setZoomOriginal()}function k(h){h.defaultPrevented||(h.code==="Escape"?V():h.code==="ArrowLeft"?g():h.code==="ArrowRight"&&p())}function S(){document.addEventListener("keydown",k,!1)}function O(){document.removeEventListener("keydown",k,!1)}return e.onMounted(()=>{L(),a(),S()}),e.onUnmounted(()=>{O()}),()=>e.createVNode(e.Fragment,null,[e.createVNode("div",{class:t.b(),style:d},[e.createVNode("img",{class:t.e("main-image"),src:s.value},null),e.createVNode("button",{class:t.e("close-btn"),onClick:V},[e.createVNode("svg",{width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("polygon",{fill:"#293040","fill-rule":"nonzero",points:"8 6.58578644 12.2426407 2.34314575 13.6568542 3.75735931 9.41421356 8 13.6568542 12.2426407 12.2426407 13.6568542 8 9.41421356 3.75735931 13.6568542 2.34314575 12.2426407 6.58578644 8 2.34314575 3.75735931 3.75735931 2.34314575"},null)])])]),e.createVNode("button",{class:t.e("arrow-left"),onClick:g},[e.createVNode("svg",{width:"18px",height:"18px",viewBox:"0 0 16 16",version:"1.1"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("polygon",{fill:"#293040","fill-rule":"nonzero",points:"10.7071068 12.2928932 9.29289322 13.7071068 3.58578644 8 9.29289322 2.29289322 10.7071068 3.70710678 6.41421356 8"},null)])])]),e.createVNode("button",{class:t.e("arrow-right"),onClick:p},[e.createVNode("svg",{width:"18px",height:"18px",viewBox:"0 0 16 16",version:"1.1"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("polygon",{fill:"#293040","fill-rule":"nonzero",transform:"translate(8.146447, 8.000000) scale(-1, 1) translate(-8.146447, -8.000000) ",points:"11.7071068 12.2928932 10.2928932 13.7071068 4.58578644 8 10.2928932 2.29289322 11.7071068 3.70710678 7.41421356 8"},null)])])]),e.createVNode("div",{class:t.e("toolbar")},[e.createVNode("button",{onClick:T},[e.createVNode("svg",{width:"18px",height:"18px",viewBox:"0 0 16 16"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{fill:"#293040","fill-rule":"nonzero"},[e.createVNode("path",{d:"M6,6 L6,4 L8,4 L8,6 L10,6 L10,8 L8,8 L8,10 L6,10 L6,8 L4,8 L4,6 L6,6 Z M12.6063847,11.1921711 L15.6568542,14.2426407 L14.2426407,15.6568542 L11.1921711,12.6063847 C10.0235906,13.4815965 8.5723351,14 7,14 C3.13400675,14 0,10.8659932 0,7 C0,3.13400675 3.13400675,0 7,0 C10.8659932,0 14,3.13400675 14,7 C14,8.5723351 13.4815965,10.0235906 12.6063847,11.1921711 L12.6063847,11.1921711 Z M7,12 C9.76142375,12 12,9.76142375 12,7 C12,4.23857625 9.76142375,2 7,2 C4.23857625,2 2,4.23857625 2,7 C2,9.76142375 4.23857625,12 7,12 Z"},null)])])])]),e.createVNode("button",{onClick:$},[e.createVNode("svg",{width:"18px",height:"18px",viewBox:"0 0 16 16"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{fill:"#293040","fill-rule":"nonzero"},[e.createVNode("path",{d:"M12.6063847,11.1921711 L15.6568542,14.2426407 L14.2426407,15.6568542 L11.1921711,12.6063847 C10.0235906,13.4815965 8.5723351,14 7,14 C3.13400675,14 0,10.8659932 0,7 C0,3.13400675 3.13400675,0 7,0 C10.8659932,0 14,3.13400675 14,7 C14,8.5723351 13.4815965,10.0235906 12.6063847,11.1921711 L12.6063847,11.1921711 Z M7,12 C9.76142375,12 12,9.76142375 12,7 C12,4.23857625 9.76142375,2 7,2 C4.23857625,2 2,4.23857625 2,7 C2,9.76142375 4.23857625,12 7,12 Z M4,6 L10,6 L10,8 L4,8 L4,6 Z"},null)])])])]),e.createVNode("button",{onClick:D},[e.createVNode("svg",{width:"18px",height:"18px",viewBox:"0 0 16 16",version:"1.1"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("path",{d:"M7.5,3.02242151 L7.5,4 L4.5,2 L7.5,0 L7.5,1.01640228 C7.66526181,1.00552468 7.83198572,1 8,1 C12.1421356,1 15.5,4.35786438 15.5,8.5 C15.5,12.6421356 12.1421356,16 8,16 C3.85786438,16 0.5,12.6421356 0.5,8.5 C0.5,6.9828355 0.950484514,5.5708873 1.72499011,4.39061882 L3.42173231,5.4510827 C2.83944149,6.32371289 2.5,7.37221604 2.5,8.5 C2.5,11.5375661 4.96243388,14 8,14 C11.0375661,14 13.5,11.5375661 13.5,8.5 C13.5,5.46243388 11.0375661,3 8,3 C7.83145515,3 7.66468102,3.00758131 7.5,3.02242151 Z M8,11 C6.61928813,11 5.5,9.88071187 5.5,8.5 C5.5,7.11928813 6.61928813,6 8,6 C9.38071187,6 10.5,7.11928813 10.5,8.5 C10.5,9.88071187 9.38071187,11 8,11 Z M8,10 C8.82842712,10 9.5,9.32842712 9.5,8.5 C9.5,7.67157288 8.82842712,7 8,7 C7.17157288,7 6.5,7.67157288 6.5,8.5 C6.5,9.32842712 7.17157288,10 8,10 Z",fill:"#293040"},null)])])]),e.createVNode("button",{onClick:g},[e.createVNode("svg",{width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("polygon",{fill:"#293040","fill-rule":"nonzero",points:"10.7071068 12.2928932 9.29289322 13.7071068 3.58578644 8 9.29289322 2.29289322 10.7071068 3.70710678 6.41421356 8"},null)])])]),e.createVNode("span",{class:t.e("index")},[r.value+1,e.createTextVNode(":"),o.previewUrlList.length]),e.createVNode("button",{onClick:p},[e.createVNode("svg",{width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("polygon",{fill:"#293040","fill-rule":"nonzero",transform:"translate(8.146447, 8.000000) scale(-1, 1) translate(-8.146447, -8.000000) ",points:"11.7071068 12.2928932 10.2928932 13.7071068 4.58578644 8 10.2928932 2.29289322 11.7071068 3.70710678 7.41421356 8"},null)])])]),e.createVNode("button",{onClick:A},[e.createVNode("svg",{width:"18px",height:"18px",viewBox:"0 0 16 16"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("path",{d:"M16,16 L11.429,16 L11.429,15 L14.456,15 L11.006,11.226 L11.652,10.519 L15.086,14.275 L15.086,11 L16,11 L16,16 Z M15.164,1.544 L12.009,4.994 L11.418,4.348 L14.558,0.914 L11.82,0.914 L11.82,0 L16,0 L16,4.571 L15.164,4.571 L15.164,1.544 Z M5,15 L5,16 L0,16 L0,11 L1,11 L1,14.275 L4.756,10.519 L5.463,11.226 L1.689,15 L5,15 Z M4.365,4.994 L0.914,1.544 L0.914,4.571 L3.41060513e-13,4.571 L3.41060513e-13,0 L4.571,0 L4.571,0.914 L1.578,0.914 L5.011,4.348 L4.365,4.994 Z",fill:"#293040","fill-rule":"nonzero"},null)])])]),e.createVNode("button",{onClick:E},[e.createVNode("span",null,[e.createTextVNode("1:1")])])])]),e.createVNode("div",{class:t.e("bg"),style:m},null)])}});function M(o){return e.createApp(b,o)}class u{static open(t){this.$body=document.body,this.$div=document.createElement("div"),this.$overflow=this.$body.style.overflow,this.$body.appendChild(this.$div),M(t).mount(this.$div),this.$body.style.setProperty("overflow","hidden","important")}static close(){var t,n;(t=this.$body)==null||t.style.setProperty("overflow",this.$overflow),this.$overflow=null,this.$div&&((n=this.$body)==null||n.removeChild(this.$div)),this.$body=null,this.$div=null}}i(u,"$body",null),i(u,"$div",null),i(u,"$overflow","");function x(o){u.open({url:o.url,previewUrlList:o.previewUrlList,zIndex:o.zIndex,backDropZIndex:o.backDropZIndex})}function N(){u.close()}function C(o){return[...o.querySelectorAll("img")].map(r=>{var s;return(s=r.getAttribute("preview-src")||r.getAttribute("src"))!=null?s:""})}function v(o){var r;o.stopPropagation();const t=o.currentTarget,n=o.target;if(((r=n==null?void 0:n.nodeName)==null?void 0:r.toLowerCase())==="img"){const s=C(t),d=n.getAttribute("src");if(!d)return console.error("attribute is not exist");x({url:d,previewUrlList:s,zIndex:t==null?void 0:t.zIndex,backDropZIndex:t==null?void 0:t.backDropZIndex})}}function w(o){o.addEventListener("click",v)}function z(o){o.removeEventListener("click",v)}var y={mounted(o,t){if(!(t==null?void 0:t.value))return w(o);const{custom:n,disableDefault:r}=t.value;n instanceof Object&&(n.open=()=>{const s=C(o);x({url:s==null?void 0:s[0],previewUrlList:s,zIndex:o==null?void 0:o.zIndex,backDropZIndex:o==null?void 0:o.backDropZIndex})},n.close=()=>N()),!r&&w(o)},unmounted(){N()},updated(o,t){var n,r;if(o.zIndex=(n=t==null?void 0:t.value)==null?void 0:n.zIndex,o.backDropZIndex=(r=t==null?void 0:t.value)==null?void 0:r.backDropZIndex,t==null?void 0:t.value){const{value:{disableDefault:s},oldValue:{disableDefault:d}}=t;s!==d&&(s?z(o):w(o))}}},P={title:"ImagePreview \u56FE\u7247\u9884\u89C8",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(o){o.directive("d-image-preview",y),o.config.globalProperties.$imagePreviewService=u}};l.ImagePreviewDirective=y,l.ImagePreviewService=u,l.default=P,l.imagePreviewProps=c,Object.defineProperty(l,"__esModule",{value:!0}),l[Symbol.toStringTag]="Module"});
1
+ var X=Object.defineProperty;var Y=(l,e,c)=>e in l?X(l,e,{enumerable:!0,configurable:!0,writable:!0,value:c}):l[e]=c;var i=(l,e,c)=>(Y(l,typeof e!="symbol"?e+"":e,c),c);(function(l,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(l=typeof globalThis!="undefined"?globalThis:l||self,e(l.index={},l.Vue))})(this,function(l,e){"use strict";const c={url:{type:String,default:"",required:!0},previewUrlList:{type:Array,default:()=>[],required:!0},zIndex:{type:Number,required:!1},backDropZIndex:{type:Number,required:!1}};class I{constructor(t,n={}){i(this,"el");i(this,"oTransformX",0);i(this,"oTransformY",0);i(this,"transformX");i(this,"transformY");i(this,"zoom");i(this,"rotate");i(this,"STEP",.25);i(this,"MIN_SCALE",.2);i(this,"MAX_SCALE",2.5);i(this,"TRANSFORMX",0);i(this,"TRANSFORMY",0);i(this,"ZOOM",1);i(this,"ROTATE",0);this.el=t,this.transformX=n.transformX||this.TRANSFORMX,this.transformY=n.transformY||this.TRANSFORMY,this.zoom=n.zoom||this.ZOOM,this.rotate=n.rotate||this.ROTATE,this.handleDefaultDraggable(),this.onDraggable(),this.onMouseWheel()}handleDefaultDraggable(){document.body.ondragstart=()=>(window.event.returnValue=!1,!1)}onDraggable(){this.el.onmousedown=t=>{const n=t.clientX,r=t.clientY;document.onmousemove=s=>{const d=s.clientX-n,m=s.clientY-r;this.transformX=this.oTransformX+d,this.transformY=this.oTransformY+m,this.el.style.cursor="grabbing",this.setPosition()}},document.onmouseup=()=>{document.onmousemove=null,this.oTransformX=this.transformX,this.oTransformY=this.transformY,this.el.style.cursor="grab"}}onMouseWheel(){const t=this.throttle(this.setMouseWheel,100);this.el.onmousewheel=n=>{const r=-n.wheelDelta||n.deltaY||n.detail;t(r)}}throttle(t,n){let r=null;return(...s)=>{r||setTimeout(()=>{r=null,t.apply(this,s)},n)}}setMouseWheel(t){if(t<0){if(this.zoom>=this.MAX_SCALE){this.el.style.cursor="not-allowed";return}this.el.style.cursor="zoom-in",this.setZoomIn(this.STEP)}else{if(this.zoom<=this.MIN_SCALE){this.el.style.cursor="not-allowed";return}this.el.style.cursor="zoom-out",this.setZoomOut(this.STEP)}this.setPosition()}setZoomIn(t=this.STEP){this.zoom=Math.min(this.MAX_SCALE,this.zoom+t),this.setPosition()}setZoomOut(t=this.STEP){this.zoom=Math.max(this.MIN_SCALE,this.zoom-t),this.setPosition()}setZoomBest(){this.reset(),this.setPosition()}setZoomOriginal(){this.reset(),this.setPosition()}setRotate(){this.rotate+=.25,this.setPosition()}reset(){this.transformX=this.TRANSFORMX,this.transformY=this.TRANSFORMY,this.oTransformX=this.transformX,this.oTransformY=this.transformY,this.zoom=this.ZOOM}setPosition(){this.el.style.transform=`translate(${this.transformX}px, ${this.transformY}px) scale(${this.zoom}) rotate(${this.rotate}turn)`}}function f(o,t,n){let r=o;return t&&(r+=`__${t}`),n&&(r+=`--${n}`),r}function Z(o,t=!1){const n=t?`.devui-${o}`:`devui-${o}`;return{b:()=>f(n),e:a=>a?f(n,a):"",m:a=>a?f(n,"",a):"",em:(a,L)=>a&&L?f(n,a,L):""}}var R="",b=e.defineComponent({name:"DImagePreview",props:c,emits:[],setup(o){const t=Z("image-preview");let n=null;const r=e.ref(0),s=e.computed(()=>o.previewUrlList[r.value]),d=o.zIndex?{zIndex:o.zIndex}:{},m=o.backDropZIndex?{zIndex:o.backDropZIndex}:{};function a(){const h=document.querySelector(`.${t.e("main-image")}`);n=new I(h)}function L(){r.value=o.previewUrlList.findIndex(h=>h===o.url)}function g(){r.value=r.value<=0?o.previewUrlList.length-1:r.value-1}function p(){r.value=r.value>=o.previewUrlList.length-1?0:r.value+1}function V(){u.close()}function T(){n.setZoomIn()}function $(){n.setZoomOut()}function D(){n.setRotate()}function A(){n.setZoomBest()}function E(){n.setZoomOriginal()}function k(h){h.defaultPrevented||(h.code==="Escape"?V():h.code==="ArrowLeft"?g():h.code==="ArrowRight"&&p())}function S(){document.addEventListener("keydown",k,!1)}function O(){document.removeEventListener("keydown",k,!1)}return e.onMounted(()=>{L(),a(),S()}),e.onUnmounted(()=>{O()}),()=>e.createVNode(e.Fragment,null,[e.createVNode("div",{class:t.b(),style:d},[e.createVNode("img",{class:t.e("main-image"),src:s.value},null),e.createVNode("button",{class:t.e("close-btn"),onClick:V},[e.createVNode("svg",{width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("polygon",{fill:"#293040","fill-rule":"nonzero",points:"8 6.58578644 12.2426407 2.34314575 13.6568542 3.75735931 9.41421356 8 13.6568542 12.2426407 12.2426407 13.6568542 8 9.41421356 3.75735931 13.6568542 2.34314575 12.2426407 6.58578644 8 2.34314575 3.75735931 3.75735931 2.34314575"},null)])])]),e.createVNode("button",{class:t.e("arrow-left"),onClick:g},[e.createVNode("svg",{width:"18px",height:"18px",viewBox:"0 0 16 16",version:"1.1"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("polygon",{fill:"#293040","fill-rule":"nonzero",points:"10.7071068 12.2928932 9.29289322 13.7071068 3.58578644 8 9.29289322 2.29289322 10.7071068 3.70710678 6.41421356 8"},null)])])]),e.createVNode("button",{class:t.e("arrow-right"),onClick:p},[e.createVNode("svg",{width:"18px",height:"18px",viewBox:"0 0 16 16",version:"1.1"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("polygon",{fill:"#293040","fill-rule":"nonzero",transform:"translate(8.146447, 8.000000) scale(-1, 1) translate(-8.146447, -8.000000) ",points:"11.7071068 12.2928932 10.2928932 13.7071068 4.58578644 8 10.2928932 2.29289322 11.7071068 3.70710678 7.41421356 8"},null)])])]),e.createVNode("div",{class:t.e("toolbar")},[e.createVNode("button",{onClick:T},[e.createVNode("svg",{width:"18px",height:"18px",viewBox:"0 0 16 16"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{fill:"#293040","fill-rule":"nonzero"},[e.createVNode("path",{d:`M6,6 L6,4 L8,4 L8,6 L10,6 L10,8 L8,8 L8,10 L6,10 L6,8 L4,8 L4,6 L6,6 Z
2
+ M12.6063847,11.1921711 L15.6568542,14.2426407 L14.2426407,15.6568542 L11.1921711,12.6063847
3
+ C10.0235906,13.4815965 8.5723351,14 7,14 C3.13400675,14 0,10.8659932 0,7 C0,3.13400675
4
+ 3.13400675,0 7,0 C10.8659932,0 14,3.13400675 14,7 C14,8.5723351 13.4815965,10.0235906
5
+ 12.6063847,11.1921711 L12.6063847,11.1921711 Z M7,12 C9.76142375,12 12,9.76142375
6
+ 12,7 C12,4.23857625 9.76142375,2 7,2 C4.23857625,2 2,4.23857625 2,7 C2,9.76142375
7
+ 4.23857625,12 7,12 Z`},null)])])])]),e.createVNode("button",{onClick:$},[e.createVNode("svg",{width:"18px",height:"18px",viewBox:"0 0 16 16"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{fill:"#293040","fill-rule":"nonzero"},[e.createVNode("path",{d:`M12.6063847,11.1921711 L15.6568542,14.2426407 L14.2426407,15.6568542
8
+ L11.1921711,12.6063847 C10.0235906,13.4815965 8.5723351,14 7,14 C3.13400675,14 0,10.8659932
9
+ 0,7 C0,3.13400675 3.13400675,0 7,0 C10.8659932,0 14,3.13400675 14,7 C14,8.5723351
10
+ 13.4815965,10.0235906 12.6063847,11.1921711 L12.6063847,11.1921711 Z M7,12 C9.76142375,12
11
+ 12,9.76142375 12,7 C12,4.23857625 9.76142375,2 7,2 C4.23857625,2 2,4.23857625 2,7 C2,9.76142375
12
+ 4.23857625,12 7,12 Z M4,6 L10,6 L10,8 L4,8 L4,6 Z`},null)])])])]),e.createVNode("button",{onClick:D},[e.createVNode("svg",{width:"18px",height:"18px",viewBox:"0 0 16 16",version:"1.1"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("path",{d:`M7.5,3.02242151 L7.5,4 L4.5,2 L7.5,0 L7.5,1.01640228 C7.66526181,1.00552468
13
+ 7.83198572,1 8,1 C12.1421356,1 15.5,4.35786438 15.5,8.5 C15.5,12.6421356
14
+ 12.1421356,16 8,16 C3.85786438,16 0.5,12.6421356 0.5,8.5 C0.5,6.9828355
15
+ 0.950484514,5.5708873 1.72499011,4.39061882 L3.42173231,5.4510827 C2.83944149,6.32371289
16
+ 2.5,7.37221604 2.5,8.5 C2.5,11.5375661 4.96243388,14 8,14 C11.0375661,14 13.5,11.5375661
17
+ 13.5,8.5 C13.5,5.46243388 11.0375661,3 8,3 C7.83145515,3 7.66468102,3.00758131 7.5,3.02242151
18
+ Z M8,11 C6.61928813,11 5.5,9.88071187 5.5,8.5 C5.5,7.11928813 6.61928813,6 8,6 C9.38071187,6
19
+ 10.5,7.11928813 10.5,8.5 C10.5,9.88071187 9.38071187,11 8,11 Z M8,10 C8.82842712,10 9.5,9.32842712
20
+ 9.5,8.5 C9.5,7.67157288 8.82842712,7 8,7 C7.17157288,7 6.5,7.67157288 6.5,8.5 C6.5,9.32842712
21
+ 7.17157288,10 8,10 Z`,fill:"#293040"},null)])])]),e.createVNode("button",{onClick:g},[e.createVNode("svg",{width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("polygon",{fill:"#293040","fill-rule":"nonzero",points:"10.7071068 12.2928932 9.29289322 13.7071068 3.58578644 8 9.29289322 2.29289322 10.7071068 3.70710678 6.41421356 8"},null)])])]),e.createVNode("span",{class:t.e("index")},[r.value+1,e.createTextVNode(":"),o.previewUrlList.length]),e.createVNode("button",{onClick:p},[e.createVNode("svg",{width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("polygon",{fill:"#293040","fill-rule":"nonzero",transform:"translate(8.146447, 8.000000) scale(-1, 1) translate(-8.146447, -8.000000) ",points:"11.7071068 12.2928932 10.2928932 13.7071068 4.58578644 8 10.2928932 2.29289322 11.7071068 3.70710678 7.41421356 8"},null)])])]),e.createVNode("button",{onClick:A},[e.createVNode("svg",{width:"18px",height:"18px",viewBox:"0 0 16 16"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("path",{d:`M16,16 L11.429,16 L11.429,15 L14.456,15 L11.006,11.226 L11.652,10.519 L15.086,14.275
22
+ L15.086,11 L16,11 L16,16 Z M15.164,1.544 L12.009,4.994 L11.418,4.348 L14.558,0.914
23
+ L11.82,0.914 L11.82,0 L16,0 L16,4.571 L15.164,4.571 L15.164,1.544 Z M5,15 L5,16
24
+ L0,16 L0,11 L1,11 L1,14.275 L4.756,10.519 L5.463,11.226 L1.689,15 L5,15 Z M4.365,4.994
25
+ L0.914,1.544 L0.914,4.571 L3.41060513e-13,4.571 L3.41060513e-13,0 L4.571,0 L4.571,0.914
26
+ L1.578,0.914 L5.011,4.348 L4.365,4.994 Z`,fill:"#293040","fill-rule":"nonzero"},null)])])]),e.createVNode("button",{onClick:E},[e.createVNode("span",null,[e.createTextVNode("1:1")])])])]),e.createVNode("div",{class:t.e("bg"),style:m},null)])}});function M(o){return e.createApp(b,o)}class u{static open(t){this.$body=document.body,this.$div=document.createElement("div"),this.$overflow=this.$body.style.overflow,this.$body.appendChild(this.$div),M(t).mount(this.$div),this.$body.style.setProperty("overflow","hidden","important")}static close(){var t,n;(t=this.$body)==null||t.style.setProperty("overflow",this.$overflow),this.$overflow=null,this.$div&&((n=this.$body)==null||n.removeChild(this.$div)),this.$body=null,this.$div=null}}i(u,"$body",null),i(u,"$div",null),i(u,"$overflow","");function x(o){u.open({url:o.url,previewUrlList:o.previewUrlList,zIndex:o.zIndex,backDropZIndex:o.backDropZIndex})}function N(){u.close()}function C(o){return[...o.querySelectorAll("img")].map(r=>{var s;return(s=r.getAttribute("preview-src")||r.getAttribute("src"))!=null?s:""})}function v(o){var r;o.stopPropagation();const t=o.currentTarget,n=o.target;if(((r=n==null?void 0:n.nodeName)==null?void 0:r.toLowerCase())==="img"){const s=C(t),d=n.getAttribute("src");if(!d)return console.error("attribute is not exist");x({url:d,previewUrlList:s,zIndex:t==null?void 0:t.zIndex,backDropZIndex:t==null?void 0:t.backDropZIndex})}}function w(o){o.addEventListener("click",v)}function z(o){o.removeEventListener("click",v)}var y={mounted(o,t){if(!(t==null?void 0:t.value))return w(o);const{custom:n,disableDefault:r}=t.value;n instanceof Object&&(n.open=()=>{const s=C(o);x({url:s==null?void 0:s[0],previewUrlList:s,zIndex:o==null?void 0:o.zIndex,backDropZIndex:o==null?void 0:o.backDropZIndex})},n.close=()=>N()),!r&&w(o)},unmounted(){N()},updated(o,t){var n,r;if(o.zIndex=(n=t==null?void 0:t.value)==null?void 0:n.zIndex,o.backDropZIndex=(r=t==null?void 0:t.value)==null?void 0:r.backDropZIndex,t==null?void 0:t.value){const{value:{disableDefault:s},oldValue:{disableDefault:d}}=t;s!==d&&(s?z(o):w(o))}}},P={title:"ImagePreview \u56FE\u7247\u9884\u89C8",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(o){o.directive("d-image-preview",y),o.config.globalProperties.$imagePreviewService=u}};l.ImagePreviewDirective=y,l.ImagePreviewService=u,l.default=P,l.imagePreviewProps=c,Object.defineProperty(l,"__esModule",{value:!0}),l[Symbol.toStringTag]="Module"});
package/input/index.es.js CHANGED
@@ -6362,9 +6362,17 @@ function WarningIcon() {
6362
6362
  "fill": "none",
6363
6363
  "fill-rule": "evenodd"
6364
6364
  }, [createVNode("polygon", {
6365
- "points": "7.5 1.74501946 1.39184847 13.5954649 7.08947368 14.2207621 13.9973698 13.5954649 10.9383683 5.61273879 8.40084114 1.27624313"
6365
+ "points": "7.5 1.74501946 1.39184847 13.5954649 7.08947368 14.2207621 13.9973698 13.5954649 10.9383683 5.61273879 8.40084114 1.27624313"
6366
6366
  }, null), createVNode("path", {
6367
- "d": "M8.51325441,0.127397589 C8.70423071,0.228333932 8.8605922,0.383286648 8.96244623,0.57254229 L15.8714442,13.4101975 C16.1549662,13.9370117 15.9538562,14.5918482 15.4222523,14.8728158 C15.2642579,14.9563203 15.0879506,15 14.9088903,15 L1.09089441,15 C0.488410063,15 0,14.5159904 0,13.9189343 C0,13.7414873 0.0440768395,13.5667684 0.128340519,13.4101975 L7.03733844,0.57254229 C7.32086049,0.0457280838 7.98165058,-0.153569987 8.51325441,0.127397589 Z M8.87894737,11.2105263 L7.08947368,11.2105263 L7.08947368,13 L8.87894737,13 L8.87894737,11.2105263 Z M8.96842105,4.5 L7,4.5 L7.08947368,9.86842105 L8.87894737,9.86842105 L8.96842105,4.5 Z"
6367
+ "d": `M8.51325441,0.127397589 C8.70423071,0.228333932
6368
+ 8.8605922,0.383286648 8.96244623,0.57254229 L15.8714442,13.4101975
6369
+ C16.1549662,13.9370117 15.9538562,14.5918482 15.4222523,14.8728158
6370
+ C15.2642579,14.9563203 15.0879506,15 14.9088903,15 L1.09089441,15
6371
+ C0.488410063,15 0,14.5159904 0,13.9189343 C0,13.7414873 0.0440768395,13.5667684
6372
+ 0.128340519,13.4101975 L7.03733844,0.57254229 C7.32086049,0.0457280838 7.98165058,-0.153569987
6373
+ 8.51325441,0.127397589 Z M8.87894737,11.2105263 L7.08947368,11.2105263 L7.08947368,13
6374
+ L8.87894737,13 L8.87894737,11.2105263 Z M8.96842105,4.5 L7,4.5 L7.08947368,9.86842105
6375
+ L8.87894737,9.86842105 L8.96842105,4.5 Z`
6368
6376
  }, null)])]);
6369
6377
  }
6370
6378
  function InfoIcon() {
@@ -6385,7 +6393,7 @@ function InfoIcon() {
6385
6393
  }, null), createVNode("g", {
6386
6394
  "stroke-width": "1"
6387
6395
  }, [createVNode("path", {
6388
- "d": "M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z M9,5 L7,5 L7,3 L9,3 L9,5 Z M9,12.6 L7,12.6 L7,6.6 L9,6.6 L9,12.6 Z"
6396
+ "d": "M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z M9,5 L7,5 L7,3 L9,3 L9,5 Z M9,12.6 L7,12.6 L7,6.6 L9,6.6 L9,12.6 Z"
6389
6397
  }, null)])])]);
6390
6398
  }
6391
6399
  function ErrorIcon$1() {
@@ -6406,7 +6414,7 @@ function ErrorIcon$1() {
6406
6414
  "cy": "8",
6407
6415
  "r": "7"
6408
6416
  }, null), createVNode("path", {
6409
- "d": "M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z M9,12.6 L7,12.6 L7,10.6 L9,10.6 L9,12.6 Z M9,9.1 L7,9.1 L6.9,3.1 L9.1,3.1 L9,9.1 Z",
6417
+ "d": "M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z M9,12.6 L7,12.6 L7,10.6 L9,10.6 L9,12.6 Z M9,9.1 L7,9.1 L6.9,3.1 L9.1,3.1 L9,9.1 Z",
6410
6418
  "fill-rule": "nonzero"
6411
6419
  }, null)])]);
6412
6420
  }
@@ -6515,7 +6523,14 @@ function HelpTipsIcon() {
6515
6523
  "fill": "none",
6516
6524
  "fill-rule": "evenodd"
6517
6525
  }, [createVNode("g", null, [createVNode("path", {
6518
- "d": "M8.5,8.95852078 L8.5,11 L7.5,11 L7.5,8.5 C7.5,8.22385763 7.72385763,8 8,8 C9.1045695,8 10,7.1045695 10,6 C10,4.8954305 9.1045695,4 8,4 C6.8954305,4 6,4.8954305 6,6 L5,6 C5,4.34314575 6.34314575,3 8,3 C9.65685425,3 11,4.34314575 11,6 C11,7.48649814 9.91885667,8.72048173 8.5,8.95852078 L8.5,8.95852078 Z M8,16 C3.581722,16 0,12.418278 0,8 C0,3.581722 3.581722,0 8,0 C12.418278,0 16,3.581722 16,8 C16,12.418278 12.418278,16 8,16 Z M8,15 C11.8659932,15 15,11.8659932 15,8 C15,4.13400675 11.8659932,1 8,1 C4.13400675,1 1,4.13400675 1,8 C1,11.8659932 4.13400675,15 8,15 Z M7.5,12 L8.5,12 L8.5,13 L7.5,13 L7.5,12 Z",
6526
+ "d": `M8.5,8.95852078 L8.5,11 L7.5,11 L7.5,8.5 C7.5,8.22385763
6527
+ 7.72385763,8 8,8 C9.1045695,8 10,7.1045695 10,6 C10,4.8954305
6528
+ 9.1045695,4 8,4 C6.8954305,4 6,4.8954305 6,6 L5,6 C5,4.34314575
6529
+ 6.34314575,3 8,3 C9.65685425,3 11,4.34314575 11,6 C11,7.48649814
6530
+ 9.91885667,8.72048173 8.5,8.95852078 L8.5,8.95852078 Z M8,16 C3.581722,16
6531
+ 0,12.418278 0,8 C0,3.581722 3.581722,0 8,0 C12.418278,0 16,3.581722 16,8 C16,12.418278
6532
+ 12.418278,16 8,16 Z M8,15 C11.8659932,15 15,11.8659932 15,8 C15,4.13400675 11.8659932,1 8,1
6533
+ C4.13400675,1 1,4.13400675 1,8 C1,11.8659932 4.13400675,15 8,15 Z M7.5,12 L8.5,12 L8.5,13 L7.5,13 L7.5,12 Z`,
6519
6534
  "fill": "#293040",
6520
6535
  "fill-rule": "nonzero"
6521
6536
  }, null)])])]);
@@ -6535,7 +6550,10 @@ function ErrorIcon() {
6535
6550
  "cy": "8",
6536
6551
  "r": "8"
6537
6552
  }, null), createVNode("polygon", {
6538
- "points": "8.07106781 6.65685425 10.8994949 3.82842712 12.3137085 5.24264069 9.48528137 8.07106781 12.3137085 10.8994949 10.8994949 12.3137085 8.07106781 9.48528137 5.24264069 12.3137085 3.82842712 10.8994949 6.65685425 8.07106781 3.82842712 5.24264069 5.24264069 3.82842712"
6553
+ "points": `8.07106781 6.65685425 10.8994949 3.82842712 12.3137085
6554
+ 5.24264069 9.48528137 8.07106781 12.3137085 10.8994949 10.8994949 12.3137085
6555
+ 8.07106781 9.48528137 5.24264069 12.3137085 3.82842712 10.8994949 6.65685425
6556
+ 8.07106781 3.82842712 5.24264069 5.24264069 3.82842712`
6539
6557
  }, null)])]);
6540
6558
  }
6541
6559
  function SuccessIcon() {
@@ -6553,7 +6571,7 @@ function SuccessIcon() {
6553
6571
  "cy": "8",
6554
6572
  "r": "8"
6555
6573
  }, null), createVNode("polygon", {
6556
- "points": "6.53553391 9.77817459 12.1923882 4.12132034 13.6066017 5.53553391 6.53553391 12.6066017 3 9.07106781 4.41421356 7.65685425 6.53553391 9.77817459"
6574
+ "points": "6.53553391 9.77817459 12.1923882 4.12132034 13.6066017 5.53553391 6.53553391 12.6066017 3 9.07106781 4.41421356 7.65685425 6.53553391 9.77817459"
6557
6575
  }, null)])]);
6558
6576
  }
6559
6577
  function PendingIcon() {
@@ -6568,7 +6586,7 @@ function PendingIcon() {
6568
6586
  "fill": "none",
6569
6587
  "fill-rule": "evenodd"
6570
6588
  }, [createVNode("path", {
6571
- "d": "M8,0 C12.4,0 16,3.6 16,8 C16,12.4 12.4,16 8,16 C3.6,16 0,12.4 0,8 C0,3.6 3.6,0 8,0 Z M8,1 C4.15,1 1,4.15 1,8 C1,11.85 4.15,15 8,15 C11.85,15 15,11.85 15,8 C15,4.15 11.85,1 8,1 Z",
6589
+ "d": "M8,0 C12.4,0 16,3.6 16,8 C16,12.4 12.4,16 8,16 C3.6,16 0,12.4 0,8 C0,3.6 3.6,0 8,0 Z M8,1 C4.15,1 1,4.15 1,8 C1,11.85 4.15,15 8,15 C11.85,15 15,11.85 15,8 C15,4.15 11.85,1 8,1 Z",
6572
6590
  "fill-rule": "nonzero"
6573
6591
  }, null), createVNode("path", {
6574
6592
  "d": "M8,0 C12.4,0 16,3.6 16,8 L15,8 C15,4.15 11.85,1 8,1 L8,0 Z",
@@ -7911,7 +7929,7 @@ defineComponent({
7911
7929
  }, [createVNode(FormLabel, {
7912
7930
  "help-tips": helpTips.value
7913
7931
  }, {
7914
- default: () => [label == null ? void 0 : label.value]
7932
+ default: () => [ctx.slots.label ? ctx.slots.label() : label == null ? void 0 : label.value]
7915
7933
  }), createVNode(FormControl, {
7916
7934
  "feedback-status": feedbackStatus == null ? void 0 : feedbackStatus.value,
7917
7935
  "extra-info": extraInfo.value