bkui-vue 0.0.2-beta.35 → 0.0.2-beta.37

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 (182) hide show
  1. package/dist/index.cjs.js +25 -25
  2. package/dist/index.esm.js +30 -14
  3. package/dist/index.umd.js +44 -44
  4. package/lib/affix/index.js +391 -1
  5. package/lib/alert/index.js +287 -1
  6. package/lib/animate-number/index.js +219 -1
  7. package/lib/backtop/index.js +264 -1
  8. package/lib/badge/index.js +304 -1
  9. package/lib/breadcrumb/index.js +379 -1
  10. package/lib/button/index.js +403 -1
  11. package/lib/card/index.js +369 -1
  12. package/lib/cascader/index.js +2095 -2
  13. package/lib/checkbox/index.js +602 -1
  14. package/lib/code-diff/index.js +5548 -1
  15. package/lib/collapse/index.js +605 -1
  16. package/lib/collapse-transition/index.js +237 -1
  17. package/lib/color-picker/index.js +2735 -1
  18. package/lib/components.js +770 -1
  19. package/lib/config-provider/index.js +377 -1
  20. package/lib/container/index.js +408 -1
  21. package/lib/date-picker/index.js +5576 -1
  22. package/lib/dialog/index.js +1324 -2
  23. package/lib/directives/index.js +1386 -2
  24. package/lib/dist.index.js +179 -1
  25. package/lib/divider/index.js +237 -1
  26. package/lib/dropdown/index.js +455 -1
  27. package/lib/exception/index.js +435 -1
  28. package/lib/fixed-navbar/index.js +222 -1
  29. package/lib/form/index.js +1004 -1
  30. package/lib/hooks.js +133 -1
  31. package/lib/icon/angle-double-down-line.js +541 -1
  32. package/lib/icon/angle-double-left-line.js +541 -1
  33. package/lib/icon/angle-double-left.js +541 -1
  34. package/lib/icon/angle-double-right-line.js +541 -1
  35. package/lib/icon/angle-double-right.js +541 -1
  36. package/lib/icon/angle-double-up-line.js +541 -1
  37. package/lib/icon/angle-down-fill.js +541 -1
  38. package/lib/icon/angle-down-line.js +541 -1
  39. package/lib/icon/angle-down.js +541 -1
  40. package/lib/icon/angle-left.js +541 -1
  41. package/lib/icon/angle-right.js +541 -1
  42. package/lib/icon/angle-up-fill.js +541 -1
  43. package/lib/icon/angle-up.js +541 -1
  44. package/lib/icon/archive-fill.js +541 -1
  45. package/lib/icon/arrows-left.js +541 -1
  46. package/lib/icon/arrows-right.js +541 -1
  47. package/lib/icon/assistant.js +541 -1
  48. package/lib/icon/audio-fill.js +541 -1
  49. package/lib/icon/bk.js +541 -1
  50. package/lib/icon/circle.js +541 -1
  51. package/lib/icon/close-line.js +541 -1
  52. package/lib/icon/close.js +541 -1
  53. package/lib/icon/code.js +541 -1
  54. package/lib/icon/cog-shape.js +541 -1
  55. package/lib/icon/collapse-left.js +541 -1
  56. package/lib/icon/copy-shape.js +541 -1
  57. package/lib/icon/copy.js +541 -1
  58. package/lib/icon/data-shape.js +541 -1
  59. package/lib/icon/del.js +541 -1
  60. package/lib/icon/doc-fill.js +541 -1
  61. package/lib/icon/done.js +541 -1
  62. package/lib/icon/down-shape.js +541 -1
  63. package/lib/icon/down-small.js +541 -1
  64. package/lib/icon/edit-line.js +541 -1
  65. package/lib/icon/ellipsis.js +541 -1
  66. package/lib/icon/enlarge-line.js +541 -1
  67. package/lib/icon/error.js +541 -1
  68. package/lib/icon/excel-fill.js +541 -1
  69. package/lib/icon/exclamation-circle-shape.js +541 -1
  70. package/lib/icon/eye.js +541 -1
  71. package/lib/icon/filliscreen-line.js +541 -1
  72. package/lib/icon/fix-line.js +541 -1
  73. package/lib/icon/fix-shape.js +541 -1
  74. package/lib/icon/folder-open.js +541 -1
  75. package/lib/icon/folder-shape-open.js +541 -1
  76. package/lib/icon/folder-shape.js +541 -1
  77. package/lib/icon/folder.js +541 -1
  78. package/lib/icon/funnel.js +541 -1
  79. package/lib/icon/help-document-fill.js +541 -1
  80. package/lib/icon/help-fill.js +541 -1
  81. package/lib/icon/help.js +541 -1
  82. package/lib/icon/image-fill.js +563 -1
  83. package/lib/icon/img-error.js +563 -1
  84. package/lib/icon/img-placehoulder.js +563 -1
  85. package/lib/icon/index.js +2353 -1
  86. package/lib/icon/info-line.js +563 -1
  87. package/lib/icon/info.js +563 -1
  88. package/lib/icon/left-shape.js +563 -1
  89. package/lib/icon/left-turn-line.js +563 -1
  90. package/lib/icon/narrow-line.js +563 -1
  91. package/lib/icon/original.js +563 -1
  92. package/lib/icon/pdf-fill.js +563 -1
  93. package/lib/icon/play-shape.js +563 -1
  94. package/lib/icon/plus.js +563 -1
  95. package/lib/icon/ppt-fill.js +563 -1
  96. package/lib/icon/qq.js +563 -1
  97. package/lib/icon/right-shape.js +563 -1
  98. package/lib/icon/right-turn-line.js +563 -1
  99. package/lib/icon/search.js +563 -1
  100. package/lib/icon/share.js +563 -1
  101. package/lib/icon/spinner.js +563 -1
  102. package/lib/icon/success.js +563 -1
  103. package/lib/icon/switcher-loading.js +563 -1
  104. package/lib/icon/text-file.js +563 -1
  105. package/lib/icon/text-fill.js +563 -1
  106. package/lib/icon/transfer.js +563 -1
  107. package/lib/icon/tree-application-shape.js +563 -1
  108. package/lib/icon/unfull-screen.js +563 -1
  109. package/lib/icon/unvisible.js +563 -1
  110. package/lib/icon/up-shape.js +563 -1
  111. package/lib/icon/upload.js +563 -1
  112. package/lib/icon/video-fill.js +563 -1
  113. package/lib/icon/warn.js +563 -1
  114. package/lib/icon/weixin-pro.js +563 -1
  115. package/lib/icon/weixin.js +563 -1
  116. package/lib/image/index.js +681 -1
  117. package/lib/index.js +195 -1
  118. package/lib/info-box/index.js +1514 -2
  119. package/lib/input/index.js +1038 -1
  120. package/lib/link/index.js +232 -1
  121. package/lib/loading/index.js +443 -1
  122. package/lib/locale/index.js +489 -1
  123. package/lib/menu/index.js +793 -1
  124. package/lib/message/index.js +1842 -2
  125. package/lib/message/messageConstructor.d.ts +1 -1
  126. package/lib/modal/index.js +407 -1
  127. package/lib/navigation/index.js +439 -1
  128. package/lib/notify/index.js +470 -1
  129. package/lib/overflow-title/index.js +547 -1
  130. package/lib/pagination/index.js +974 -1
  131. package/lib/plugin-popover/index.js +4121 -1
  132. package/lib/plugins/index.js +130 -1
  133. package/lib/pop-confirm/index.js +367 -1
  134. package/lib/popover/content.d.ts +8 -0
  135. package/lib/popover/index.d.ts +12 -0
  136. package/lib/popover/index.js +4127 -1
  137. package/lib/popover/popover.d.ts +7 -0
  138. package/lib/popover/props.d.ts +3 -0
  139. package/lib/popover2/index.js +171 -1
  140. package/lib/preset.js +164 -1
  141. package/lib/process/index.js +1146 -2
  142. package/lib/progress/index.js +495 -1
  143. package/lib/radio/index.js +693 -1
  144. package/lib/rate/index.js +406 -1
  145. package/lib/resize-layout/index.js +499 -1
  146. package/lib/search-select/index.js +3024 -2
  147. package/lib/select/index.d.ts +25 -3
  148. package/lib/select/index.js +2599 -2
  149. package/lib/select/select.d.ts +11 -1
  150. package/lib/shared/index.js +2832 -1
  151. package/lib/sideslider/index.js +1056 -2
  152. package/lib/slider/index.js +1683 -2
  153. package/lib/steps/index.js +1215 -2
  154. package/lib/swiper/index.js +404 -1
  155. package/lib/switcher/index.js +335 -1
  156. package/lib/tab/index.js +935 -1
  157. package/lib/table/index.js +6588 -1
  158. package/lib/table-column/index.js +768 -1
  159. package/lib/tag/index.js +309 -1
  160. package/lib/tag-input/index.d.ts +9 -0
  161. package/lib/tag-input/index.js +1758 -1
  162. package/lib/tag-input/tag-input.d.ts +20 -0
  163. package/lib/tag-input/tag-props.d.ts +3 -0
  164. package/lib/time-picker/index.js +142 -1
  165. package/lib/timeline/index.js +310 -1
  166. package/lib/transfer/index.js +767 -1
  167. package/lib/tree/index.js +2664 -1
  168. package/lib/upload/index.js +3257 -2
  169. package/lib/virtual-render/index.js +806 -1
  170. package/package.json +1 -1
  171. package/lib/cascader/index.js.LICENSE.txt +0 -1
  172. package/lib/dialog/index.js.LICENSE.txt +0 -1
  173. package/lib/directives/index.js.LICENSE.txt +0 -14
  174. package/lib/info-box/index.js.LICENSE.txt +0 -1
  175. package/lib/message/index.js.LICENSE.txt +0 -6
  176. package/lib/process/index.js.LICENSE.txt +0 -1
  177. package/lib/search-select/index.js.LICENSE.txt +0 -1
  178. package/lib/select/index.js.LICENSE.txt +0 -1
  179. package/lib/sideslider/index.js.LICENSE.txt +0 -1
  180. package/lib/slider/index.js.LICENSE.txt +0 -1
  181. package/lib/steps/index.js.LICENSE.txt +0 -1
  182. package/lib/upload/index.js.LICENSE.txt +0 -1
