bkui-vue 1.0.3-beta.4 → 1.0.3-beta.40
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 +71 -71
- package/dist/index.esm.js +15481 -14247
- package/dist/index.umd.js +70 -70
- 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 +3 -0
- package/lib/alert/alert.variable.css +3 -0
- package/lib/backtop/backtop.variable.css +3 -0
- package/lib/badge/badge.variable.css +3 -0
- package/lib/breadcrumb/breadcrumb.variable.css +3 -0
- package/lib/button/button.variable.css +3 -0
- package/lib/card/card.variable.css +3 -0
- package/lib/cascader/cascader.variable.css +3 -0
- package/lib/checkbox/checkbox.variable.css +3 -0
- package/lib/code-diff/code-diff.variable.css +3 -0
- package/lib/collapse/collapse.variable.css +3 -0
- package/lib/collapse-transition/collapse-transition.variable.css +3 -0
- package/lib/color-picker/color-picker.variable.css +3 -0
- package/lib/components.js +0 -4
- package/lib/config-provider/config-provider.d.ts +3 -0
- package/lib/config-provider/config-provider.variable.css +3 -0
- package/lib/config-provider/index.d.ts +4 -0
- package/lib/config-provider/token.d.ts +1 -0
- package/lib/container/container.variable.css +3 -0
- package/lib/date-picker/base/month-table.d.ts +2 -2
- package/lib/date-picker/date-picker.d.ts +1 -0
- package/lib/date-picker/date-picker.variable.css +3 -0
- package/lib/date-picker/index.d.ts +3 -0
- package/lib/date-picker/index.js +69 -31
- package/lib/date-picker/interface.d.ts +1 -1
- package/lib/date-picker/time-picker.d.ts +1 -0
- package/lib/date-picker/utils.d.ts +4 -0
- package/lib/dialog/dialog.css +28 -31
- package/lib/dialog/dialog.d.ts +11 -0
- package/lib/dialog/dialog.less +18 -17
- package/lib/dialog/dialog.variable.css +31 -31
- package/lib/dialog/index.d.ts +23 -0
- package/lib/dialog/index.js +15 -9
- package/lib/dialog/props.d.ts +5 -0
- package/lib/dist.index.js +0 -1
- package/lib/divider/divider.variable.css +3 -0
- package/lib/dropdown/dropdown.css +3 -1
- package/lib/dropdown/dropdown.variable.css +6 -1
- package/lib/exception/exception.variable.css +3 -0
- package/lib/fixed-navbar/fixed-navbar.variable.css +3 -0
- package/lib/form/form.variable.css +3 -0
- package/lib/hooks.js +1 -8
- package/lib/icon/image-fill.js +82 -167
- package/lib/icon/img-error.js +82 -167
- package/lib/icon/img-placehoulder.js +82 -167
- package/lib/icon/index.d.ts +1 -0
- package/lib/icon/index.js +87 -2427
- package/lib/icon/info-line.js +82 -167
- package/lib/icon/info.js +82 -167
- package/lib/icon/left-shape.js +82 -167
- package/lib/icon/left-turn-line.js +82 -167
- package/lib/icon/loading.js +82 -167
- package/lib/icon/narrow-line.js +82 -167
- package/lib/icon/original.js +82 -167
- package/lib/icon/pdf-fill.js +82 -167
- package/lib/icon/play-shape.js +82 -167
- package/lib/icon/plus.js +82 -167
- package/lib/icon/ppt-fill.js +82 -167
- package/lib/icon/qq.js +82 -167
- package/lib/icon/right-shape.js +82 -167
- package/lib/icon/right-turn-line.js +82 -167
- package/lib/icon/search.js +82 -167
- package/lib/icon/share.js +82 -167
- package/lib/icon/spinner.js +82 -167
- package/lib/icon/success.js +82 -167
- package/lib/icon/switcher-loading.js +82 -167
- package/lib/icon/text-all.d.ts +4 -0
- package/lib/icon/text-all.js +191 -0
- package/lib/icon/text-file.js +82 -167
- package/lib/icon/text-fill.js +82 -167
- package/lib/icon/transfer.js +82 -167
- package/lib/icon/tree-application-shape.js +82 -167
- package/lib/icon/unfull-screen.js +82 -167
- package/lib/icon/unvisible.js +82 -167
- package/lib/icon/up-shape.js +82 -167
- package/lib/icon/upload.js +82 -167
- package/lib/icon/video-fill.js +82 -167
- package/lib/icon/warn.js +82 -167
- package/lib/icon/weixin-pro.js +82 -167
- package/lib/icon/weixin.js +82 -167
- package/lib/image/image-viewer.variable.css +3 -0
- package/lib/image/image.variable.css +3 -0
- package/lib/image/index.js +5 -2
- package/lib/index.js +0 -1
- package/lib/info-box/index.js +40 -455
- package/lib/info-box/info-box.css +6 -11
- package/lib/info-box/info-box.d.ts +1 -1
- package/lib/info-box/info-box.less +6 -10
- package/lib/info-box/info-box.variable.css +9 -11
- package/lib/input/index.js +5 -0
- package/lib/input/input.variable.css +3 -0
- package/lib/link/link.variable.css +3 -0
- package/lib/loading/loading.variable.css +3 -0
- package/lib/locale/index.js +4 -2
- package/lib/locale/lang/en.d.ts +1 -0
- package/lib/menu/menu.variable.css +3 -0
- package/lib/menu/submenu.variable.css +3 -0
- package/lib/message/message.variable.css +3 -0
- package/lib/modal/index.d.ts +34 -6
- package/lib/modal/index.js +15 -15
- package/lib/modal/modal.css +10 -15
- package/lib/modal/modal.d.ts +13 -2
- package/lib/modal/modal.less +5 -5
- package/lib/modal/modal.variable.css +13 -15
- package/lib/modal/props.mixin.d.ts +5 -0
- package/lib/navigation/navigation.variable.css +3 -0
- package/lib/notify/notify.variable.css +3 -0
- package/lib/pagination/index.js +2 -1
- package/lib/pagination/pagination.variable.css +3 -0
- package/lib/plugin-popover/index.d.ts +1 -1
- package/lib/plugin-popover/index.js +55 -31
- package/lib/pop-confirm/pop-confirm.variable.css +3 -0
- package/lib/popover/content.d.ts +1 -1
- package/lib/popover/index.js +55 -31
- package/lib/popover/plugin-popover.d.ts +4 -1
- package/lib/popover/popover.css +3 -1
- package/lib/popover/popover.less +4 -1
- package/lib/popover/popover.variable.css +6 -1
- package/lib/preset.d.ts +2 -0
- package/lib/preset.js +14 -20
- package/lib/process/process.variable.css +3 -0
- package/lib/progress/progress.variable.css +3 -0
- package/lib/radio/radio.variable.css +3 -0
- package/lib/rate/rate.variable.css +3 -0
- package/lib/rate/star.variable.css +3 -0
- package/lib/resize-layout/resize-layout.variable.css +3 -0
- package/lib/search-select/search-select.variable.css +3 -0
- package/lib/select/index.d.ts +68 -6
- package/lib/select/index.js +1326 -68
- package/lib/select/option.d.ts +3 -1
- package/lib/select/pinyin/core.d.ts +14 -0
- package/lib/select/pinyin/dict.d.ts +34 -0
- package/lib/select/pinyin/index.d.ts +2 -0
- package/lib/select/select.css +36 -7
- package/lib/select/select.d.ts +28 -2
- package/lib/select/select.less +43 -13
- package/lib/select/select.variable.css +39 -7
- package/lib/select/type.d.ts +2 -3
- package/lib/shared/index.js +44 -3
- package/lib/shared/utils.d.ts +12 -0
- package/lib/sideslider/index.d.ts +29 -6
- package/lib/sideslider/index.js +5 -2
- package/lib/sideslider/sideslider.d.ts +13 -2
- package/lib/sideslider/sideslider.variable.css +3 -0
- package/lib/slider/slider.variable.css +3 -0
- package/lib/steps/steps.variable.css +3 -0
- package/lib/styles/mixins/animate.variable.css +3 -0
- package/lib/styles/mixins/popper.variable.css +3 -0
- package/lib/styles/mixins/scroll.variable.css +3 -0
- package/lib/styles/reset.css +1 -3
- package/lib/styles/reset.less +3 -6
- package/lib/styles/reset.variable.css +4 -3
- package/lib/styles/themes/themes.less +5 -0
- package/lib/swiper/swiper.variable.css +3 -0
- package/lib/switcher/switcher.variable.css +3 -0
- package/lib/tab/tab.variable.css +3 -0
- package/lib/table/cache.d.ts +11 -3
- package/lib/table/components/table-column.d.ts +111 -5
- package/lib/table/index.d.ts +66 -5
- package/lib/table/index.js +857 -561
- package/lib/table/plugins/head-filter.variable.css +3 -0
- package/lib/table/plugins/head-sort.d.ts +7 -0
- package/lib/table/plugins/head-sort.variable.css +3 -0
- package/lib/table/plugins/settings.variable.css +3 -0
- package/lib/table/plugins/use-draggable.d.ts +2 -2
- package/lib/table/plugins/use-observer-resize.d.ts +5 -0
- package/lib/table/props.d.ts +15 -4
- package/lib/table/table.css +6 -12
- package/lib/table/table.d.ts +7 -0
- package/lib/table/table.less +12 -9
- package/lib/table/table.variable.css +9 -12
- package/lib/table/use-attributes.d.ts +5 -43
- package/lib/table/utils.d.ts +5 -4
- package/lib/table-column/index.d.ts +235 -119
- package/lib/table-column/index.js +221 -30
- package/lib/tag/tag.variable.css +3 -0
- package/lib/tag-input/index.d.ts +4 -4
- package/lib/tag-input/tag-input.d.ts +2 -2
- package/lib/tag-input/tag-input.variable.css +3 -0
- package/lib/tag-input/tag-props.d.ts +1 -1
- package/lib/tag-input/tag-render.d.ts +1 -1
- package/lib/time-picker/index.d.ts +38 -35
- package/lib/time-picker/time-picker.variable.css +3 -0
- package/lib/timeline/index.d.ts +73 -44
- package/lib/timeline/index.js +45 -63
- package/lib/timeline/timeline.d.ts +42 -29
- package/lib/timeline/timeline.variable.css +3 -0
- package/lib/transfer/transfer.variable.css +3 -0
- package/lib/tree/tree.variable.css +3 -0
- package/lib/upload/upload.variable.css +3 -0
- package/lib/virtual-render/index.d.ts +9 -9
- package/lib/virtual-render/virtual-render.d.ts +3 -3
- package/lib/virtual-render/virtual-render.variable.css +3 -0
- package/package.json +3 -2
package/lib/image/index.js
CHANGED
@@ -40,7 +40,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
40
40
|
;// CONCATENATED MODULE: external "../shared"
|
41
41
|
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
42
42
|
var y = x => () => x
|
43
|
-
const shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes, ["bkZIndexManager"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.bkZIndexManager, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstall });
|
43
|
+
const shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes, ["bkZIndexManager"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.bkZIndexManager, ["getFullscreenRoot"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.getFullscreenRoot, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstall });
|
44
44
|
;// CONCATENATED MODULE: external "vue"
|
45
45
|
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
46
46
|
var external_vue_y = x => () => x
|
@@ -524,9 +524,12 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
524
524
|
}
|
525
525
|
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
526
526
|
resolveClassName = _usePrefix.resolveClassName;
|
527
|
+
var teleportTo = (0,external_vue_namespaceObject.computed)(function () {
|
528
|
+
return (0,shared_namespaceObject.getFullscreenRoot)();
|
529
|
+
});
|
527
530
|
return function () {
|
528
531
|
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Teleport, {
|
529
|
-
"to":
|
532
|
+
"to": teleportTo.value
|
530
533
|
}, {
|
531
534
|
"default": function _default() {
|
532
535
|
return [(0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Transition, null, {
|
package/lib/index.js
CHANGED
package/lib/info-box/index.js
CHANGED
@@ -3,11 +3,8 @@ import "./info-box.less";
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__ from "../shared";
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__ from "../config-provider";
|
6
|
-
import * as
|
7
|
-
import "../
|
8
|
-
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__ from "../icon";
|
9
|
-
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_modal_d1344388__ from "../modal";
|
10
|
-
import "../modal/modal.less";
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_dialog_497cb4c3__ from "../dialog";
|
7
|
+
import "../dialog/dialog.less";
|
11
8
|
/******/ var __webpack_modules__ = ({
|
12
9
|
|
13
10
|
/***/ 7609:
|
@@ -427,7 +424,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
427
424
|
;// CONCATENATED MODULE: external "../shared"
|
428
425
|
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
429
426
|
var y = x => () => x
|
430
|
-
const shared_namespaceObject = x({ ["
|
427
|
+
const shared_namespaceObject = x({ ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstall });
|
431
428
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
432
429
|
function _typeof(o) {
|
433
430
|
"@babel/helpers - typeof";
|
@@ -510,451 +507,25 @@ var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
|
|
510
507
|
;// CONCATENATED MODULE: external "vue"
|
511
508
|
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
512
509
|
var external_vue_y = x => () => x
|
513
|
-
const external_vue_namespaceObject = external_vue_x({ ["
|
510
|
+
const external_vue_namespaceObject = external_vue_x({ ["createApp"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createApp, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["shallowRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef });
|
514
511
|
;// CONCATENATED MODULE: external "../config-provider"
|
515
512
|
var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
516
513
|
var config_provider_y = x => () => x
|
517
|
-
const config_provider_namespaceObject = config_provider_x({ ["
|
518
|
-
;// CONCATENATED MODULE: external "../
|
519
|
-
var
|
520
|
-
var
|
521
|
-
const
|
522
|
-
;// CONCATENATED MODULE: external "../
|
523
|
-
var
|
524
|
-
var
|
525
|
-
const
|
526
|
-
;// CONCATENATED MODULE: external "../icon"
|
527
|
-
var icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
528
|
-
var icon_y = x => () => x
|
529
|
-
const icon_namespaceObject = icon_x({ ["Close"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Close, ["Error"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Error, ["Spinner"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Spinner, ["Success"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Success, ["Warn"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Warn });
|
530
|
-
;// CONCATENATED MODULE: external "../modal"
|
531
|
-
var modal_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
532
|
-
var modal_y = x => () => x
|
533
|
-
const modal_namespaceObject = modal_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_modal_d1344388__["default"], ["propsMixin"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_modal_d1344388__.propsMixin });
|
534
|
-
;// CONCATENATED MODULE: external "../modal/modal.less"
|
535
|
-
var modal_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
536
|
-
var modal_less_y = x => () => x
|
537
|
-
const modal_less_namespaceObject = modal_less_x({ });
|
538
|
-
;// CONCATENATED MODULE: ../../packages/dialog/src/props.ts
|
539
|
-
|
540
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
541
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
542
|
-
/*
|
543
|
-
* Tencent is pleased to support the open source community by making
|
544
|
-
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
545
|
-
*
|
546
|
-
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
547
|
-
*
|
548
|
-
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
549
|
-
*
|
550
|
-
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
551
|
-
*
|
552
|
-
* ---------------------------------------------------
|
553
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
554
|
-
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
555
|
-
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
556
|
-
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
557
|
-
*
|
558
|
-
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
559
|
-
* the Software.
|
560
|
-
*
|
561
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
562
|
-
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
563
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
564
|
-
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
565
|
-
* IN THE SOFTWARE.
|
566
|
-
*/
|
567
|
-
|
568
|
-
|
569
|
-
var props = _objectSpread(_objectSpread({}, modal_namespaceObject.propsMixin), {}, {
|
570
|
-
width: shared_namespaceObject.PropTypes.oneOfType([String, Number]).def(''),
|
571
|
-
height: shared_namespaceObject.PropTypes.oneOfType([String, Number]).def(''),
|
572
|
-
// 确认按钮文字
|
573
|
-
// confirmText: PropTypes.string.def('确定'),
|
574
|
-
confirmText: shared_namespaceObject.PropTypes.string,
|
575
|
-
// 取消按钮文字
|
576
|
-
// cancelText: PropTypes.string.def('取消'),
|
577
|
-
cancelText: shared_namespaceObject.PropTypes.string,
|
578
|
-
// 步骤按钮文字
|
579
|
-
// prevText: PropTypes.string.def('上一步'),
|
580
|
-
prevText: shared_namespaceObject.PropTypes.string,
|
581
|
-
// nextText: PropTypes.string.def('下一步'),
|
582
|
-
nextText: shared_namespaceObject.PropTypes.string,
|
583
|
-
// 当前步骤
|
584
|
-
current: shared_namespaceObject.PropTypes.number.def(1),
|
585
|
-
// 总步数
|
586
|
-
totalStep: shared_namespaceObject.PropTypes.number,
|
587
|
-
// 弹框的标题
|
588
|
-
title: shared_namespaceObject.PropTypes.string.def('title'),
|
589
|
-
// 显示 header 的位置
|
590
|
-
headerAlign: (0,shared_namespaceObject.alignType)().def(shared_namespaceObject.AlignEnum.LEFT),
|
591
|
-
// 显示 footer 的位置
|
592
|
-
footerAlign: (0,shared_namespaceObject.alignType)().def(shared_namespaceObject.AlignEnum.RIGHT),
|
593
|
-
// 颜色 按钮类型
|
594
|
-
theme: shared_namespaceObject.PropTypes.theme().def(shared_namespaceObject.ThemeEnum.PRIMARY),
|
595
|
-
// 对话框类型
|
596
|
-
dialogType: (0,shared_namespaceObject.dialogTypeUnion)(),
|
597
|
-
// 按钮loading
|
598
|
-
isLoading: shared_namespaceObject.PropTypes.bool.def(false)
|
599
|
-
});
|
600
|
-
/* harmony default export */ const src_props = (props);
|
601
|
-
;// CONCATENATED MODULE: ../../packages/dialog/src/dialog.tsx
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
/*
|
606
|
-
* Tencent is pleased to support the open source community by making
|
607
|
-
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
608
|
-
*
|
609
|
-
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
610
|
-
*
|
611
|
-
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
612
|
-
*
|
613
|
-
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
614
|
-
*
|
615
|
-
* ---------------------------------------------------
|
616
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
617
|
-
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
618
|
-
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
619
|
-
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
620
|
-
*
|
621
|
-
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
622
|
-
* the Software.
|
623
|
-
*
|
624
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
625
|
-
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
626
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
627
|
-
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
628
|
-
* IN THE SOFTWARE.
|
629
|
-
*/
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
function _isSlot(s) {
|
639
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_namespaceObject.isVNode)(s);
|
640
|
-
}
|
641
|
-
/* harmony default export */ const src_dialog = ((0,external_vue_namespaceObject.defineComponent)({
|
642
|
-
// eslint-disable-next-line vue/no-reserved-component-names
|
643
|
-
name: 'Dialog',
|
644
|
-
props: src_props,
|
645
|
-
emits: ['closed', 'update:isShow', 'confirm', 'prev', 'next', 'value-change'],
|
646
|
-
setup: function setup(props, _ref) {
|
647
|
-
var emit = _ref.emit;
|
648
|
-
var t = (0,config_provider_namespaceObject.useLocale)('dialog');
|
649
|
-
var localConfirmText = (0,external_vue_namespaceObject.computed)(function () {
|
650
|
-
if (props.confirmText === undefined) {
|
651
|
-
return t.value.ok;
|
652
|
-
}
|
653
|
-
return props.confirmText;
|
654
|
-
});
|
655
|
-
var localCancelText = (0,external_vue_namespaceObject.computed)(function () {
|
656
|
-
if (props.cancelText === undefined) {
|
657
|
-
return t.value.cancel;
|
658
|
-
}
|
659
|
-
return props.cancelText;
|
660
|
-
});
|
661
|
-
var localPrevText = (0,external_vue_namespaceObject.computed)(function () {
|
662
|
-
if (props.prevText === undefined) {
|
663
|
-
return t.value.prev;
|
664
|
-
}
|
665
|
-
return props.prevText;
|
666
|
-
});
|
667
|
-
var localNextText = (0,external_vue_namespaceObject.computed)(function () {
|
668
|
-
if (props.nextText === undefined) {
|
669
|
-
return t.value.next;
|
670
|
-
}
|
671
|
-
return props.nextText;
|
672
|
-
});
|
673
|
-
var data = (0,external_vue_namespaceObject.reactive)({
|
674
|
-
positionX: 0,
|
675
|
-
positionY: 0,
|
676
|
-
moveStyle: {
|
677
|
-
top: '50%',
|
678
|
-
left: '50%'
|
679
|
-
}
|
680
|
-
});
|
681
|
-
var isModalShow = (0,external_vue_namespaceObject.ref)(props.isShow);
|
682
|
-
(0,external_vue_namespaceObject.onMounted)(function () {
|
683
|
-
if (props.escClose) {
|
684
|
-
addEventListener('keydown', escCloseHandler);
|
685
|
-
}
|
686
|
-
});
|
687
|
-
(0,external_vue_namespaceObject.onBeforeUnmount)(function () {
|
688
|
-
if (props.escClose) {
|
689
|
-
removeEventListener('keydown', escCloseHandler);
|
690
|
-
}
|
691
|
-
});
|
692
|
-
(0,external_vue_namespaceObject.watch)(function () {
|
693
|
-
return props.isShow;
|
694
|
-
}, function (val) {
|
695
|
-
if (!val) {
|
696
|
-
setTimeout(function () {
|
697
|
-
data.moveStyle = {
|
698
|
-
top: '50%',
|
699
|
-
left: '50%'
|
700
|
-
};
|
701
|
-
data.positionX = 0;
|
702
|
-
data.positionY = 0;
|
703
|
-
isModalShow.value = false;
|
704
|
-
}, 250);
|
705
|
-
} else {
|
706
|
-
isModalShow.value = true;
|
707
|
-
}
|
708
|
-
emit('value-change', val);
|
709
|
-
});
|
710
|
-
// 关闭弹框
|
711
|
-
var handleClose = /*#__PURE__*/function () {
|
712
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee() {
|
713
|
-
var shouldClose;
|
714
|
-
return regenerator_default().wrap(function _callee$(_context) {
|
715
|
-
while (1) switch (_context.prev = _context.next) {
|
716
|
-
case 0:
|
717
|
-
shouldClose = true;
|
718
|
-
if (!(typeof props.beforeClose === 'function')) {
|
719
|
-
_context.next = 5;
|
720
|
-
break;
|
721
|
-
}
|
722
|
-
_context.next = 4;
|
723
|
-
return props.beforeClose();
|
724
|
-
case 4:
|
725
|
-
shouldClose = _context.sent;
|
726
|
-
case 5:
|
727
|
-
if (shouldClose) {
|
728
|
-
emit('update:isShow', false);
|
729
|
-
emit('closed');
|
730
|
-
isModalShow.value = false;
|
731
|
-
}
|
732
|
-
case 6:
|
733
|
-
case "end":
|
734
|
-
return _context.stop();
|
735
|
-
}
|
736
|
-
}, _callee);
|
737
|
-
}));
|
738
|
-
return function handleClose() {
|
739
|
-
return _ref2.apply(this, arguments);
|
740
|
-
};
|
741
|
-
}();
|
742
|
-
var handleConfirm = function handleConfirm() {
|
743
|
-
emit('update:isShow', false);
|
744
|
-
emit('confirm');
|
745
|
-
// isModalShow.value = false; 影响异步关闭
|
746
|
-
};
|
747
|
-
var hasFooter = (0,external_vue_namespaceObject.computed)(function () {
|
748
|
-
return ['process', 'operation', 'confirm'].includes(props.dialogType);
|
749
|
-
});
|
750
|
-
// 按 esc 关闭弹框
|
751
|
-
var escCloseHandler = function escCloseHandler(e) {
|
752
|
-
if (props.isShow && props.closeIcon) {
|
753
|
-
if (e.keyCode === 27) {
|
754
|
-
handleClose();
|
755
|
-
}
|
756
|
-
}
|
757
|
-
};
|
758
|
-
// 上一步
|
759
|
-
var handlePrevStep = function handlePrevStep() {
|
760
|
-
emit('prev');
|
761
|
-
};
|
762
|
-
// 下一步
|
763
|
-
var handleNextStep = function handleNextStep() {
|
764
|
-
emit('next');
|
765
|
-
};
|
766
|
-
// 拖拽事件
|
767
|
-
var moveHandler = function moveHandler(e) {
|
768
|
-
if (props.fullscreen) {
|
769
|
-
return false;
|
770
|
-
}
|
771
|
-
if (!props.draggable) {
|
772
|
-
return false;
|
773
|
-
}
|
774
|
-
var odiv = e.target;
|
775
|
-
var parentHeight = e.currentTarget.parentNode.parentNode.offsetHeight;
|
776
|
-
var parentWidth = e.currentTarget.parentNode.parentNode.offsetWidth;
|
777
|
-
var disX;
|
778
|
-
var disY;
|
779
|
-
if (data.positionX !== 0 && data.positionY !== 0) {
|
780
|
-
disX = e.clientX - data.positionX;
|
781
|
-
disY = e.clientY - data.positionY;
|
782
|
-
} else {
|
783
|
-
disX = e.clientX - odiv.offsetLeft;
|
784
|
-
disY = e.clientY - odiv.offsetTop;
|
785
|
-
}
|
786
|
-
document.onmousemove = function (e) {
|
787
|
-
var boxLeft = window.innerWidth - parentWidth;
|
788
|
-
var boxTop = window.innerHeight - parentHeight;
|
789
|
-
var left = e.clientX - disX;
|
790
|
-
var top = e.clientY - disY;
|
791
|
-
if (boxLeft / 2 - left <= 0) {
|
792
|
-
left = boxLeft / 2;
|
793
|
-
} else if (boxLeft / 2 + left <= 0) {
|
794
|
-
left = -boxLeft / 2;
|
795
|
-
}
|
796
|
-
if (boxTop / 2 - top <= 0) {
|
797
|
-
top = boxTop / 2;
|
798
|
-
} else if (boxTop / 2 + top <= 0) {
|
799
|
-
top = -boxTop / 2;
|
800
|
-
}
|
801
|
-
data.positionX = left;
|
802
|
-
data.positionY = top;
|
803
|
-
data.moveStyle.left = "calc(50% + ".concat(left, "px)");
|
804
|
-
data.moveStyle.top = "calc(50% + ".concat(top, "px)");
|
805
|
-
};
|
806
|
-
document.onmouseup = function () {
|
807
|
-
document.onmousemove = null;
|
808
|
-
document.onmouseup = null;
|
809
|
-
};
|
810
|
-
};
|
811
|
-
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
812
|
-
resolveClassName = _usePrefix.resolveClassName;
|
813
|
-
return {
|
814
|
-
data: data,
|
815
|
-
handleClose: handleClose,
|
816
|
-
handleConfirm: handleConfirm,
|
817
|
-
escCloseHandler: escCloseHandler,
|
818
|
-
moveHandler: moveHandler,
|
819
|
-
handlePrevStep: handlePrevStep,
|
820
|
-
handleNextStep: handleNextStep,
|
821
|
-
hasFooter: hasFooter,
|
822
|
-
isModalShow: isModalShow,
|
823
|
-
localConfirmText: localConfirmText,
|
824
|
-
localCancelText: localCancelText,
|
825
|
-
localPrevText: localPrevText,
|
826
|
-
localNextText: localNextText,
|
827
|
-
resolveClassName: resolveClassName
|
828
|
-
};
|
829
|
-
},
|
830
|
-
render: function render() {
|
831
|
-
var _this = this;
|
832
|
-
var renderIcon = function renderIcon() {
|
833
|
-
var iconMap = {
|
834
|
-
loading: (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Spinner, {
|
835
|
-
"class": [_this.resolveClassName('info-icon'), 'primary']
|
836
|
-
}, null),
|
837
|
-
warning: (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Warn, {
|
838
|
-
"class": [_this.resolveClassName('info-icon'), 'warning']
|
839
|
-
}, null),
|
840
|
-
success: (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Success, {
|
841
|
-
"class": [_this.resolveClassName('info-icon'), 'success']
|
842
|
-
}, null),
|
843
|
-
danger: (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Close, {
|
844
|
-
"class": [_this.resolveClassName('info-icon'), 'danger']
|
845
|
-
}, null)
|
846
|
-
};
|
847
|
-
return iconMap[_this.infoType];
|
848
|
-
};
|
849
|
-
var dialogSlot = {
|
850
|
-
header: function header() {
|
851
|
-
var _this$$slots$tools, _this$$slots$tools2, _this$$slots, _this$$slots$header, _this$$slots$header2, _this$$slots2;
|
852
|
-
return [(0,external_vue_namespaceObject.createVNode)("div", {
|
853
|
-
"class": [_this.resolveClassName('dialog-tool'), _this.fullscreen || !_this.draggable ? '' : 'move', _this.draggable ? 'content-dragging' : ''],
|
854
|
-
"onMousedown": _this.moveHandler
|
855
|
-
}, [(_this$$slots$tools = (_this$$slots$tools2 = (_this$$slots = _this.$slots).tools) === null || _this$$slots$tools2 === void 0 ? void 0 : _this$$slots$tools2.call(_this$$slots)) !== null && _this$$slots$tools !== void 0 ? _this$$slots$tools : '']), (0,external_vue_namespaceObject.createVNode)("div", {
|
856
|
-
"class": _this.resolveClassName('dialog-header')
|
857
|
-
}, [(0,external_vue_namespaceObject.createVNode)("div", {
|
858
|
-
"class": _this.resolveClassName('header-icon')
|
859
|
-
}, [_this.infoType ? renderIcon() : (0,external_vue_namespaceObject.createVNode)("slot", {
|
860
|
-
"name": "info-icon"
|
861
|
-
}, null)]), (0,external_vue_namespaceObject.createVNode)("span", {
|
862
|
-
"class": _this.resolveClassName('dialog-title'),
|
863
|
-
"style": "text-align: ".concat(_this.headerAlign)
|
864
|
-
}, [(_this$$slots$header = (_this$$slots$header2 = (_this$$slots2 = _this.$slots).header) === null || _this$$slots$header2 === void 0 ? void 0 : _this$$slots$header2.call(_this$$slots2)) !== null && _this$$slots$header !== void 0 ? _this$$slots$header : _this.title])])];
|
865
|
-
},
|
866
|
-
"default": function _default() {
|
867
|
-
var _this$$slots$default, _this$$slots$default2, _this$$slots3;
|
868
|
-
return (_this$$slots$default = (_this$$slots$default2 = (_this$$slots3 = _this.$slots)["default"]) === null || _this$$slots$default2 === void 0 ? void 0 : _this$$slots$default2.call(_this$$slots3)) !== null && _this$$slots$default !== void 0 ? _this$$slots$default : 'default';
|
869
|
-
},
|
870
|
-
footer: function footer() {
|
871
|
-
var _this$$slots$footer, _this$$slots$footer2, _this$$slots4, _this$$slots$footer3, _this$$slots$footer4, _this$$slots5, _this$$slots$footer5, _this$$slots$footer6, _this$$slots6;
|
872
|
-
return (0,external_vue_namespaceObject.createVNode)("div", {
|
873
|
-
"class": _this.resolveClassName('dialog-footer'),
|
874
|
-
"style": "text-align: ".concat(_this.footerAlign)
|
875
|
-
}, [_this.dialogType === 'process' ? (_this$$slots$footer = (_this$$slots$footer2 = (_this$$slots4 = _this.$slots).footer) === null || _this$$slots$footer2 === void 0 ? void 0 : _this$$slots$footer2.call(_this$$slots4)) !== null && _this$$slots$footer !== void 0 ? _this$$slots$footer : (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [_this.current === 1 ? '' : (0,external_vue_namespaceObject.createVNode)(button_namespaceObject["default"], {
|
876
|
-
"class": _this.resolveClassName('dialog-perv'),
|
877
|
-
"onClick": _this.handlePrevStep
|
878
|
-
}, {
|
879
|
-
"default": function _default() {
|
880
|
-
return [_this.localPrevText];
|
881
|
-
}
|
882
|
-
}), _this.current === _this.totalStep ? '' : (0,external_vue_namespaceObject.createVNode)(button_namespaceObject["default"], {
|
883
|
-
"class": _this.resolveClassName('dialog-next'),
|
884
|
-
"onClick": _this.handleNextStep
|
885
|
-
}, {
|
886
|
-
"default": function _default() {
|
887
|
-
return [_this.localNextText];
|
888
|
-
}
|
889
|
-
}), _this.current === _this.totalStep ? (0,external_vue_namespaceObject.createVNode)(button_namespaceObject["default"], {
|
890
|
-
"onClick": _this.handleConfirm,
|
891
|
-
"theme": _this.theme,
|
892
|
-
"loading": _this.isLoading
|
893
|
-
}, {
|
894
|
-
"default": function _default() {
|
895
|
-
return [_this.localConfirmText];
|
896
|
-
}
|
897
|
-
}) : '', (0,external_vue_namespaceObject.createVNode)(button_namespaceObject["default"], {
|
898
|
-
"class": _this.resolveClassName('dialog-cancel'),
|
899
|
-
"onClick": _this.handleClose,
|
900
|
-
"disabled": _this.isLoading
|
901
|
-
}, {
|
902
|
-
"default": function _default() {
|
903
|
-
return [_this.localCancelText];
|
904
|
-
}
|
905
|
-
})]) : '', _this.dialogType === 'operation' ? (_this$$slots$footer3 = (_this$$slots$footer4 = (_this$$slots5 = _this.$slots).footer) === null || _this$$slots$footer4 === void 0 ? void 0 : _this$$slots$footer4.call(_this$$slots5)) !== null && _this$$slots$footer3 !== void 0 ? _this$$slots$footer3 : (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)(button_namespaceObject["default"], {
|
906
|
-
"onClick": _this.handleConfirm,
|
907
|
-
"theme": _this.theme,
|
908
|
-
"loading": _this.isLoading
|
909
|
-
}, {
|
910
|
-
"default": function _default() {
|
911
|
-
return [_this.localConfirmText];
|
912
|
-
}
|
913
|
-
}), (0,external_vue_namespaceObject.createVNode)(button_namespaceObject["default"], {
|
914
|
-
"class": _this.resolveClassName('dialog-cancel'),
|
915
|
-
"onClick": _this.handleClose,
|
916
|
-
"disabled": _this.isLoading
|
917
|
-
}, {
|
918
|
-
"default": function _default() {
|
919
|
-
return [_this.localCancelText];
|
920
|
-
}
|
921
|
-
})]) : '', _this.dialogType === 'confirm' ? (_this$$slots$footer5 = (_this$$slots$footer6 = (_this$$slots6 = _this.$slots).footer) === null || _this$$slots$footer6 === void 0 ? void 0 : _this$$slots$footer6.call(_this$$slots6)) !== null && _this$$slots$footer5 !== void 0 ? _this$$slots$footer5 : (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)(button_namespaceObject["default"], {
|
922
|
-
"onClick": _this.handleConfirm,
|
923
|
-
"theme": _this.theme,
|
924
|
-
"loading": _this.isLoading
|
925
|
-
}, {
|
926
|
-
"default": function _default() {
|
927
|
-
return [_this.localConfirmText];
|
928
|
-
}
|
929
|
-
})]) : '']);
|
930
|
-
},
|
931
|
-
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
932
|
-
close: function close() {
|
933
|
-
return (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Error, {
|
934
|
-
"onClick": _this.handleClose
|
935
|
-
}, null);
|
936
|
-
}
|
937
|
-
};
|
938
|
-
var className = "".concat(this.resolveClassName('dialog-wrapper '), " ").concat(this.scrollable ? 'scroll-able' : '', " ").concat(this.multiInstance ? 'multi-instance' : '', " ").concat(this.hasFooter ? 'has-footer' : 'no-footer');
|
939
|
-
return (0,external_vue_namespaceObject.createVNode)(modal_namespaceObject["default"], (0,external_vue_namespaceObject.mergeProps)(this.$props, {
|
940
|
-
"class": className,
|
941
|
-
"onClose": this.handleClose,
|
942
|
-
"isShow": this.isModalShow,
|
943
|
-
"left": this.data.moveStyle.left,
|
944
|
-
"top": this.data.moveStyle.top
|
945
|
-
}), _isSlot(dialogSlot) ? dialogSlot : {
|
946
|
-
"default": function _default() {
|
947
|
-
return [dialogSlot];
|
948
|
-
}
|
949
|
-
});
|
950
|
-
}
|
951
|
-
}));
|
514
|
+
const config_provider_namespaceObject = config_provider_x({ ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.usePrefix });
|
515
|
+
;// CONCATENATED MODULE: external "../dialog"
|
516
|
+
var dialog_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
517
|
+
var dialog_y = x => () => x
|
518
|
+
const dialog_namespaceObject = dialog_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_dialog_497cb4c3__["default"] });
|
519
|
+
;// CONCATENATED MODULE: external "../dialog/dialog.less"
|
520
|
+
var dialog_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
521
|
+
var dialog_less_y = x => () => x
|
522
|
+
const dialog_less_namespaceObject = dialog_less_x({ });
|
952
523
|
;// CONCATENATED MODULE: ../../packages/info-box/src/info-box.tsx
|
953
524
|
|
954
525
|
|
955
526
|
|
956
|
-
function
|
957
|
-
function
|
527
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
528
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
958
529
|
|
959
530
|
/*
|
960
531
|
* Tencent is pleased to support the open source community by making
|
@@ -984,15 +555,18 @@ function info_box_objectSpread(e) { for (var r = 1; r < arguments.length; r++) {
|
|
984
555
|
|
985
556
|
|
986
557
|
|
558
|
+
|
987
559
|
var InfoBox = function InfoBox(config) {
|
988
560
|
var container = document.createElement('div');
|
989
561
|
var modalFuncProps = (0,external_vue_namespaceObject.shallowRef)(config);
|
990
562
|
var isShow = (0,external_vue_namespaceObject.ref)(modalFuncProps.value.isShow !== false);
|
991
563
|
var app;
|
564
|
+
var dialogConfirm;
|
992
565
|
var dialog = (0,external_vue_namespaceObject.defineComponent)({
|
993
566
|
name: 'DialogConfirm',
|
994
567
|
setup: function setup(_props, _ref) {
|
995
568
|
var expose = _ref.expose;
|
569
|
+
var isLoading = false;
|
996
570
|
var beforeHiddenFn = [];
|
997
571
|
var resolveUserCallbackFnBeforeClose = /*#__PURE__*/function () {
|
998
572
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee(userCallbackFn) {
|
@@ -1049,8 +623,12 @@ var InfoBox = function InfoBox(config) {
|
|
1049
623
|
return regenerator_default().wrap(function _callee3$(_context3) {
|
1050
624
|
while (1) switch (_context3.prev = _context3.next) {
|
1051
625
|
case 0:
|
1052
|
-
|
1053
|
-
|
626
|
+
isLoading = true;
|
627
|
+
_context3.next = 3;
|
628
|
+
return resolveUserCallbackFnBeforeClose((_modalFuncProps$value2 = modalFuncProps.value) === null || _modalFuncProps$value2 === void 0 ? void 0 : _modalFuncProps$value2.onConfirm);
|
629
|
+
case 3:
|
630
|
+
isLoading = false;
|
631
|
+
case 4:
|
1054
632
|
case "end":
|
1055
633
|
return _context3.stop();
|
1056
634
|
}
|
@@ -1061,7 +639,7 @@ var InfoBox = function InfoBox(config) {
|
|
1061
639
|
};
|
1062
640
|
}();
|
1063
641
|
function update(newValue) {
|
1064
|
-
modalFuncProps.value =
|
642
|
+
modalFuncProps.value = _objectSpread(_objectSpread({}, modalFuncProps.value), newValue);
|
1065
643
|
}
|
1066
644
|
expose({
|
1067
645
|
update: update
|
@@ -1097,14 +675,16 @@ var InfoBox = function InfoBox(config) {
|
|
1097
675
|
return fn();
|
1098
676
|
});
|
1099
677
|
beforeHiddenFn.length = 0;
|
678
|
+
unmountApp();
|
1100
679
|
container.remove();
|
1101
680
|
};
|
1102
681
|
return function () {
|
1103
|
-
return (0,external_vue_namespaceObject.createVNode)(
|
682
|
+
return (0,external_vue_namespaceObject.createVNode)(dialog_namespaceObject["default"], _objectSpread(_objectSpread({
|
1104
683
|
"class": resolveClassName('info-wrapper'),
|
1105
684
|
headerAlign: 'center',
|
1106
685
|
footerAlign: 'center',
|
1107
|
-
fullscreen: false
|
686
|
+
fullscreen: false,
|
687
|
+
isLoading: isLoading
|
1108
688
|
}, modalFuncProps.value), {}, {
|
1109
689
|
isShow: isShow.value,
|
1110
690
|
transfer: false,
|
@@ -1118,9 +698,15 @@ var InfoBox = function InfoBox(config) {
|
|
1118
698
|
var beforeShow = function beforeShow() {
|
1119
699
|
if (!app) {
|
1120
700
|
document.body.append(container);
|
1121
|
-
app = (0,external_vue_namespaceObject.createApp)(dialog)
|
701
|
+
app = (0,external_vue_namespaceObject.createApp)(dialog);
|
702
|
+
dialogConfirm = app.mount(container);
|
1122
703
|
}
|
1123
704
|
};
|
705
|
+
var unmountApp = function unmountApp() {
|
706
|
+
var _app;
|
707
|
+
(_app = app) === null || _app === void 0 || _app.unmount();
|
708
|
+
app = null;
|
709
|
+
};
|
1124
710
|
if (isShow.value) {
|
1125
711
|
beforeShow();
|
1126
712
|
}
|
@@ -1131,17 +717,16 @@ var InfoBox = function InfoBox(config) {
|
|
1131
717
|
},
|
1132
718
|
hide: function hide() {
|
1133
719
|
isShow.value = false;
|
720
|
+
unmountApp();
|
1134
721
|
},
|
1135
722
|
update: function update(config) {
|
1136
|
-
var
|
723
|
+
var _dialogConfirm;
|
1137
724
|
beforeShow();
|
1138
|
-
(
|
725
|
+
(_dialogConfirm = dialogConfirm) === null || _dialogConfirm === void 0 || _dialogConfirm.update(config);
|
1139
726
|
},
|
1140
727
|
destroy: function destroy() {
|
1141
|
-
var _app2;
|
1142
728
|
container.remove();
|
1143
|
-
(
|
1144
|
-
app = null;
|
729
|
+
unmountApp();
|
1145
730
|
}
|
1146
731
|
};
|
1147
732
|
};
|
@@ -10,27 +10,22 @@
|
|
10
10
|
.bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-modal-body {
|
11
11
|
border-radius: 2px;
|
12
12
|
}
|
13
|
-
.bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-dialog-header {
|
14
|
-
padding: 24px 24px 0;
|
15
|
-
}
|
16
13
|
.bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-dialog-header .bk-dialog-title {
|
17
|
-
|
18
|
-
margin: 15px 0 10px;
|
14
|
+
margin-top: 16px;
|
19
15
|
}
|
20
16
|
.bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-modal-content {
|
21
|
-
height:
|
22
|
-
max-height:
|
23
|
-
min-height:
|
24
|
-
padding: 0 50px 10px;
|
17
|
+
height: initial;
|
18
|
+
max-height: initial;
|
19
|
+
min-height: initial;
|
25
20
|
word-break: break-all;
|
26
21
|
}
|
27
22
|
.bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-modal-content .bk-info-sub-title {
|
28
|
-
margin-bottom: 10px;
|
29
23
|
text-align: center;
|
30
24
|
word-break: break-all;
|
31
25
|
}
|
32
26
|
.bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-modal-footer {
|
33
|
-
|
27
|
+
height: initial;
|
28
|
+
margin-top: 24px;
|
34
29
|
background-color: #fff;
|
35
30
|
border-top: none;
|
36
31
|
}
|
@@ -4,7 +4,7 @@ export interface ModalFuncProps {
|
|
4
4
|
width?: string | number;
|
5
5
|
height?: string | number;
|
6
6
|
'ext-cls': string | string[];
|
7
|
-
|
7
|
+
theme?: 'primary' | 'warning' | 'success' | 'danger';
|
8
8
|
infoType?: 'success' | 'danger' | 'warning' | 'loading';
|
9
9
|
title?: string | (() => VNode | string) | VNode;
|
10
10
|
subTitle?: string | (() => VNode) | VNode;
|