bkui-vue 0.0.2-table-refactor.8 → 0.0.3-beta.1
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.
- package/dist/index.cjs.js +135 -161
- package/dist/index.esm.js +17059 -19431
- package/dist/index.umd.js +135 -161
- package/dist/locale/en.esm.js +1 -1
- package/dist/locale/en.esm.js.map +1 -1
- package/dist/locale/en.umd.js +1 -1
- package/dist/locale/en.umd.js.map +1 -1
- package/dist/locale/zh-cn.esm.js +1 -1
- package/dist/locale/zh-cn.esm.js.map +1 -1
- package/dist/locale/zh-cn.umd.js +1 -1
- package/dist/locale/zh-cn.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/affix.variable.css +6 -2
- package/lib/affix/index.js +321 -1
- package/lib/alert/alert.variable.css +6 -2
- package/lib/alert/index.js +214 -1
- package/lib/animate-number/index.js +155 -1
- package/lib/backtop/backtop.variable.css +6 -2
- package/lib/backtop/index.js +188 -1
- package/lib/badge/badge.css +8 -2
- package/lib/badge/badge.less +8 -4
- package/lib/badge/badge.variable.css +14 -4
- package/lib/badge/index.js +235 -1
- package/lib/breadcrumb/breadcrumb.variable.css +6 -2
- package/lib/breadcrumb/index.js +309 -1
- package/lib/button/button-group.d.ts +2 -2
- package/lib/button/button.css +10 -7
- package/lib/button/button.d.ts +1 -1
- package/lib/button/button.less +98 -93
- package/lib/button/button.variable.css +24 -17
- package/lib/button/index.d.ts +5 -5
- package/lib/button/index.js +321 -1
- package/lib/card/card.css +7 -7
- package/lib/card/card.less +7 -7
- package/lib/card/card.variable.css +13 -9
- package/lib/card/index.js +285 -1
- package/lib/cascader/cascader-panel.d.ts +1 -0
- package/lib/cascader/cascader.css +3 -3
- package/lib/cascader/cascader.d.ts +1 -0
- package/lib/cascader/cascader.less +4 -6
- package/lib/cascader/cascader.variable.css +9 -5
- package/lib/cascader/index.d.ts +4 -0
- package/lib/cascader/index.js +2053 -2
- package/lib/checkbox/checkbox.css +13 -1
- package/lib/checkbox/checkbox.d.ts +13 -10
- package/lib/checkbox/checkbox.less +15 -1
- package/lib/checkbox/checkbox.variable.css +19 -3
- package/lib/checkbox/common.d.ts +1 -0
- package/lib/checkbox/index.d.ts +28 -19
- package/lib/checkbox/index.js +569 -1
- package/lib/code-diff/code-diff.variable.css +6 -2
- package/lib/code-diff/index.js +5501 -1
- package/lib/collapse/collapse.variable.css +6 -2
- package/lib/collapse/index.js +570 -1
- package/lib/collapse-transition/collapse-transition.variable.css +6 -2
- package/lib/collapse-transition/index.js +177 -1
- package/lib/color-picker/color-picker.variable.css +6 -2
- package/lib/color-picker/index.js +2665 -1
- package/lib/components.js +530 -1
- package/lib/config-provider/config-provider.d.ts +18 -0
- package/lib/config-provider/config-provider.variable.css +6 -2
- package/lib/config-provider/index.d.ts +24 -0
- package/lib/config-provider/index.js +365 -1
- package/lib/config-provider/token.d.ts +6 -0
- package/lib/container/container.variable.css +6 -2
- package/lib/container/index.js +391 -1
- package/lib/date-picker/common.d.ts +2 -0
- package/lib/date-picker/date-picker.d.ts +3 -1
- package/lib/date-picker/date-picker.variable.css +6 -2
- package/lib/date-picker/index.d.ts +9 -3
- package/lib/date-picker/index.js +5629 -1
- package/lib/date-picker/panel/date.d.ts +2 -2
- package/lib/date-picker/panel/time-range.d.ts +17 -0
- package/lib/date-picker/panel/time.d.ts +17 -1
- package/lib/date-picker/time-picker.d.ts +3 -1
- package/lib/dialog/dialog.css +7 -6
- package/lib/dialog/dialog.less +7 -6
- package/lib/dialog/dialog.variable.css +13 -8
- package/lib/dialog/index.js +971 -2
- package/lib/directives/index.js +1387 -2
- package/lib/dist.index.js +87 -1
- package/lib/divider/divider.variable.css +6 -2
- package/lib/divider/index.js +169 -1
- package/lib/dropdown/dropdown.css +1 -1
- package/lib/dropdown/dropdown.variable.css +7 -3
- package/lib/dropdown/index.js +369 -1
- package/lib/exception/exception.variable.css +6 -2
- package/lib/exception/index.js +385 -1
- package/lib/fixed-navbar/fixed-navbar.variable.css +6 -2
- package/lib/fixed-navbar/index.js +154 -1
- package/lib/form/form.css +2 -1
- package/lib/form/form.less +3 -2
- package/lib/form/form.variable.css +8 -3
- package/lib/form/index.js +952 -1
- package/lib/hooks.js +73 -1
- package/lib/icon/angle-double-down-line.js +191 -1
- package/lib/icon/angle-double-left-line.js +191 -1
- package/lib/icon/angle-double-left.js +191 -1
- package/lib/icon/angle-double-right-line.js +191 -1
- package/lib/icon/angle-double-right.js +191 -1
- package/lib/icon/angle-double-up-line.js +191 -1
- package/lib/icon/angle-down-fill.js +191 -1
- package/lib/icon/angle-down-line.js +191 -1
- package/lib/icon/angle-down.js +191 -1
- package/lib/icon/angle-left.js +191 -1
- package/lib/icon/angle-right.js +191 -1
- package/lib/icon/angle-up-fill.js +191 -1
- package/lib/icon/angle-up.js +191 -1
- package/lib/icon/archive-fill.js +191 -1
- package/lib/icon/arrows-left.js +191 -1
- package/lib/icon/arrows-right.js +191 -1
- package/lib/icon/assistant.js +191 -1
- package/lib/icon/audio-fill.js +191 -1
- package/lib/icon/bk.js +191 -1
- package/lib/icon/circle.js +191 -1
- package/lib/icon/close-line.js +191 -1
- package/lib/icon/close.js +191 -1
- package/lib/icon/code.js +191 -1
- package/lib/icon/cog-shape.js +191 -1
- package/lib/icon/collapse-left.js +191 -1
- package/lib/icon/copy-shape.js +191 -1
- package/lib/icon/copy.js +191 -1
- package/lib/icon/data-shape.js +191 -1
- package/lib/icon/del.js +191 -1
- package/lib/icon/doc-fill.js +191 -1
- package/lib/icon/done.js +191 -1
- package/lib/icon/down-shape.js +191 -1
- package/lib/icon/down-small.js +191 -1
- package/lib/icon/edit-line.js +191 -1
- package/lib/icon/ellipsis.js +191 -1
- package/lib/icon/enlarge-line.js +191 -1
- package/lib/icon/error.js +191 -1
- package/lib/icon/excel-fill.js +191 -1
- package/lib/icon/exclamation-circle-shape.js +191 -1
- package/lib/icon/eye.js +191 -1
- package/lib/icon/filliscreen-line.js +191 -1
- package/lib/icon/fix-line.js +191 -1
- package/lib/icon/fix-shape.js +191 -1
- package/lib/icon/folder-open.js +191 -1
- package/lib/icon/folder-shape-open.js +191 -1
- package/lib/icon/folder-shape.js +191 -1
- package/lib/icon/folder.js +191 -1
- package/lib/icon/funnel.js +191 -1
- package/lib/icon/help-document-fill.js +191 -1
- package/lib/icon/help-fill.js +191 -1
- package/lib/icon/help.js +191 -1
- package/lib/icon/image-fill.js +276 -1
- package/lib/icon/img-error.js +276 -1
- package/lib/icon/img-placehoulder.js +276 -1
- package/lib/icon/index.d.ts +1 -0
- package/lib/icon/index.js +2432 -1
- package/lib/icon/info-line.js +276 -1
- package/lib/icon/info.js +276 -1
- package/lib/icon/left-shape.js +276 -1
- package/lib/icon/left-turn-line.js +276 -1
- package/lib/icon/loading.d.ts +4 -0
- package/lib/icon/loading.js +276 -0
- package/lib/icon/narrow-line.js +276 -1
- package/lib/icon/original.js +276 -1
- package/lib/icon/pdf-fill.js +276 -1
- package/lib/icon/play-shape.js +276 -1
- package/lib/icon/plus.js +276 -1
- package/lib/icon/ppt-fill.js +276 -1
- package/lib/icon/qq.js +276 -1
- package/lib/icon/right-shape.js +276 -1
- package/lib/icon/right-turn-line.js +276 -1
- package/lib/icon/search.js +276 -1
- package/lib/icon/share.js +276 -1
- package/lib/icon/spinner.js +276 -1
- package/lib/icon/success.js +276 -1
- package/lib/icon/switcher-loading.js +276 -1
- package/lib/icon/text-file.js +276 -1
- package/lib/icon/text-fill.js +276 -1
- package/lib/icon/transfer.js +276 -1
- package/lib/icon/tree-application-shape.js +276 -1
- package/lib/icon/unfull-screen.js +276 -1
- package/lib/icon/unvisible.js +276 -1
- package/lib/icon/up-shape.js +276 -1
- package/lib/icon/upload.js +276 -1
- package/lib/icon/video-fill.js +276 -1
- package/lib/icon/warn.js +276 -1
- package/lib/icon/weixin-pro.js +276 -1
- package/lib/icon/weixin.js +276 -1
- package/lib/image/image-viewer.variable.css +6 -2
- package/lib/image/image.variable.css +6 -2
- package/lib/image/index.js +641 -1
- package/lib/index.js +97 -1
- package/lib/info-box/index.js +1161 -2
- package/lib/info-box/info-box.d.ts +4 -0
- package/lib/info-box/info-box.variable.css +6 -2
- package/lib/input/index.d.ts +4 -4
- package/lib/input/index.js +1233 -2
- package/lib/input/input.css +21 -5
- package/lib/input/input.d.ts +3 -3
- package/lib/input/input.less +19 -0
- package/lib/input/input.variable.css +27 -7
- package/lib/link/index.js +160 -1
- package/lib/link/link.variable.css +6 -2
- package/lib/loading/index.d.ts +3 -3
- package/lib/loading/index.js +381 -1
- package/lib/loading/loading.css +9 -9
- package/lib/loading/loading.d.ts +1 -1
- package/lib/loading/loading.less +14 -9
- package/lib/loading/loading.variable.css +15 -11
- package/lib/locale/index.js +477 -1
- package/lib/locale/lang/en.d.ts +6 -0
- package/lib/menu/index.js +724 -1
- package/lib/menu/menu.variable.css +6 -2
- package/lib/menu/submenu.variable.css +6 -2
- package/lib/message/index.js +1795 -2
- package/lib/message/message.variable.css +6 -2
- package/lib/modal/index.js +396 -1
- package/lib/modal/modal.variable.css +6 -2
- package/lib/navigation/index.js +367 -1
- package/lib/navigation/navigation.variable.css +6 -2
- package/lib/notify/index.js +397 -1
- package/lib/notify/notify.css +6 -6
- package/lib/notify/notify.less +6 -6
- package/lib/notify/notify.variable.css +12 -8
- package/lib/overflow-title/components/overflow-title.d.ts +0 -1
- package/lib/overflow-title/index.js +285 -1
- package/lib/pagination/index.d.ts +4 -4
- package/lib/pagination/index.js +880 -1
- package/lib/pagination/pagination.css +1 -0
- package/lib/pagination/pagination.d.ts +3 -3
- package/lib/pagination/pagination.less +1 -0
- package/lib/pagination/pagination.variable.css +7 -2
- package/lib/plugin-popover/index.js +3833 -1
- package/lib/plugins/index.js +63 -1
- package/lib/pop-confirm/index.d.ts +42 -3
- package/lib/pop-confirm/index.js +281 -1
- package/lib/pop-confirm/pop-confirm.css +4 -4
- package/lib/pop-confirm/pop-confirm.d.ts +14 -1
- package/lib/pop-confirm/pop-confirm.less +4 -4
- package/lib/pop-confirm/pop-confirm.variable.css +10 -6
- package/lib/popover/index.js +3841 -1
- package/lib/popover/popover.css +1 -1
- package/lib/popover/popover.less +1 -1
- package/lib/popover/popover.variable.css +7 -3
- package/lib/popover2/index.js +107 -1
- package/lib/preset.d.ts +12 -0
- package/lib/preset.js +93 -1
- package/lib/process/index.js +759 -2
- package/lib/process/process.variable.css +6 -2
- package/lib/progress/index.d.ts +4 -4
- package/lib/progress/index.js +431 -1
- package/lib/progress/progress.css +7 -3
- package/lib/progress/progress.d.ts +3 -3
- package/lib/progress/progress.less +8 -3
- package/lib/progress/progress.variable.css +13 -5
- package/lib/radio/common.d.ts +1 -0
- package/lib/radio/index.d.ts +8 -2
- package/lib/radio/index.js +635 -1
- package/lib/radio/radio-button.d.ts +4 -3
- package/lib/radio/radio-group.d.ts +3 -0
- package/lib/radio/radio.css +26 -12
- package/lib/radio/radio.d.ts +1 -0
- package/lib/radio/radio.less +42 -8
- package/lib/radio/radio.variable.css +26 -8
- package/lib/rate/index.d.ts +4 -4
- package/lib/rate/index.js +354 -1
- package/lib/rate/rate.d.ts +2 -2
- package/lib/rate/rate.variable.css +6 -2
- package/lib/rate/star.css +3 -0
- package/lib/rate/star.less +3 -0
- package/lib/rate/star.variable.css +9 -2
- package/lib/resize-layout/index.js +429 -1
- package/lib/resize-layout/resize-layout.css +2 -2
- package/lib/resize-layout/resize-layout.less +2 -2
- package/lib/resize-layout/resize-layout.variable.css +8 -4
- package/lib/search-select/index.js +2729 -2
- package/lib/search-select/search-select.css +2 -4
- package/lib/search-select/search-select.less +10 -12
- package/lib/search-select/search-select.variable.css +8 -6
- package/lib/select/common.d.ts +3 -1
- package/lib/select/index.d.ts +96 -30
- package/lib/select/index.js +2384 -2
- package/lib/select/option.d.ts +1 -0
- package/lib/select/select.css +3 -0
- package/lib/select/select.d.ts +40 -14
- package/lib/select/select.less +3 -0
- package/lib/select/select.variable.css +9 -2
- package/lib/select/selectTagInput.d.ts +2 -0
- package/lib/select/type.d.ts +3 -0
- package/lib/shared/index.js +2690 -1
- package/lib/shared/vue-types.d.ts +1 -1
- package/lib/sideslider/index.js +704 -2
- package/lib/sideslider/sideslider.variable.css +6 -2
- package/lib/slider/index.js +1297 -2
- package/lib/slider/slider.css +2 -0
- package/lib/slider/slider.less +2 -0
- package/lib/slider/slider.variable.css +8 -2
- package/lib/steps/index.d.ts +4 -4
- package/lib/steps/index.js +825 -2
- package/lib/steps/steps.css +18 -6
- package/lib/steps/steps.d.ts +3 -3
- package/lib/steps/steps.less +26 -5
- package/lib/steps/steps.variable.css +24 -8
- package/lib/styles/index.d.ts +1 -0
- package/lib/styles/mixins/animate.variable.css +6 -2
- package/lib/styles/mixins/popper.variable.css +6 -2
- package/lib/styles/mixins/scroll.variable.css +6 -2
- package/lib/styles/reset.variable.css +6 -2
- package/lib/styles/themes/themes.less +7 -3
- package/lib/swiper/index.js +336 -1
- package/lib/swiper/swiper.variable.css +6 -2
- package/lib/switcher/index.d.ts +4 -4
- package/lib/switcher/index.js +277 -1
- package/lib/switcher/switcher.d.ts +3 -3
- package/lib/switcher/switcher.variable.css +6 -2
- package/lib/tab/index.js +914 -1
- package/lib/tab/tab.variable.css +6 -2
- package/lib/table/components/table-column.d.ts +6 -5
- package/lib/table/index.d.ts +57 -7
- package/lib/table/index.js +6510 -1
- package/lib/table/plugins/body-empty.d.ts +1 -1
- package/lib/table/plugins/head-filter.css +1 -28
- package/lib/table/plugins/head-filter.less +2 -34
- package/lib/table/plugins/head-filter.variable.css +7 -30
- package/lib/table/plugins/head-sort.variable.css +6 -2
- package/lib/table/plugins/settings.d.ts +0 -7
- package/lib/table/plugins/settings.variable.css +6 -2
- package/lib/table/plugins/use-column-resize.d.ts +1 -1
- package/lib/table/plugins/use-head-cell.d.ts +7 -0
- package/lib/table/plugins/use-pagination.d.ts +2 -1
- package/lib/table/props.d.ts +2 -1
- package/lib/table/table.css +51 -59
- package/lib/table/table.d.ts +1 -1
- package/lib/table/table.less +28 -22
- package/lib/table/table.variable.css +57 -61
- package/lib/table/use-attributes.d.ts +5 -1
- package/lib/table/use-column.d.ts +87 -0
- package/lib/table/use-common.d.ts +0 -1
- package/lib/table/use-render.d.ts +1 -1
- package/lib/table/utils.d.ts +6 -4
- package/lib/table-column/index.d.ts +160 -10
- package/lib/table-column/index.js +775 -1
- package/lib/tag/index.d.ts +4 -21
- package/lib/tag/index.js +229 -1
- package/lib/tag/tag.css +14 -10
- package/lib/tag/tag.d.ts +2 -12
- package/lib/tag/tag.less +31 -27
- package/lib/tag/tag.variable.css +20 -12
- package/lib/tag-input/index.d.ts +3 -0
- package/lib/tag-input/index.js +1674 -1
- package/lib/tag-input/list-tag-render.d.ts +11 -0
- package/lib/tag-input/tag-input.d.ts +1 -0
- package/lib/tag-input/tag-input.variable.css +6 -2
- package/lib/time-picker/index.d.ts +9 -3
- package/lib/time-picker/index.js +71 -1
- package/lib/time-picker/time-picker.css +4 -3
- package/lib/time-picker/time-picker.less +5 -9
- package/lib/time-picker/time-picker.variable.css +10 -5
- package/lib/timeline/index.js +241 -1
- package/lib/timeline/timeline.variable.css +6 -2
- package/lib/transfer/index.js +673 -1
- package/lib/transfer/transfer.css +2 -2
- package/lib/transfer/transfer.less +2 -2
- package/lib/transfer/transfer.variable.css +8 -4
- package/lib/tree/index.d.ts +21 -33
- package/lib/tree/index.js +2584 -1
- package/lib/tree/props.d.ts +4 -8
- package/lib/tree/tree.css +13 -1
- package/lib/tree/tree.d.ts +15 -19
- package/lib/tree/tree.variable.css +19 -3
- package/lib/tree/use-empty.d.ts +1 -3
- package/lib/tree/util.d.ts +1 -0
- package/lib/upload/index.js +2874 -2
- package/lib/upload/upload.type.d.ts +1 -1
- package/lib/upload/upload.variable.css +6 -2
- package/lib/upload/use-file-handler.d.ts +2 -2
- package/lib/virtual-render/index.js +901 -1
- package/lib/virtual-render/use-fix-top.d.ts +18 -0
- package/lib/virtual-render/v-virtual-render.d.ts +6 -1
- package/lib/virtual-render/virtual-render.variable.css +6 -2
- package/package.json +17 -4
- package/lib/cascader/index.js.LICENSE.txt +0 -1
- package/lib/dialog/index.js.LICENSE.txt +0 -1
- package/lib/directives/index.js.LICENSE.txt +0 -14
- package/lib/info-box/index.js.LICENSE.txt +0 -1
- package/lib/input/index.js.LICENSE.txt +0 -1
- package/lib/message/index.js.LICENSE.txt +0 -6
- package/lib/process/index.js.LICENSE.txt +0 -1
- package/lib/search-select/index.js.LICENSE.txt +0 -1
- package/lib/select/index.js.LICENSE.txt +0 -1
- package/lib/sideslider/index.js.LICENSE.txt +0 -1
- package/lib/slider/index.js.LICENSE.txt +0 -1
- package/lib/steps/index.js.LICENSE.txt +0 -1
- package/lib/table/render.d.ts +0 -130
- package/lib/upload/index.js.LICENSE.txt +0 -1
- /package/lib/overflow-title/{overflow.css → overflow-title.css} +0 -0
- /package/lib/overflow-title/{overflow.less → overflow-title.less} +0 -0
- /package/lib/overflow-title/{overflow.variable.css → overflow-title.variable.css} +0 -0
package/lib/image/index.js
CHANGED
@@ -1 +1,641 @@
|
|
1
|
-
import
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__ from "../shared";
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__ from "../config-provider";
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__ from "../icon";
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__ from "vue-types";
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE_lodash_throttle_a7b7506a__ from "lodash/throttle";
|
7
|
+
import * as __WEBPACK_EXTERNAL_MODULE__directives_9cc9ba10__ from "../directives";
|
8
|
+
/******/ // The require scope
|
9
|
+
/******/ var __webpack_require__ = {};
|
10
|
+
/******/
|
11
|
+
/************************************************************************/
|
12
|
+
/******/ /* webpack/runtime/define property getters */
|
13
|
+
/******/ (() => {
|
14
|
+
/******/ // define getter functions for harmony exports
|
15
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
16
|
+
/******/ for(var key in definition) {
|
17
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
18
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
19
|
+
/******/ }
|
20
|
+
/******/ }
|
21
|
+
/******/ };
|
22
|
+
/******/ })();
|
23
|
+
/******/
|
24
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
25
|
+
/******/ (() => {
|
26
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
27
|
+
/******/ })();
|
28
|
+
/******/
|
29
|
+
/************************************************************************/
|
30
|
+
var __webpack_exports__ = {};
|
31
|
+
|
32
|
+
// EXPORTS
|
33
|
+
__webpack_require__.d(__webpack_exports__, {
|
34
|
+
Ee: () => (/* reexport */ src_image),
|
35
|
+
OO: () => (/* reexport */ image_viewer),
|
36
|
+
ZP: () => (/* binding */ src)
|
37
|
+
});
|
38
|
+
|
39
|
+
;// CONCATENATED MODULE: external "../shared"
|
40
|
+
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
41
|
+
var y = x => () => x
|
42
|
+
const external_shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PropTypes, ["bkZIndexManager"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.bkZIndexManager, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.withInstall });
|
43
|
+
;// CONCATENATED MODULE: external "vue"
|
44
|
+
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
45
|
+
var external_vue_y = x => () => x
|
46
|
+
const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["Teleport"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Teleport, ["Transition"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Transition, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["effectScope"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.effectScope, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["resolveDirective"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective, ["shallowRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch, ["withDirectives"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives });
|
47
|
+
;// CONCATENATED MODULE: external "../config-provider"
|
48
|
+
var external_config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
49
|
+
var external_config_provider_y = x => () => x
|
50
|
+
const external_config_provider_namespaceObject = external_config_provider_x({ ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__.usePrefix });
|
51
|
+
;// CONCATENATED MODULE: external "../icon"
|
52
|
+
var external_icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
53
|
+
var external_icon_y = x => () => x
|
54
|
+
const external_icon_namespaceObject = external_icon_x({ ["AngleLeft"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.AngleLeft, ["AngleRight"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.AngleRight, ["Close"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.Close, ["Spinner"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.Spinner });
|
55
|
+
;// CONCATENATED MODULE: external "vue-types"
|
56
|
+
var external_vue_types_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
57
|
+
var external_vue_types_y = x => () => x
|
58
|
+
const external_vue_types_namespaceObject = external_vue_types_x({ ["toType"]: () => __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__.toType });
|
59
|
+
;// CONCATENATED MODULE: ../../packages/image/src/props.ts
|
60
|
+
|
61
|
+
|
62
|
+
var FitEnum;
|
63
|
+
(function (FitEnum) {
|
64
|
+
FitEnum["FILL"] = "fill";
|
65
|
+
FitEnum["CONTAIN"] = "contain";
|
66
|
+
FitEnum["COVER"] = "cover";
|
67
|
+
FitEnum["NONE"] = "none";
|
68
|
+
FitEnum["SCALE_DOWN"] = "scale-down";
|
69
|
+
})(FitEnum || (FitEnum = {}));
|
70
|
+
var propsImage = {
|
71
|
+
src: external_shared_namespaceObject.PropTypes.string.def(''),
|
72
|
+
fallback: external_shared_namespaceObject.PropTypes.string.def(''),
|
73
|
+
placeholder: external_shared_namespaceObject.PropTypes.any,
|
74
|
+
fit: (0,external_vue_types_namespaceObject.toType)('fit', {}).def(FitEnum.FILL),
|
75
|
+
lazy: external_shared_namespaceObject.PropTypes.bool,
|
76
|
+
urlList: external_shared_namespaceObject.PropTypes.array.def([]),
|
77
|
+
isShowPreviewTitle: external_shared_namespaceObject.PropTypes.bool.def(true),
|
78
|
+
maskClose: external_shared_namespaceObject.PropTypes.bool.def(true),
|
79
|
+
zIndex: external_shared_namespaceObject.PropTypes.number.def(2000)
|
80
|
+
};
|
81
|
+
var propsImageViever = {
|
82
|
+
urlList: {
|
83
|
+
type: Array,
|
84
|
+
"default": function _default() {
|
85
|
+
return [];
|
86
|
+
}
|
87
|
+
},
|
88
|
+
zIndex: external_shared_namespaceObject.PropTypes.number.def(2000),
|
89
|
+
initialIndex: external_shared_namespaceObject.PropTypes.number.def(0),
|
90
|
+
isShowTitle: external_shared_namespaceObject.PropTypes.bool.def(true),
|
91
|
+
loops: external_shared_namespaceObject.PropTypes.bool.def(true),
|
92
|
+
maskClose: external_shared_namespaceObject.PropTypes.bool.def(true)
|
93
|
+
};
|
94
|
+
;// CONCATENATED MODULE: ../../packages/image/src/image.tsx
|
95
|
+
|
96
|
+
/*
|
97
|
+
* Tencent is pleased to support the open source community by making
|
98
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
99
|
+
*
|
100
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
101
|
+
*
|
102
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
103
|
+
*
|
104
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
105
|
+
*
|
106
|
+
* ---------------------------------------------------
|
107
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
108
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
109
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
110
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
111
|
+
*
|
112
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
113
|
+
* the Software.
|
114
|
+
*
|
115
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
116
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
117
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
118
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
119
|
+
* IN THE SOFTWARE.
|
120
|
+
*/
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
/* harmony default export */ const src_image = ((0,external_vue_namespaceObject.defineComponent)({
|
127
|
+
// eslint-disable-next-line vue/no-reserved-component-names
|
128
|
+
name: 'Image',
|
129
|
+
props: propsImage,
|
130
|
+
emits: ['loaded', 'error', 'close', 'change'],
|
131
|
+
setup: function setup(props, _ref) {
|
132
|
+
var emit = _ref.emit,
|
133
|
+
slots = _ref.slots;
|
134
|
+
var loading = (0,external_vue_namespaceObject.ref)(true);
|
135
|
+
var hasError = (0,external_vue_namespaceObject.ref)(true);
|
136
|
+
var isShowViewer = (0,external_vue_namespaceObject.ref)(false);
|
137
|
+
var prevOverflow = (0,external_vue_namespaceObject.ref)('');
|
138
|
+
var imageSrc = (0,external_vue_namespaceObject.ref)('');
|
139
|
+
function clickHandler() {}
|
140
|
+
(0,external_vue_namespaceObject.watch)(function () {
|
141
|
+
return props.src;
|
142
|
+
}, function () {
|
143
|
+
loadImage();
|
144
|
+
});
|
145
|
+
var preview = (0,external_vue_namespaceObject.computed)(function () {
|
146
|
+
var _props$urlList;
|
147
|
+
return (props === null || props === void 0 || (_props$urlList = props.urlList) === null || _props$urlList === void 0 ? void 0 : _props$urlList.length) > 0;
|
148
|
+
});
|
149
|
+
function closeViewer() {
|
150
|
+
document.body.style.overflow = prevOverflow.value;
|
151
|
+
isShowViewer.value = false;
|
152
|
+
emit('close');
|
153
|
+
}
|
154
|
+
function change(val) {
|
155
|
+
emit('change', val);
|
156
|
+
}
|
157
|
+
function loadImage() {
|
158
|
+
loading.value = true;
|
159
|
+
hasError.value = false;
|
160
|
+
imageSrc.value = props.src;
|
161
|
+
}
|
162
|
+
var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
|
163
|
+
resolveClassName = _usePrefix.resolveClassName;
|
164
|
+
return function () {
|
165
|
+
function getContent() {
|
166
|
+
if (loading.value) {
|
167
|
+
return (0,external_vue_namespaceObject.createVNode)("div", {
|
168
|
+
"class": "".concat(resolveClassName('image-placeholder'))
|
169
|
+
}, [(0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.Spinner, null, null)]);
|
170
|
+
}
|
171
|
+
if (hasError.value) {
|
172
|
+
if (slots.error) {
|
173
|
+
if (typeof slots.error === 'function') {
|
174
|
+
return slots.error();
|
175
|
+
}
|
176
|
+
return slots.error;
|
177
|
+
}
|
178
|
+
return (0,external_vue_namespaceObject.createVNode)("div", {
|
179
|
+
"class": "".concat(resolveClassName('image-placeholder'))
|
180
|
+
}, [props.fallback ? (0,external_vue_namespaceObject.createVNode)("img", {
|
181
|
+
"src": props.fallback,
|
182
|
+
"alt": "\u56FE\u7247\u52A0\u8F7D\u9519\u8BEF"
|
183
|
+
}, null) : '', (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("i", {
|
184
|
+
"class": "".concat(resolveClassName('icon'), " icon-image-fail")
|
185
|
+
}, null), [[(0,external_vue_namespaceObject.resolveDirective)("else")]])]);
|
186
|
+
}
|
187
|
+
return (0,external_vue_namespaceObject.createVNode)("img", {
|
188
|
+
"src": props.src,
|
189
|
+
"onClick": clickHandler
|
190
|
+
}, null);
|
191
|
+
}
|
192
|
+
return (0,external_vue_namespaceObject.createVNode)("div", {
|
193
|
+
"class": "".concat(resolveClassName('image'))
|
194
|
+
}, [getContent(), preview.value && isShowViewer.value ? (0,external_vue_namespaceObject.createVNode)(image_viewer, {
|
195
|
+
"zIndex": props.zIndex,
|
196
|
+
"maskClose": props.maskClose,
|
197
|
+
"is-show-title": props.isShowPreviewTitle,
|
198
|
+
"url-list": props.urlList,
|
199
|
+
"onClose": closeViewer,
|
200
|
+
"onChange": change
|
201
|
+
}, null) : '']);
|
202
|
+
};
|
203
|
+
}
|
204
|
+
}));
|
205
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
206
|
+
function _typeof(obj) {
|
207
|
+
"@babel/helpers - typeof";
|
208
|
+
|
209
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
210
|
+
return typeof obj;
|
211
|
+
} : function (obj) {
|
212
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
213
|
+
}, _typeof(obj);
|
214
|
+
}
|
215
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
216
|
+
|
217
|
+
function _toPrimitive(input, hint) {
|
218
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
219
|
+
var prim = input[Symbol.toPrimitive];
|
220
|
+
if (prim !== undefined) {
|
221
|
+
var res = prim.call(input, hint || "default");
|
222
|
+
if (_typeof(res) !== "object") return res;
|
223
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
224
|
+
}
|
225
|
+
return (hint === "string" ? String : Number)(input);
|
226
|
+
}
|
227
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
228
|
+
|
229
|
+
|
230
|
+
function _toPropertyKey(arg) {
|
231
|
+
var key = _toPrimitive(arg, "string");
|
232
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
233
|
+
}
|
234
|
+
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
235
|
+
|
236
|
+
function _defineProperty(obj, key, value) {
|
237
|
+
key = _toPropertyKey(key);
|
238
|
+
if (key in obj) {
|
239
|
+
Object.defineProperty(obj, key, {
|
240
|
+
value: value,
|
241
|
+
enumerable: true,
|
242
|
+
configurable: true,
|
243
|
+
writable: true
|
244
|
+
});
|
245
|
+
} else {
|
246
|
+
obj[key] = value;
|
247
|
+
}
|
248
|
+
return obj;
|
249
|
+
}
|
250
|
+
;// CONCATENATED MODULE: external "lodash/throttle"
|
251
|
+
var throttle_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
252
|
+
var throttle_y = x => () => x
|
253
|
+
const throttle_namespaceObject = throttle_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_lodash_throttle_a7b7506a__["default"] });
|
254
|
+
;// CONCATENATED MODULE: external "../directives"
|
255
|
+
var external_directives_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
256
|
+
var external_directives_y = x => () => x
|
257
|
+
const external_directives_namespaceObject = external_directives_x({ ["bkTooltips"]: () => __WEBPACK_EXTERNAL_MODULE__directives_9cc9ba10__.bkTooltips });
|
258
|
+
;// CONCATENATED MODULE: ../../packages/image/src/image-viewer.tsx
|
259
|
+
|
260
|
+
|
261
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
262
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
263
|
+
/*
|
264
|
+
* Tencent is pleased to support the open source community by making
|
265
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
266
|
+
*
|
267
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
268
|
+
*
|
269
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
270
|
+
*
|
271
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
272
|
+
*
|
273
|
+
* ---------------------------------------------------
|
274
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
275
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
276
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
277
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
278
|
+
*
|
279
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
280
|
+
* the Software.
|
281
|
+
*
|
282
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
283
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
284
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
285
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
286
|
+
* IN THE SOFTWARE.
|
287
|
+
*/
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
/* harmony default export */ const image_viewer = ((0,external_vue_namespaceObject.defineComponent)({
|
296
|
+
name: 'ImageViewer',
|
297
|
+
directives: {
|
298
|
+
bkTooltips: external_directives_namespaceObject.bkTooltips
|
299
|
+
},
|
300
|
+
props: propsImageViever,
|
301
|
+
emits: ['close', 'change'],
|
302
|
+
setup: function setup(props, _ref) {
|
303
|
+
var emit = _ref.emit;
|
304
|
+
var scopeEventListener = (0,external_vue_namespaceObject.effectScope)();
|
305
|
+
// @ts-ignore
|
306
|
+
var wrapper = (0,external_vue_namespaceObject.ref)();
|
307
|
+
var imgRefs = (0,external_vue_namespaceObject.ref)([]);
|
308
|
+
var mode = (0,external_vue_namespaceObject.ref)('');
|
309
|
+
var index = (0,external_vue_namespaceObject.ref)(props.initialIndex);
|
310
|
+
var loading = (0,external_vue_namespaceObject.ref)(false);
|
311
|
+
var error = (0,external_vue_namespaceObject.ref)(false);
|
312
|
+
var transform = (0,external_vue_namespaceObject.shallowRef)({
|
313
|
+
scale: 1,
|
314
|
+
deg: 0,
|
315
|
+
offsetX: 0,
|
316
|
+
offsetY: 0,
|
317
|
+
enableTransition: false
|
318
|
+
});
|
319
|
+
var isSingle = (0,external_vue_namespaceObject.computed)(function () {
|
320
|
+
var _props$urlList;
|
321
|
+
return (props === null || props === void 0 || (_props$urlList = props.urlList) === null || _props$urlList === void 0 ? void 0 : _props$urlList.length) < 2;
|
322
|
+
});
|
323
|
+
var isFirst = (0,external_vue_namespaceObject.computed)(function () {
|
324
|
+
return index.value === 0;
|
325
|
+
});
|
326
|
+
var isLast = (0,external_vue_namespaceObject.computed)(function () {
|
327
|
+
return index.value === props.urlList.length - 1;
|
328
|
+
});
|
329
|
+
var currentImg = (0,external_vue_namespaceObject.computed)(function () {
|
330
|
+
return props.urlList[index.value];
|
331
|
+
});
|
332
|
+
var currentName = (0,external_vue_namespaceObject.computed)(function () {
|
333
|
+
var arr = currentImg.value.split('/');
|
334
|
+
return arr[arr.length - 1];
|
335
|
+
});
|
336
|
+
var imgStyle = (0,external_vue_namespaceObject.computed)(function () {
|
337
|
+
var _transform$value = transform.value,
|
338
|
+
scale = _transform$value.scale,
|
339
|
+
deg = _transform$value.deg,
|
340
|
+
offsetX = _transform$value.offsetX,
|
341
|
+
offsetY = _transform$value.offsetY,
|
342
|
+
enableTransition = _transform$value.enableTransition;
|
343
|
+
var translateX = offsetX / scale;
|
344
|
+
var translateY = offsetY / scale;
|
345
|
+
switch (deg % 360) {
|
346
|
+
case 90:
|
347
|
+
case -270:
|
348
|
+
var _ref2 = [translateY, -translateX];
|
349
|
+
translateX = _ref2[0];
|
350
|
+
translateY = _ref2[1];
|
351
|
+
break;
|
352
|
+
case 180:
|
353
|
+
case -180:
|
354
|
+
var _ref3 = [-translateX, -translateY];
|
355
|
+
translateX = _ref3[0];
|
356
|
+
translateY = _ref3[1];
|
357
|
+
break;
|
358
|
+
case 270:
|
359
|
+
case -90:
|
360
|
+
var _ref4 = [-translateY, translateX];
|
361
|
+
translateX = _ref4[0];
|
362
|
+
translateY = _ref4[1];
|
363
|
+
break;
|
364
|
+
}
|
365
|
+
var style = {
|
366
|
+
transform: "scale(".concat(scale, ") rotate(").concat(deg, "deg) translate(").concat(translateX, "px, ").concat(translateY, "px)"),
|
367
|
+
transition: enableTransition ? 'transform .3s' : ''
|
368
|
+
};
|
369
|
+
if (mode.value === 'contain') {
|
370
|
+
style.maxWidth = '100%';
|
371
|
+
style.maxHeight = '100%';
|
372
|
+
}
|
373
|
+
return style;
|
374
|
+
});
|
375
|
+
var wrapStyles = (0,external_vue_namespaceObject.computed)(function () {
|
376
|
+
var zIndex = 2000;
|
377
|
+
if (props.zIndex) {
|
378
|
+
zIndex = props.zIndex;
|
379
|
+
} else {
|
380
|
+
zIndex += external_shared_namespaceObject.bkZIndexManager.getModalNextIndex() || 1;
|
381
|
+
}
|
382
|
+
return {
|
383
|
+
zIndex: zIndex
|
384
|
+
};
|
385
|
+
});
|
386
|
+
var keydownHandler = (0,throttle_namespaceObject["default"])(function (e) {
|
387
|
+
switch (Number(e.code)) {
|
388
|
+
// ESC
|
389
|
+
case 27:
|
390
|
+
hide();
|
391
|
+
break;
|
392
|
+
// SPACE
|
393
|
+
case 32:
|
394
|
+
toggleMode('original');
|
395
|
+
break;
|
396
|
+
// LEFT_ARROW
|
397
|
+
case 37:
|
398
|
+
prev();
|
399
|
+
break;
|
400
|
+
// UP_ARROW
|
401
|
+
case 38:
|
402
|
+
handleActions('zoomIn');
|
403
|
+
break;
|
404
|
+
// RIGHT_ARROW
|
405
|
+
case 39:
|
406
|
+
next();
|
407
|
+
break;
|
408
|
+
// DOWN_ARROW
|
409
|
+
case 40:
|
410
|
+
handleActions('zoomOut');
|
411
|
+
break;
|
412
|
+
}
|
413
|
+
});
|
414
|
+
var mousewheelHandler = (0,throttle_namespaceObject["default"])(function (e /* TODO: wheelDelta is deprecated */) {
|
415
|
+
var delta = e.wheelDelta ? e.wheelDelta : -e.detail;
|
416
|
+
if (delta > 0) {
|
417
|
+
handleActions('zoomIn', {
|
418
|
+
zoomRate: 1.2,
|
419
|
+
enableTransition: false
|
420
|
+
});
|
421
|
+
} else {
|
422
|
+
handleActions('zoomOut', {
|
423
|
+
zoomRate: 1.2,
|
424
|
+
enableTransition: false
|
425
|
+
});
|
426
|
+
}
|
427
|
+
});
|
428
|
+
scopeEventListener.run(function () {
|
429
|
+
document.addEventListener('keydown', keydownHandler);
|
430
|
+
document.addEventListener('mousewheel', mousewheelHandler);
|
431
|
+
});
|
432
|
+
function hide() {
|
433
|
+
document.removeEventListener('keydown', keydownHandler);
|
434
|
+
document.removeEventListener('mousewheel', mousewheelHandler);
|
435
|
+
scopeEventListener.stop();
|
436
|
+
emit('close');
|
437
|
+
}
|
438
|
+
function toggleMode(modeNames) {
|
439
|
+
if (loading.value) return;
|
440
|
+
mode.value = modeNames;
|
441
|
+
reset();
|
442
|
+
}
|
443
|
+
function reset() {
|
444
|
+
transform.value = {
|
445
|
+
scale: 1,
|
446
|
+
deg: 0,
|
447
|
+
offsetX: 0,
|
448
|
+
offsetY: 0,
|
449
|
+
enableTransition: false
|
450
|
+
};
|
451
|
+
}
|
452
|
+
function prev() {
|
453
|
+
if (isFirst.value && !props.loops) return;
|
454
|
+
var len = props.urlList.length;
|
455
|
+
index.value = (index.value - 1 + len) % len;
|
456
|
+
}
|
457
|
+
function next() {
|
458
|
+
if (isLast.value && !props.loops) return;
|
459
|
+
var len = props.urlList.length;
|
460
|
+
index.value = (index.value + 1) % len;
|
461
|
+
}
|
462
|
+
function handleActions(action) {
|
463
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
464
|
+
if (loading.value) return;
|
465
|
+
var _zoomRate$rotateDeg$e = _objectSpread({
|
466
|
+
zoomRate: 0.2,
|
467
|
+
rotateDeg: 90,
|
468
|
+
enableTransition: true
|
469
|
+
}, options),
|
470
|
+
zoomRate = _zoomRate$rotateDeg$e.zoomRate,
|
471
|
+
rotateDeg = _zoomRate$rotateDeg$e.rotateDeg,
|
472
|
+
enableTransition = _zoomRate$rotateDeg$e.enableTransition;
|
473
|
+
switch (action) {
|
474
|
+
case 'zoomOut':
|
475
|
+
if (transform.value.scale > 0.2) {
|
476
|
+
transform.value.scale = Number.parseFloat((transform.value.scale - zoomRate).toFixed(3));
|
477
|
+
}
|
478
|
+
break;
|
479
|
+
case 'zoomIn':
|
480
|
+
if (transform.value.scale < 7) {
|
481
|
+
transform.value.scale = Number.parseFloat((transform.value.scale + zoomRate).toFixed(3));
|
482
|
+
}
|
483
|
+
break;
|
484
|
+
case 'clockwise':
|
485
|
+
transform.value.deg += rotateDeg;
|
486
|
+
break;
|
487
|
+
case 'anticlockwise':
|
488
|
+
transform.value.deg -= rotateDeg;
|
489
|
+
break;
|
490
|
+
}
|
491
|
+
transform.value.enableTransition = enableTransition;
|
492
|
+
}
|
493
|
+
function handleImgLoad() {
|
494
|
+
error.value = false;
|
495
|
+
loading.value = false;
|
496
|
+
}
|
497
|
+
function handleImgError(e) {
|
498
|
+
error.value = true;
|
499
|
+
loading.value = false;
|
500
|
+
e.target.alt = '加载失败';
|
501
|
+
}
|
502
|
+
function handleMouseDown(e) {
|
503
|
+
if (loading.value || e.button !== 0 || !wrapper.value) return;
|
504
|
+
transform.value.enableTransition = false;
|
505
|
+
var _transform$value2 = transform.value,
|
506
|
+
offsetX = _transform$value2.offsetX,
|
507
|
+
offsetY = _transform$value2.offsetY;
|
508
|
+
var startX = e.pageX;
|
509
|
+
var startY = e.pageY;
|
510
|
+
var mousemove = (0,throttle_namespaceObject["default"])(function (ev) {
|
511
|
+
transform.value = _objectSpread(_objectSpread({}, transform.value), {}, {
|
512
|
+
offsetX: offsetX + ev.pageX - startX,
|
513
|
+
offsetY: offsetY + ev.pageY - startY
|
514
|
+
});
|
515
|
+
});
|
516
|
+
var mouseup = function mouseup() {
|
517
|
+
document.removeEventListener('mousemove', mousemove);
|
518
|
+
document.removeEventListener('mouseup', mouseup);
|
519
|
+
};
|
520
|
+
document.addEventListener('mousemove', mousemove);
|
521
|
+
document.addEventListener('mouseup', mouseup);
|
522
|
+
e.preventDefault();
|
523
|
+
}
|
524
|
+
var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
|
525
|
+
resolveClassName = _usePrefix.resolveClassName;
|
526
|
+
return function () {
|
527
|
+
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Teleport, {
|
528
|
+
"to": "body"
|
529
|
+
}, {
|
530
|
+
"default": function _default() {
|
531
|
+
return [(0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Transition, null, {
|
532
|
+
"default": function _default() {
|
533
|
+
return [(0,external_vue_namespaceObject.createVNode)("div", {
|
534
|
+
"tabindex": "-1",
|
535
|
+
"ref": "wrapper",
|
536
|
+
"class": "".concat(resolveClassName('image-viewer-wrapper')),
|
537
|
+
"style": wrapStyles.value
|
538
|
+
}, [(0,external_vue_namespaceObject.createVNode)("div", {
|
539
|
+
"class": "".concat(resolveClassName('image-viewer-mask')),
|
540
|
+
"onClick": function onClick() {
|
541
|
+
props.maskClose && hide();
|
542
|
+
}
|
543
|
+
}, null), props.isShowTitle && props.urlList.length ? (0,external_vue_namespaceObject.createVNode)("div", {
|
544
|
+
"class": "".concat(resolveClassName('image-viewer-header'))
|
545
|
+
}, [(0,external_vue_namespaceObject.createVNode)("div", null, [currentName]), (0,external_vue_namespaceObject.createVNode)("div", {
|
546
|
+
"class": "tc "
|
547
|
+
}, [index.value + 1, (0,external_vue_namespaceObject.createTextVNode)("/"), props.urlList.length]), (0,external_vue_namespaceObject.createVNode)("div", {
|
548
|
+
"class": "quit-box tr"
|
549
|
+
}, [(0,external_vue_namespaceObject.createVNode)("div", {
|
550
|
+
"class": "quit-tips mr10"
|
551
|
+
}, [(0,external_vue_namespaceObject.createTextVNode)("ESC \u53EF\u4EE5\u9000\u51FA\u5168\u5C4F")]), (0,external_vue_namespaceObject.createVNode)("div", {
|
552
|
+
"class": "".concat(resolveClassName('image-viewer-close')),
|
553
|
+
"onClick": hide
|
554
|
+
}, [(0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.Close, null, null)])])]) : '', !isSingle.value ? (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)("div", {
|
555
|
+
"onClick": prev,
|
556
|
+
"class": "".concat(resolveClassName('image-viewer-btn'), " ").concat(resolveClassName('image-viewer-prev'), " ").concat(!props.loops && isFirst ? 'is-disabled' : '')
|
557
|
+
}, [(0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.AngleLeft, null, null)]), (0,external_vue_namespaceObject.createVNode)("div", {
|
558
|
+
"onClick": next,
|
559
|
+
"class": "".concat(resolveClassName('image-viewer-btn'), " ").concat(resolveClassName('image-viewer-prev'), " ").concat(!props.loops && isLast ? 'is-disabled' : '')
|
560
|
+
}, [(0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.AngleRight, null, null)]), (0,external_vue_namespaceObject.createVNode)("div", {
|
561
|
+
"class": "".concat(resolveClassName('image-viewer-actions-inner'))
|
562
|
+
}, [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.AngleLeft, {
|
563
|
+
"onClick": function onClick() {
|
564
|
+
return handleActions('zoomOut');
|
565
|
+
}
|
566
|
+
}, null), [[(0,external_vue_namespaceObject.resolveDirective)("bk-tooltips"), "{content: '\u63D0\u793A\u4FE1\u606F', placement: 'top'}"]]), (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("i", {
|
567
|
+
"class": "",
|
568
|
+
"onClick": function onClick() {
|
569
|
+
return handleActions('zoomOut');
|
570
|
+
}
|
571
|
+
}, null), [[(0,external_vue_namespaceObject.resolveDirective)("bk-tooltips"), "{content: '\u63D0\u793A\u4FE1\u606F', placement: 'top'}"]]), (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("i", {
|
572
|
+
"class": "".concat(resolveClassName('icon'), " icon-narrow-line"),
|
573
|
+
"onClick": function onClick() {
|
574
|
+
return handleActions('zoomOut');
|
575
|
+
}
|
576
|
+
}, null), [[(0,external_vue_namespaceObject.resolveDirective)("bk-tooltips"), "{content: '\u63D0\u793A\u4FE1\u606F', placement: 'top'}"]])])]) : '', (0,external_vue_namespaceObject.createVNode)("div", {
|
577
|
+
"class": "".concat(resolveClassName('image-viewer-canvas'), " ").concat(props.isShowTitle ? resolveClassName('image-viewer-has-header') : '')
|
578
|
+
}, [error.value ? (0,external_vue_namespaceObject.createVNode)("div", {
|
579
|
+
"class": "".concat(resolveClassName('image-viewer-error'))
|
580
|
+
}, [(0,external_vue_namespaceObject.createVNode)("div", null, [(0,external_vue_namespaceObject.createVNode)("i", {
|
581
|
+
"class": "".concat(resolveClassName('icon'), " icon-image-fail")
|
582
|
+
}, null)]), (0,external_vue_namespaceObject.createVNode)("div", null, [(0,external_vue_namespaceObject.createTextVNode)("\u62B1\u6B49\uFF0C\u56FE\u7247\u52A0\u8F7D\u5931\u8D25")])]) : props.urlList.map(function (url, i) {
|
583
|
+
if (i === index.value) {
|
584
|
+
return '';
|
585
|
+
}
|
586
|
+
return (0,external_vue_namespaceObject.createVNode)("img", {
|
587
|
+
"key": i,
|
588
|
+
"ref": function ref(el) {
|
589
|
+
return imgRefs[i] = el;
|
590
|
+
},
|
591
|
+
"class": "".concat(resolveClassName('image-viewer-img')),
|
592
|
+
"style": imgStyle.value,
|
593
|
+
"src": url,
|
594
|
+
"onLoad": handleImgLoad,
|
595
|
+
"onError": handleImgError,
|
596
|
+
"onMousedown": handleMouseDown
|
597
|
+
}, null);
|
598
|
+
})])])];
|
599
|
+
}
|
600
|
+
})];
|
601
|
+
}
|
602
|
+
});
|
603
|
+
};
|
604
|
+
}
|
605
|
+
}));
|
606
|
+
;// CONCATENATED MODULE: ../../packages/image/src/index.ts
|
607
|
+
/*
|
608
|
+
* Tencent is pleased to support the open source community by making
|
609
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
610
|
+
*
|
611
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
612
|
+
*
|
613
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
614
|
+
*
|
615
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
616
|
+
*
|
617
|
+
* ---------------------------------------------------
|
618
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
619
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
620
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
621
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
622
|
+
*
|
623
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
624
|
+
* the Software.
|
625
|
+
*
|
626
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
627
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
628
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
629
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
630
|
+
* IN THE SOFTWARE.
|
631
|
+
*/
|
632
|
+
|
633
|
+
|
634
|
+
|
635
|
+
|
636
|
+
var BkImage = (0,external_shared_namespaceObject.withInstall)(src_image);
|
637
|
+
/* harmony default export */ const src = (BkImage);
|
638
|
+
var __webpack_exports__Image = __webpack_exports__.Ee;
|
639
|
+
var __webpack_exports__ImageViewer = __webpack_exports__.OO;
|
640
|
+
var __webpack_exports__default = __webpack_exports__.ZP;
|
641
|
+
export { __webpack_exports__Image as Image, __webpack_exports__ImageViewer as ImageViewer, __webpack_exports__default as default };
|