@@ -1 +1,681 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../config-provider"),require("../icon"),require("vue-types"),require("lodash"),require("../directives"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider","../icon","vue-types","lodash","../directives"],t);else{var o="object"==typeof exports?t(require("../shared"),require("vue"),require("../config-provider"),require("../icon"),require("vue-types"),require("lodash"),require("../directives")):t(e["../shared"],e.vue,e["../config-provider"],e["../icon"],e["vue-types"],e.lodash,e["../directives"]);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(self,((e,t,o,r,a,n,i)=>(()=>{"use strict";var l={2717:e=>{e.exports=o},4061:e=>{e.exports=i},6870:e=>{e.exports=r},4212:t=>{t.exports=e},467:e=>{e.exports=n},748:e=>{e.exports=t},210:e=>{e.exports=a}},c={};function s(e){var t=c[e];if(void 0!==t)return t.exports;var o=c[e]={exports:{}};return l[e](o,o.exports,s),o.exports}s.d=(e,t)=>{for(var o in t)s.o(t,o)&&!s.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};return(()=>{s.r(u),s.d(u,{Image:()=>c,ImageViewer:()=>f,default:()=>p});var e,t=s(4212),o=s(748),r=s(2717),a=s(6870),n=s(210);!function(e){e.FILL="fill",e.CONTAIN="contain",e.COVER="cover",e.NONE="none",e.SCALE_DOWN="scale-down"}(e||(e={}));var i={src:t.PropTypes.string.def(""),fallback:t.PropTypes.string.def(""),placeholder:t.PropTypes.any,fit:(0,n.toType)("fit",{}).def(e.FILL),lazy:t.PropTypes.bool,urlList:t.PropTypes.array.def([]),isShowPreviewTitle:t.PropTypes.bool.def(!0),maskClose:t.PropTypes.bool.def(!0),zIndex:t.PropTypes.number.def(2e3)},l={urlList:{type:Array,default:function(){return[]}},zIndex:t.PropTypes.number.def(2e3),initialIndex:t.PropTypes.number.def(0),isShowTitle:t.PropTypes.bool.def(!0),loops:t.PropTypes.bool.def(!0),maskClose:t.PropTypes.bool.def(!0)};const c=(0,o.defineComponent)({name:"Image",props:i,emits:["loaded","error","close","change"],setup:function(e,t){var n=t.emit,i=t.slots,l=(0,o.ref)(!0),c=(0,o.ref)(!0),s=(0,o.ref)(!1),u=(0,o.ref)(""),d=(0,o.ref)("");function v(){}(0,o.watch)((function(){return e.src}),(function(){l.value=!0,c.value=!1,d.value=e.src}));var p=(0,o.computed)((function(){var t;return(null===(t=null==e?void 0:e.urlList)||void 0===t?void 0:t.length)>0}));function m(){document.body.style.overflow=u.value,s.value=!1,n("close")}function g(e){n("change",e)}var b=(0,r.usePrefix)().resolveClassName;return function(){return(0,o.createVNode)("div",{class:"".concat(b("image"))},[l.value?(0,o.createVNode)("div",{class:"".concat(b("image-placeholder"))},[(0,o.createVNode)(a.Spinner,null,null)]):c.value?i.error?"function"==typeof i.error?i.error():i.error:(0,o.createVNode)("div",{class:"".concat(b("image-placeholder"))},[e.fallback?(0,o.createVNode)("img",{src:e.fallback,alt:"图片加载错误"},null):"",(0,o.withDirectives)((0,o.createVNode)("i",{class:"".concat(b("icon")," icon-image-fail")},null),[[(0,o.resolveDirective)("else")]])]):(0,o.createVNode)("img",{src:e.src,onClick:v,style:{objectFit:fit}},null),p.value&&s.value?(0,o.createVNode)(f,{zIndex:e.zIndex,maskClose:e.maskClose,"is-show-title":e.isShowPreviewTitle,"url-list":e.urlList,onClose:m,onChange:g},null):""])}}});var d=s(467),v=s(4061);const f=(0,o.defineComponent)({name:"ImageViewer",directives:{bkTooltips:v.bkTooltips},props:l,emits:["close","change"],setup:function(e,n){var i=n.emit,l=(0,o.effectScope)(),c=(0,o.ref)(),s=(0,o.ref)([]),u=(0,o.ref)(""),v=(0,o.ref)(e.initialIndex),f=(0,o.ref)(!1),p=(0,o.ref)(!1),m=(0,o.shallowRef)({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),g=(0,o.computed)((function(){var t;return(null===(t=null==e?void 0:e.urlList)||void 0===t?void 0:t.length)<2})),b=(0,o.computed)((function(){return 0===v.value})),h=(0,o.computed)((function(){return v.value===e.urlList.length-1})),w=(0,o.computed)((function(){return e.urlList[v.value]})),N=(0,o.computed)((function(){var e=w.value.split("/");return e[e.length-1]})),y=(0,o.computed)((function(){var e=m.value,t=e.scale,o=e.deg,r=e.offsetX,a=e.offsetY,n=e.enableTransition,i=r/t,l=a/t;switch(o%360){case 90:case-270:var c=[l,-i];i=c[0],l=c[1];break;case 180:case-180:var s=[-i,-l];i=s[0],l=s[1];break;case 270:case-90:var d=[-l,i];i=d[0],l=d[1]}var v={transform:"scale(".concat(t,") rotate(").concat(o,"deg) translate(").concat(i,"px, ").concat(l,"px)"),transition:n?"transform .3s":""};return"contain"===u.value&&(v.maxWidth="100%",v.maxHeight="100%"),v})),x=(0,o.computed)((function(){var o=2e3;return e.zIndex?o=e.zIndex:o+=t.bkZIndexManager.getModalNextIndex()||1,{zIndex:o}})),V=(0,d.throttle)((function(e){switch(Number(e.code)){case 27:T();break;case 32:f.value||(u.value="original",m.value={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1});break;case 37:L();break;case 38:I("zoomIn");break;case 39:C();break;case 40:I("zoomOut")}})),k=(0,d.throttle)((function(e){I((e.wheelDelta?e.wheelDelta:-e.detail)>0?"zoomIn":"zoomOut",{zoomRate:1.2,enableTransition:!1})}));function T(){document.removeEventListener("keydown",V),document.removeEventListener("mousewheel",k),l.stop(),i("close")}function L(){if(!b.value||e.loops){var t=e.urlList.length;v.value=(v.value-1+t)%t}}function C(){if(!h.value||e.loops){var t=e.urlList.length;v.value=(v.value+1)%t}}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!f.value){var o=Object.assign({zoomRate:.2,rotateDeg:90,enableTransition:!0},t),r=o.zoomRate,a=o.rotateDeg,n=o.enableTransition;switch(e){case"zoomOut":m.value.scale>.2&&(m.value.scale=Number.parseFloat((m.value.scale-r).toFixed(3)));break;case"zoomIn":m.value.scale<7&&(m.value.scale=Number.parseFloat((m.value.scale+r).toFixed(3)));break;case"clockwise":m.value.deg+=a;break;case"anticlockwise":m.value.deg-=a}m.value.enableTransition=n}}function P(){p.value=!1,f.value=!1}function z(e){p.value=!0,f.value=!1,e.target.alt="加载失败"}function O(e){if(!f.value&&0===e.button&&c.value){m.value.enableTransition=!1;var t=m.value,o=t.offsetX,r=t.offsetY,a=e.pageX,n=e.pageY,i=(0,d.throttle)((function(e){m.value=Object.assign(Object.assign({},m.value),{offsetX:o+e.pageX-a,offsetY:r+e.pageY-n})}));document.addEventListener("mousemove",i),document.addEventListener("mouseup",(function e(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",e)})),e.preventDefault()}}l.run((function(){document.addEventListener("keydown",V),document.addEventListener("mousewheel",k)}));var q=(0,r.usePrefix)().resolveClassName;return function(){return(0,o.createVNode)(o.Teleport,{to:"body"},{default:function(){return[(0,o.createVNode)(o.Transition,null,{default:function(){return[(0,o.createVNode)("div",{tabindex:"-1",ref:"wrapper",class:"".concat(q("image-viewer-wrapper")),style:x.value},[(0,o.createVNode)("div",{class:"".concat(q("image-viewer-mask")),onClick:function(){e.maskClose&&T()}},null),e.isShowTitle&&e.urlList.length?(0,o.createVNode)("div",{class:"".concat(q("image-viewer-header"))},[(0,o.createVNode)("div",null,[N]),(0,o.createVNode)("div",{class:"tc "},[v.value+1,(0,o.createTextVNode)("/"),e.urlList.length]),(0,o.createVNode)("div",{class:"quit-box tr"},[(0,o.createVNode)("div",{class:"quit-tips mr10"},[(0,o.createTextVNode)("ESC 可以退出全屏")]),(0,o.createVNode)("div",{class:"".concat(q("image-viewer-close")),onClick:T},[(0,o.createVNode)(a.Close,null,null)])])]):"",g.value?"":(0,o.createVNode)(o.Fragment,null,[(0,o.createVNode)("div",{onClick:L,class:"".concat(q("image-viewer-btn")," ").concat(q("image-viewer-prev")," ").concat(!e.loops&&b?"is-disabled":"")},[(0,o.createVNode)(a.AngleLeft,null,null)]),(0,o.createVNode)("div",{onClick:C,class:"".concat(q("image-viewer-btn")," ").concat(q("image-viewer-prev")," ").concat(!e.loops&&h?"is-disabled":"")},[(0,o.createVNode)(a.AngleRight,null,null)]),(0,o.createVNode)("div",{class:"".concat(q("image-viewer-actions-inner"))},[(0,o.withDirectives)((0,o.createVNode)(a.AngleLeft,{onClick:function(){return I("zoomOut")}},null),[[(0,o.resolveDirective)("bk-tooltips"),"{content: '提示信息', placement: 'top'}"]]),(0,o.withDirectives)((0,o.createVNode)("i",{class:"",onClick:function(){return I("zoomOut")}},null),[[(0,o.resolveDirective)("bk-tooltips"),"{content: '提示信息', placement: 'top'}"]]),(0,o.withDirectives)((0,o.createVNode)("i",{class:"".concat(q("icon")," icon-narrow-line"),onClick:function(){return I("zoomOut")}},null),[[(0,o.resolveDirective)("bk-tooltips"),"{content: '提示信息', placement: 'top'}"]])])]),(0,o.createVNode)("div",{class:"".concat(q("image-viewer-canvas")," ").concat(e.isShowTitle?q("image-viewer-has-header"):"")},[p.value?(0,o.createVNode)("div",{class:"".concat(q("image-viewer-error"))},[(0,o.createVNode)("div",null,[(0,o.createVNode)("i",{class:"".concat(q("icon")," icon-image-fail")},null)]),(0,o.createVNode)("div",null,[(0,o.createTextVNode)("抱歉,图片加载失败")])]):e.urlList.map((function(e,t){return t===v.value?"":(0,o.createVNode)("img",{key:t,ref:function(e){return s[t]=e},class:"".concat(q("image-viewer-img")),style:y.value,src:e,onLoad:P,onError:z,onMousedown:O},null)}))])])]}})]}})}}}),p=(0,t.withInstall)(c)})(),u})()));
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("../shared"), require("vue"), require("../config-provider"), require("../icon"), require("vue-types"), require("lodash"), require("../directives"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["../shared", "vue", "../config-provider", "../icon", "vue-types", "lodash", "../directives"], factory);
6
+ else {
7
+ var a = typeof exports === 'object' ? factory(require("../shared"), require("vue"), require("../config-provider"), require("../icon"), require("vue-types"), require("lodash"), require("../directives")) : factory(root["../shared"], root["vue"], root["../config-provider"], root["../icon"], root["vue-types"], root["lodash"], root["../directives"]);
8
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
+ }
10
+ })(self, (__WEBPACK_EXTERNAL_MODULE__4212__, __WEBPACK_EXTERNAL_MODULE__748__, __WEBPACK_EXTERNAL_MODULE__2717__, __WEBPACK_EXTERNAL_MODULE__6870__, __WEBPACK_EXTERNAL_MODULE__210__, __WEBPACK_EXTERNAL_MODULE__467__, __WEBPACK_EXTERNAL_MODULE__4061__) => {
11
+ return /******/ (() => { // webpackBootstrap
12
+ /******/ "use strict";
13
+ /******/ var __webpack_modules__ = ({
14
+
15
+ /***/ 2717:
16
+ /***/ ((module) => {
17
+
18
+ module.exports = __WEBPACK_EXTERNAL_MODULE__2717__;
19
+
20
+ /***/ }),
21
+
22
+ /***/ 4061:
23
+ /***/ ((module) => {
24
+
25
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4061__;
26
+
27
+ /***/ }),
28
+
29
+ /***/ 6870:
30
+ /***/ ((module) => {
31
+
32
+ module.exports = __WEBPACK_EXTERNAL_MODULE__6870__;
33
+
34
+ /***/ }),
35
+
36
+ /***/ 4212:
37
+ /***/ ((module) => {
38
+
39
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
40
+
41
+ /***/ }),
42
+
43
+ /***/ 467:
44
+ /***/ ((module) => {
45
+
46
+ module.exports = __WEBPACK_EXTERNAL_MODULE__467__;
47
+
48
+ /***/ }),
49
+
50
+ /***/ 748:
51
+ /***/ ((module) => {
52
+
53
+ module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
54
+
55
+ /***/ }),
56
+
57
+ /***/ 210:
58
+ /***/ ((module) => {
59
+
60
+ module.exports = __WEBPACK_EXTERNAL_MODULE__210__;
61
+
62
+ /***/ })
63
+
64
+ /******/ });
65
+ /************************************************************************/
66
+ /******/ // The module cache
67
+ /******/ var __webpack_module_cache__ = {};
68
+ /******/
69
+ /******/ // The require function
70
+ /******/ function __webpack_require__(moduleId) {
71
+ /******/ // Check if module is in cache
72
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
73
+ /******/ if (cachedModule !== undefined) {
74
+ /******/ return cachedModule.exports;
75
+ /******/ }
76
+ /******/ // Create a new module (and put it into the cache)
77
+ /******/ var module = __webpack_module_cache__[moduleId] = {
78
+ /******/ // no module.id needed
79
+ /******/ // no module.loaded needed
80
+ /******/ exports: {}
81
+ /******/ };
82
+ /******/
83
+ /******/ // Execute the module function
84
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
85
+ /******/
86
+ /******/ // Return the exports of the module
87
+ /******/ return module.exports;
88
+ /******/ }
89
+ /******/
90
+ /************************************************************************/
91
+ /******/ /* webpack/runtime/define property getters */
92
+ /******/ (() => {
93
+ /******/ // define getter functions for harmony exports
94
+ /******/ __webpack_require__.d = (exports, definition) => {
95
+ /******/ for(var key in definition) {
96
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
97
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
98
+ /******/ }
99
+ /******/ }
100
+ /******/ };
101
+ /******/ })();
102
+ /******/
103
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
104
+ /******/ (() => {
105
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
106
+ /******/ })();
107
+ /******/
108
+ /******/ /* webpack/runtime/make namespace object */
109
+ /******/ (() => {
110
+ /******/ // define __esModule on exports
111
+ /******/ __webpack_require__.r = (exports) => {
112
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
113
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
114
+ /******/ }
115
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
116
+ /******/ };
117
+ /******/ })();
118
+ /******/
119
+ /************************************************************************/
120
+ var __webpack_exports__ = {};
121
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
122
+ (() => {
123
+ // ESM COMPAT FLAG
124
+ __webpack_require__.r(__webpack_exports__);
125
+
126
+ // EXPORTS
127
+ __webpack_require__.d(__webpack_exports__, {
128
+ Image: () => (/* reexport */ src_image),
129
+ ImageViewer: () => (/* reexport */ image_viewer),
130
+ "default": () => (/* binding */ src)
131
+ });
132
+
133
+ // EXTERNAL MODULE: external "../shared"
134
+ var external_shared_ = __webpack_require__(4212);
135
+ // EXTERNAL MODULE: external "vue"
136
+ var external_vue_ = __webpack_require__(748);
137
+ // EXTERNAL MODULE: external "../config-provider"
138
+ var external_config_provider_ = __webpack_require__(2717);
139
+ // EXTERNAL MODULE: external "../icon"
140
+ var external_icon_ = __webpack_require__(6870);
141
+ // EXTERNAL MODULE: external "vue-types"
142
+ var external_vue_types_ = __webpack_require__(210);
143
+ ;// CONCATENATED MODULE: ../../packages/image/src/props.ts
144
+
145
+
146
+ var FitEnum;
147
+ (function (FitEnum) {
148
+ FitEnum["FILL"] = "fill";
149
+ FitEnum["CONTAIN"] = "contain";
150
+ FitEnum["COVER"] = "cover";
151
+ FitEnum["NONE"] = "none";
152
+ FitEnum["SCALE_DOWN"] = "scale-down";
153
+ })(FitEnum || (FitEnum = {}));
154
+ var propsImage = {
155
+ src: external_shared_.PropTypes.string.def(''),
156
+ fallback: external_shared_.PropTypes.string.def(''),
157
+ placeholder: external_shared_.PropTypes.any,
158
+ fit: (0,external_vue_types_.toType)('fit', {}).def(FitEnum.FILL),
159
+ lazy: external_shared_.PropTypes.bool,
160
+ urlList: external_shared_.PropTypes.array.def([]),
161
+ isShowPreviewTitle: external_shared_.PropTypes.bool.def(true),
162
+ maskClose: external_shared_.PropTypes.bool.def(true),
163
+ zIndex: external_shared_.PropTypes.number.def(2000)
164
+ };
165
+ var propsImageViever = {
166
+ urlList: {
167
+ type: Array,
168
+ "default": function _default() {
169
+ return [];
170
+ }
171
+ },
172
+ zIndex: external_shared_.PropTypes.number.def(2000),
173
+ initialIndex: external_shared_.PropTypes.number.def(0),
174
+ isShowTitle: external_shared_.PropTypes.bool.def(true),
175
+ loops: external_shared_.PropTypes.bool.def(true),
176
+ maskClose: external_shared_.PropTypes.bool.def(true)
177
+ };
178
+ ;// CONCATENATED MODULE: ../../packages/image/src/image.tsx
179
+
180
+ /*
181
+ * Tencent is pleased to support the open source community by making
182
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
183
+ *
184
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
185
+ *
186
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
187
+ *
188
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
189
+ *
190
+ * ---------------------------------------------------
191
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
192
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
193
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
194
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
195
+ *
196
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
197
+ * the Software.
198
+ *
199
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
200
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
201
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
202
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
203
+ * IN THE SOFTWARE.
204
+ */
205
+
206
+
207
+
208
+
209
+
210
+ /* harmony default export */ const src_image = ((0,external_vue_.defineComponent)({
211
+ name: 'Image',
212
+ props: propsImage,
213
+ emits: ['loaded', 'error', 'close', 'change'],
214
+ setup: function setup(props, _ref) {
215
+ var emit = _ref.emit,
216
+ slots = _ref.slots;
217
+ var loading = (0,external_vue_.ref)(true);
218
+ var hasError = (0,external_vue_.ref)(true);
219
+ var isShowViewer = (0,external_vue_.ref)(false);
220
+ var prevOverflow = (0,external_vue_.ref)('');
221
+ var imageSrc = (0,external_vue_.ref)('');
222
+ function clickHandler() {}
223
+ (0,external_vue_.watch)(function () {
224
+ return props.src;
225
+ }, function () {
226
+ loadImage();
227
+ });
228
+ var preview = (0,external_vue_.computed)(function () {
229
+ var _a;
230
+ return ((_a = props === null || props === void 0 ? void 0 : props.urlList) === null || _a === void 0 ? void 0 : _a.length) > 0;
231
+ });
232
+ function closeViewer() {
233
+ document.body.style.overflow = prevOverflow.value;
234
+ isShowViewer.value = false;
235
+ emit('close');
236
+ }
237
+ function change(val) {
238
+ emit('change', val);
239
+ }
240
+ function loadImage() {
241
+ loading.value = true;
242
+ hasError.value = false;
243
+ imageSrc.value = props.src;
244
+ }
245
+ var _usePrefix = (0,external_config_provider_.usePrefix)(),
246
+ resolveClassName = _usePrefix.resolveClassName;
247
+ return function () {
248
+ function getContent() {
249
+ if (loading.value) {
250
+ return (0,external_vue_.createVNode)("div", {
251
+ "class": "".concat(resolveClassName('image-placeholder'))
252
+ }, [(0,external_vue_.createVNode)(external_icon_.Spinner, null, null)]);
253
+ }
254
+ if (hasError.value) {
255
+ if (slots.error) {
256
+ if (typeof slots.error === 'function') {
257
+ return slots.error();
258
+ }
259
+ return slots.error;
260
+ }
261
+ return (0,external_vue_.createVNode)("div", {
262
+ "class": "".concat(resolveClassName('image-placeholder'))
263
+ }, [props.fallback ? (0,external_vue_.createVNode)("img", {
264
+ "src": props.fallback,
265
+ "alt": "\u56FE\u7247\u52A0\u8F7D\u9519\u8BEF"
266
+ }, null) : '', (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("i", {
267
+ "class": "".concat(resolveClassName('icon'), " icon-image-fail")
268
+ }, null), [[(0,external_vue_.resolveDirective)("else")]])]);
269
+ }
270
+ // @ts-ignore
271
+ return (0,external_vue_.createVNode)("img", {
272
+ "src": props.src,
273
+ "onClick": clickHandler,
274
+ "style": {
275
+ objectFit: fit
276
+ }
277
+ }, null);
278
+ }
279
+ return (0,external_vue_.createVNode)("div", {
280
+ "class": "".concat(resolveClassName('image'))
281
+ }, [getContent(), preview.value && isShowViewer.value ? (0,external_vue_.createVNode)(image_viewer, {
282
+ "zIndex": props.zIndex,
283
+ "maskClose": props.maskClose,
284
+ "is-show-title": props.isShowPreviewTitle,
285
+ "url-list": props.urlList,
286
+ "onClose": closeViewer,
287
+ "onChange": change
288
+ }, null) : '']);
289
+ };
290
+ }
291
+ }));
292
+ // EXTERNAL MODULE: external "lodash"
293
+ var external_lodash_ = __webpack_require__(467);
294
+ // EXTERNAL MODULE: external "../directives"
295
+ var external_directives_ = __webpack_require__(4061);
296
+ ;// CONCATENATED MODULE: ../../packages/image/src/image-viewer.tsx
297
+
298
+ /*
299
+ * Tencent is pleased to support the open source community by making
300
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
301
+ *
302
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
303
+ *
304
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
305
+ *
306
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
307
+ *
308
+ * ---------------------------------------------------
309
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
310
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
311
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
312
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
313
+ *
314
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
315
+ * the Software.
316
+ *
317
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
318
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
319
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
320
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
321
+ * IN THE SOFTWARE.
322
+ */
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+ /* harmony default export */ const image_viewer = ((0,external_vue_.defineComponent)({
331
+ name: 'ImageViewer',
332
+ directives: {
333
+ bkTooltips: external_directives_.bkTooltips
334
+ },
335
+ props: propsImageViever,
336
+ emits: ['close', 'change'],
337
+ setup: function setup(props, _ref) {
338
+ var emit = _ref.emit;
339
+ var scopeEventListener = (0,external_vue_.effectScope)();
340
+ // @ts-ignore
341
+ var wrapper = (0,external_vue_.ref)();
342
+ var imgRefs = (0,external_vue_.ref)([]);
343
+ var mode = (0,external_vue_.ref)('');
344
+ var index = (0,external_vue_.ref)(props.initialIndex);
345
+ var loading = (0,external_vue_.ref)(false);
346
+ var error = (0,external_vue_.ref)(false);
347
+ var transform = (0,external_vue_.shallowRef)({
348
+ scale: 1,
349
+ deg: 0,
350
+ offsetX: 0,
351
+ offsetY: 0,
352
+ enableTransition: false
353
+ });
354
+ var isSingle = (0,external_vue_.computed)(function () {
355
+ var _a;
356
+ return ((_a = props === null || props === void 0 ? void 0 : props.urlList) === null || _a === void 0 ? void 0 : _a.length) < 2;
357
+ });
358
+ var isFirst = (0,external_vue_.computed)(function () {
359
+ return index.value === 0;
360
+ });
361
+ var isLast = (0,external_vue_.computed)(function () {
362
+ return index.value === props.urlList.length - 1;
363
+ });
364
+ var currentImg = (0,external_vue_.computed)(function () {
365
+ return props.urlList[index.value];
366
+ });
367
+ var currentName = (0,external_vue_.computed)(function () {
368
+ var arr = currentImg.value.split('/');
369
+ return arr[arr.length - 1];
370
+ });
371
+ var imgStyle = (0,external_vue_.computed)(function () {
372
+ var _transform$value = transform.value,
373
+ scale = _transform$value.scale,
374
+ deg = _transform$value.deg,
375
+ offsetX = _transform$value.offsetX,
376
+ offsetY = _transform$value.offsetY,
377
+ enableTransition = _transform$value.enableTransition;
378
+ var translateX = offsetX / scale;
379
+ var translateY = offsetY / scale;
380
+ switch (deg % 360) {
381
+ case 90:
382
+ case -270:
383
+ ;
384
+ var _ref2 = [translateY, -translateX];
385
+ translateX = _ref2[0];
386
+ translateY = _ref2[1];
387
+ break;
388
+ case 180:
389
+ case -180:
390
+ ;
391
+ var _ref3 = [-translateX, -translateY];
392
+ translateX = _ref3[0];
393
+ translateY = _ref3[1];
394
+ break;
395
+ case 270:
396
+ case -90:
397
+ ;
398
+ var _ref4 = [-translateY, translateX];
399
+ translateX = _ref4[0];
400
+ translateY = _ref4[1];
401
+ break;
402
+ }
403
+ var style = {
404
+ transform: "scale(".concat(scale, ") rotate(").concat(deg, "deg) translate(").concat(translateX, "px, ").concat(translateY, "px)"),
405
+ transition: enableTransition ? 'transform .3s' : ''
406
+ };
407
+ if (mode.value === 'contain') {
408
+ style.maxWidth = '100%';
409
+ style.maxHeight = '100%';
410
+ }
411
+ return style;
412
+ });
413
+ var wrapStyles = (0,external_vue_.computed)(function () {
414
+ var zIndex = 2000;
415
+ if (props.zIndex) {
416
+ zIndex = props.zIndex;
417
+ } else {
418
+ zIndex += external_shared_.bkZIndexManager.getModalNextIndex() || 1;
419
+ }
420
+ return {
421
+ zIndex: zIndex
422
+ };
423
+ });
424
+ var keydownHandler = (0,external_lodash_.throttle)(function (e) {
425
+ switch (Number(e.code)) {
426
+ // ESC
427
+ case 27:
428
+ hide();
429
+ break;
430
+ // SPACE
431
+ case 32:
432
+ toggleMode('original');
433
+ break;
434
+ // LEFT_ARROW
435
+ case 37:
436
+ prev();
437
+ break;
438
+ // UP_ARROW
439
+ case 38:
440
+ handleActions('zoomIn');
441
+ break;
442
+ // RIGHT_ARROW
443
+ case 39:
444
+ next();
445
+ break;
446
+ // DOWN_ARROW
447
+ case 40:
448
+ handleActions('zoomOut');
449
+ break;
450
+ }
451
+ });
452
+ var mousewheelHandler = (0,external_lodash_.throttle)(function (e /* TODO: wheelDelta is deprecated */) {
453
+ var delta = e.wheelDelta ? e.wheelDelta : -e.detail;
454
+ if (delta > 0) {
455
+ handleActions('zoomIn', {
456
+ zoomRate: 1.2,
457
+ enableTransition: false
458
+ });
459
+ } else {
460
+ handleActions('zoomOut', {
461
+ zoomRate: 1.2,
462
+ enableTransition: false
463
+ });
464
+ }
465
+ });
466
+ scopeEventListener.run(function () {
467
+ document.addEventListener('keydown', keydownHandler);
468
+ document.addEventListener('mousewheel', mousewheelHandler);
469
+ });
470
+ function hide() {
471
+ document.removeEventListener('keydown', keydownHandler);
472
+ document.removeEventListener('mousewheel', mousewheelHandler);
473
+ scopeEventListener.stop();
474
+ emit('close');
475
+ }
476
+ function toggleMode(modeNames) {
477
+ if (loading.value) return;
478
+ mode.value = modeNames;
479
+ reset();
480
+ }
481
+ function reset() {
482
+ transform.value = {
483
+ scale: 1,
484
+ deg: 0,
485
+ offsetX: 0,
486
+ offsetY: 0,
487
+ enableTransition: false
488
+ };
489
+ }
490
+ function prev() {
491
+ if (isFirst.value && !props.loops) return;
492
+ var len = props.urlList.length;
493
+ index.value = (index.value - 1 + len) % len;
494
+ }
495
+ function next() {
496
+ if (isLast.value && !props.loops) return;
497
+ var len = props.urlList.length;
498
+ index.value = (index.value + 1) % len;
499
+ }
500
+ function handleActions(action) {
501
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
502
+ if (loading.value) return;
503
+ var _Object$assign = Object.assign({
504
+ zoomRate: 0.2,
505
+ rotateDeg: 90,
506
+ enableTransition: true
507
+ }, options),
508
+ zoomRate = _Object$assign.zoomRate,
509
+ rotateDeg = _Object$assign.rotateDeg,
510
+ enableTransition = _Object$assign.enableTransition;
511
+ switch (action) {
512
+ case 'zoomOut':
513
+ if (transform.value.scale > 0.2) {
514
+ transform.value.scale = Number.parseFloat((transform.value.scale - zoomRate).toFixed(3));
515
+ }
516
+ break;
517
+ case 'zoomIn':
518
+ if (transform.value.scale < 7) {
519
+ transform.value.scale = Number.parseFloat((transform.value.scale + zoomRate).toFixed(3));
520
+ }
521
+ break;
522
+ case 'clockwise':
523
+ transform.value.deg += rotateDeg;
524
+ break;
525
+ case 'anticlockwise':
526
+ transform.value.deg -= rotateDeg;
527
+ break;
528
+ }
529
+ transform.value.enableTransition = enableTransition;
530
+ }
531
+ function handleImgLoad() {
532
+ error.value = false;
533
+ loading.value = false;
534
+ }
535
+ function handleImgError(e) {
536
+ error.value = true;
537
+ loading.value = false;
538
+ e.target.alt = '加载失败';
539
+ }
540
+ function handleMouseDown(e) {
541
+ if (loading.value || e.button !== 0 || !wrapper.value) return;
542
+ transform.value.enableTransition = false;
543
+ var _transform$value2 = transform.value,
544
+ offsetX = _transform$value2.offsetX,
545
+ offsetY = _transform$value2.offsetY;
546
+ var startX = e.pageX;
547
+ var startY = e.pageY;
548
+ var mousemove = (0,external_lodash_.throttle)(function (ev) {
549
+ transform.value = Object.assign(Object.assign({}, transform.value), {
550
+ offsetX: offsetX + ev.pageX - startX,
551
+ offsetY: offsetY + ev.pageY - startY
552
+ });
553
+ });
554
+ var mouseup = function mouseup() {
555
+ document.removeEventListener('mousemove', mousemove);
556
+ document.removeEventListener('mouseup', mouseup);
557
+ };
558
+ document.addEventListener('mousemove', mousemove);
559
+ document.addEventListener('mouseup', mouseup);
560
+ e.preventDefault();
561
+ }
562
+ var _usePrefix = (0,external_config_provider_.usePrefix)(),
563
+ resolveClassName = _usePrefix.resolveClassName;
564
+ return function () {
565
+ return (0,external_vue_.createVNode)(external_vue_.Teleport, {
566
+ "to": "body"
567
+ }, {
568
+ "default": function _default() {
569
+ return [(0,external_vue_.createVNode)(external_vue_.Transition, null, {
570
+ "default": function _default() {
571
+ return [(0,external_vue_.createVNode)("div", {
572
+ "tabindex": "-1",
573
+ "ref": "wrapper",
574
+ "class": "".concat(resolveClassName('image-viewer-wrapper')),
575
+ "style": wrapStyles.value
576
+ }, [(0,external_vue_.createVNode)("div", {
577
+ "class": "".concat(resolveClassName('image-viewer-mask')),
578
+ "onClick": function onClick() {
579
+ props.maskClose && hide();
580
+ }
581
+ }, null), props.isShowTitle && props.urlList.length ? (0,external_vue_.createVNode)("div", {
582
+ "class": "".concat(resolveClassName('image-viewer-header'))
583
+ }, [(0,external_vue_.createVNode)("div", null, [currentName]), (0,external_vue_.createVNode)("div", {
584
+ "class": "tc "
585
+ }, [index.value + 1, (0,external_vue_.createTextVNode)("/"), props.urlList.length]), (0,external_vue_.createVNode)("div", {
586
+ "class": "quit-box tr"
587
+ }, [(0,external_vue_.createVNode)("div", {
588
+ "class": "quit-tips mr10"
589
+ }, [(0,external_vue_.createTextVNode)("ESC \u53EF\u4EE5\u9000\u51FA\u5168\u5C4F")]), (0,external_vue_.createVNode)("div", {
590
+ "class": "".concat(resolveClassName('image-viewer-close')),
591
+ "onClick": hide
592
+ }, [(0,external_vue_.createVNode)(external_icon_.Close, null, null)])])]) : '', !isSingle.value ? (0,external_vue_.createVNode)(external_vue_.Fragment, null, [(0,external_vue_.createVNode)("div", {
593
+ "onClick": prev,
594
+ "class": "".concat(resolveClassName('image-viewer-btn'), " ").concat(resolveClassName('image-viewer-prev'), " ").concat(!props.loops && isFirst ? 'is-disabled' : '')
595
+ }, [(0,external_vue_.createVNode)(external_icon_.AngleLeft, null, null)]), (0,external_vue_.createVNode)("div", {
596
+ "onClick": next,
597
+ "class": "".concat(resolveClassName('image-viewer-btn'), " ").concat(resolveClassName('image-viewer-prev'), " ").concat(!props.loops && isLast ? 'is-disabled' : '')
598
+ }, [(0,external_vue_.createVNode)(external_icon_.AngleRight, null, null)]), (0,external_vue_.createVNode)("div", {
599
+ "class": "".concat(resolveClassName('image-viewer-actions-inner'))
600
+ }, [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)(external_icon_.AngleLeft, {
601
+ "onClick": function onClick() {
602
+ return handleActions('zoomOut');
603
+ }
604
+ }, null), [[(0,external_vue_.resolveDirective)("bk-tooltips"), "{content: '\u63D0\u793A\u4FE1\u606F', placement: 'top'}"]]), (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("i", {
605
+ "class": "",
606
+ "onClick": function onClick() {
607
+ return handleActions('zoomOut');
608
+ }
609
+ }, null), [[(0,external_vue_.resolveDirective)("bk-tooltips"), "{content: '\u63D0\u793A\u4FE1\u606F', placement: 'top'}"]]), (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("i", {
610
+ "class": "".concat(resolveClassName('icon'), " icon-narrow-line"),
611
+ "onClick": function onClick() {
612
+ return handleActions('zoomOut');
613
+ }
614
+ }, null), [[(0,external_vue_.resolveDirective)("bk-tooltips"), "{content: '\u63D0\u793A\u4FE1\u606F', placement: 'top'}"]])])]) : '', (0,external_vue_.createVNode)("div", {
615
+ "class": "".concat(resolveClassName('image-viewer-canvas'), " ").concat(props.isShowTitle ? resolveClassName('image-viewer-has-header') : '')
616
+ }, [error.value ? (0,external_vue_.createVNode)("div", {
617
+ "class": "".concat(resolveClassName('image-viewer-error'))
618
+ }, [(0,external_vue_.createVNode)("div", null, [(0,external_vue_.createVNode)("i", {
619
+ "class": "".concat(resolveClassName('icon'), " icon-image-fail")
620
+ }, null)]), (0,external_vue_.createVNode)("div", null, [(0,external_vue_.createTextVNode)("\u62B1\u6B49\uFF0C\u56FE\u7247\u52A0\u8F7D\u5931\u8D25")])]) : props.urlList.map(function (url, i) {
621
+ if (i === index.value) {
622
+ return '';
623
+ }
624
+ return (0,external_vue_.createVNode)("img", {
625
+ "key": i,
626
+ "ref": function ref(el) {
627
+ return imgRefs[i] = el;
628
+ },
629
+ "class": "".concat(resolveClassName('image-viewer-img')),
630
+ "style": imgStyle.value,
631
+ "src": url,
632
+ "onLoad": handleImgLoad,
633
+ "onError": handleImgError,
634
+ "onMousedown": handleMouseDown
635
+ }, null);
636
+ })])])];
637
+ }
638
+ })];
639
+ }
640
+ });
641
+ };
642
+ }
643
+ }));
644
+ ;// CONCATENATED MODULE: ../../packages/image/src/index.ts
645
+ /*
646
+ * Tencent is pleased to support the open source community by making
647
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
648
+ *
649
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
650
+ *
651
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
652
+ *
653
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
654
+ *
655
+ * ---------------------------------------------------
656
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
657
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
658
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
659
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
660
+ *
661
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
662
+ * the Software.
663
+ *
664
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
665
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
666
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
667
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
668
+ * IN THE SOFTWARE.
669
+ */
670
+
671
+
672
+
673
+
674
+ var BkImage = (0,external_shared_.withInstall)(src_image);
675
+ /* harmony default export */ const src = (BkImage);
676
+ })();
677
+
678
+ /******/ return __webpack_exports__;
679
+ /******/ })()
680
+ ;
681
+ });