bkui-vue 1.0.3-beta.40 → 1.0.3-beta.42

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.
@@ -62,6 +62,8 @@ declare const BkModal: {
62
62
  };
63
63
  direction: import("vue-types").VueTypeValidableDef<string> & {
64
64
  default: string;
65
+ } & {
66
+ default: string;
65
67
  };
66
68
  title: import("vue-types").VueTypeValidableDef<string> & {
67
69
  default: string;
@@ -99,29 +101,21 @@ declare const BkModal: {
99
101
  onClose?: (...args: any[]) => any;
100
102
  onHidden?: (...args: any[]) => any;
101
103
  onShown?: (...args: any[]) => any;
102
- "onQuick-close"?: (...args: any[]) => any;
103
104
  onQuickClose?: (...args: any[]) => any;
105
+ "onQuick-close"?: (...args: any[]) => any;
104
106
  }, {
107
+ zIndex: import("vue").Ref<string | number>;
105
108
  visible: import("vue").Ref<boolean>;
106
- compStyle: import("vue").ComputedRef<{
107
- [x: string]: string | number;
108
- width: string | number;
109
- height: string | number;
110
- minHeigth: string;
109
+ contentStyles: import("vue").Ref<{}>;
110
+ isContentScroll: import("vue").Ref<boolean>;
111
+ modalWrapperStyles: import("vue").ComputedRef<{
111
112
  display: string;
112
- zIndex: string | number;
113
- left: string;
114
- top: string;
115
- }>;
116
- fullscreenStyle: import("vue").ComputedRef<{
117
- width: string;
118
- height: string;
119
113
  }>;
120
114
  handleClickOutSide: (e: MouseEvent) => void;
121
115
  refRoot: import("vue").Ref<HTMLElement>;
122
116
  refMask: import("vue").Ref<HTMLElement>;
123
- showMask: boolean;
124
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "hidden" | "shown" | "quick-close" | "quickClose")[], import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
117
+ resolveClassName: (cls: string) => string;
118
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "hidden" | "shown" | "quickClose" | "quick-close")[], import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
125
119
  isShow: import("vue-types").VueTypeValidableDef<boolean> & {
126
120
  default: boolean;
127
121
  } & {
@@ -183,6 +177,8 @@ declare const BkModal: {
183
177
  };
184
178
  direction: import("vue-types").VueTypeValidableDef<string> & {
185
179
  default: string;
180
+ } & {
181
+ default: string;
186
182
  };
187
183
  title: import("vue-types").VueTypeValidableDef<string> & {
188
184
  default: string;
@@ -220,8 +216,8 @@ declare const BkModal: {
220
216
  onClose?: (...args: any[]) => any;
221
217
  onHidden?: (...args: any[]) => any;
222
218
  onShown?: (...args: any[]) => any;
223
- "onQuick-close"?: (...args: any[]) => any;
224
219
  onQuickClose?: (...args: any[]) => any;
220
+ "onQuick-close"?: (...args: any[]) => any;
225
221
  }, {
226
222
  title: string;
227
223
  width: string | number;
@@ -235,12 +231,12 @@ declare const BkModal: {
235
231
  transfer: string | boolean | HTMLElement;
236
232
  direction: string;
237
233
  renderDirective: "show" | "if";
238
- quickClose: boolean;
239
234
  scrollable: boolean;
240
235
  showMask: boolean;
241
236
  closeIcon: boolean;
242
237
  escClose: boolean;
243
238
  fullscreen: boolean;
239
+ quickClose: boolean;
244
240
  animateType: string;
245
241
  multiInstance: boolean;
246
242
  bodyClass: string | unknown[];
@@ -313,6 +309,8 @@ declare const BkModal: {
313
309
  };
314
310
  direction: import("vue-types").VueTypeValidableDef<string> & {
315
311
  default: string;
312
+ } & {
313
+ default: string;
316
314
  };
317
315
  title: import("vue-types").VueTypeValidableDef<string> & {
318
316
  default: string;
@@ -350,28 +348,20 @@ declare const BkModal: {
350
348
  onClose?: (...args: any[]) => any;
351
349
  onHidden?: (...args: any[]) => any;
352
350
  onShown?: (...args: any[]) => any;
353
- "onQuick-close"?: (...args: any[]) => any;
354
351
  onQuickClose?: (...args: any[]) => any;
352
+ "onQuick-close"?: (...args: any[]) => any;
355
353
  }, {
354
+ zIndex: import("vue").Ref<string | number>;
356
355
  visible: import("vue").Ref<boolean>;
357
- compStyle: import("vue").ComputedRef<{
358
- [x: string]: string | number;
359
- width: string | number;
360
- height: string | number;
361
- minHeigth: string;
356
+ contentStyles: import("vue").Ref<{}>;
357
+ isContentScroll: import("vue").Ref<boolean>;
358
+ modalWrapperStyles: import("vue").ComputedRef<{
362
359
  display: string;
363
- zIndex: string | number;
364
- left: string;
365
- top: string;
366
- }>;
367
- fullscreenStyle: import("vue").ComputedRef<{
368
- width: string;
369
- height: string;
370
360
  }>;
371
361
  handleClickOutSide: (e: MouseEvent) => void;
372
362
  refRoot: import("vue").Ref<HTMLElement>;
373
363
  refMask: import("vue").Ref<HTMLElement>;
374
- showMask: boolean;
364
+ resolveClassName: (cls: string) => string;
375
365
  }, {}, {}, {}, {
376
366
  title: string;
377
367
  width: string | number;
@@ -385,12 +375,12 @@ declare const BkModal: {
385
375
  transfer: string | boolean | HTMLElement;
386
376
  direction: string;
387
377
  renderDirective: "show" | "if";
388
- quickClose: boolean;
389
378
  scrollable: boolean;
390
379
  showMask: boolean;
391
380
  closeIcon: boolean;
392
381
  escClose: boolean;
393
382
  fullscreen: boolean;
383
+ quickClose: boolean;
394
384
  animateType: string;
395
385
  multiInstance: boolean;
396
386
  bodyClass: string | unknown[];
@@ -460,6 +450,8 @@ declare const BkModal: {
460
450
  };
461
451
  direction: import("vue-types").VueTypeValidableDef<string> & {
462
452
  default: string;
453
+ } & {
454
+ default: string;
463
455
  };
464
456
  title: import("vue-types").VueTypeValidableDef<string> & {
465
457
  default: string;
@@ -497,29 +489,21 @@ declare const BkModal: {
497
489
  onClose?: (...args: any[]) => any;
498
490
  onHidden?: (...args: any[]) => any;
499
491
  onShown?: (...args: any[]) => any;
500
- "onQuick-close"?: (...args: any[]) => any;
501
492
  onQuickClose?: (...args: any[]) => any;
493
+ "onQuick-close"?: (...args: any[]) => any;
502
494
  }, {
495
+ zIndex: import("vue").Ref<string | number>;
503
496
  visible: import("vue").Ref<boolean>;
504
- compStyle: import("vue").ComputedRef<{
505
- [x: string]: string | number;
506
- width: string | number;
507
- height: string | number;
508
- minHeigth: string;
497
+ contentStyles: import("vue").Ref<{}>;
498
+ isContentScroll: import("vue").Ref<boolean>;
499
+ modalWrapperStyles: import("vue").ComputedRef<{
509
500
  display: string;
510
- zIndex: string | number;
511
- left: string;
512
- top: string;
513
- }>;
514
- fullscreenStyle: import("vue").ComputedRef<{
515
- width: string;
516
- height: string;
517
501
  }>;
518
502
  handleClickOutSide: (e: MouseEvent) => void;
519
503
  refRoot: import("vue").Ref<HTMLElement>;
520
504
  refMask: import("vue").Ref<HTMLElement>;
521
- showMask: boolean;
522
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "hidden" | "shown" | "quick-close" | "quickClose")[], "close" | "hidden" | "shown" | "quick-close" | "quickClose", {
505
+ resolveClassName: (cls: string) => string;
506
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "hidden" | "shown" | "quickClose" | "quick-close")[], "close" | "hidden" | "shown" | "quickClose" | "quick-close", {
523
507
  title: string;
524
508
  width: string | number;
525
509
  height: string | number;
@@ -532,12 +516,12 @@ declare const BkModal: {
532
516
  transfer: string | boolean | HTMLElement;
533
517
  direction: string;
534
518
  renderDirective: "show" | "if";
535
- quickClose: boolean;
536
519
  scrollable: boolean;
537
520
  showMask: boolean;
538
521
  closeIcon: boolean;
539
522
  escClose: boolean;
540
523
  fullscreen: boolean;
524
+ quickClose: boolean;
541
525
  animateType: string;
542
526
  multiInstance: boolean;
543
527
  bodyClass: string | unknown[];
@@ -604,6 +588,8 @@ declare const BkModal: {
604
588
  };
605
589
  direction: import("vue-types").VueTypeValidableDef<string> & {
606
590
  default: string;
591
+ } & {
592
+ default: string;
607
593
  };
608
594
  title: import("vue-types").VueTypeValidableDef<string> & {
609
595
  default: string;
@@ -3,6 +3,7 @@ import "./modal.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 __WEBPACK_EXTERNAL_MODULE_lodash_throttle_a7b7506a__ from "lodash/throttle";
6
7
  import * as __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__ from "vue-types";
7
8
  /******/ var __webpack_modules__ = ({
8
9
 
@@ -513,6 +514,97 @@ var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
513
514
  var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
514
515
  var config_provider_y = x => () => x
515
516
  const config_provider_namespaceObject = config_provider_x({ ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.usePrefix });
517
+ ;// CONCATENATED MODULE: external "lodash/throttle"
518
+ var throttle_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
519
+ var throttle_y = x => () => x
520
+ const throttle_namespaceObject = throttle_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_lodash_throttle_a7b7506a__["default"] });
521
+ ;// CONCATENATED MODULE: ../../packages/modal/src/hooks.ts
522
+ /*
523
+ * Tencent is pleased to support the open source community by making
524
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
525
+ *
526
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
527
+ *
528
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
529
+ *
530
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
531
+ *
532
+ * ---------------------------------------------------
533
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
534
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
535
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
536
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
537
+ *
538
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
539
+ * the Software.
540
+ *
541
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
542
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
543
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
544
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
545
+ * IN THE SOFTWARE.
546
+ */
547
+
548
+
549
+
550
+ var useContentResize = function useContentResize(root, props) {
551
+ var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
552
+ resolveClassName = _usePrefix.resolveClassName;
553
+ var isContentScroll = (0,external_vue_namespaceObject.ref)(false);
554
+ var contentStyles = (0,external_vue_namespaceObject.ref)({});
555
+ var observer;
556
+ var handleResize = (0,throttle_namespaceObject["default"])(function () {
557
+ var calcContentScroll = function calcContentScroll() {
558
+ var _root$value$querySele = root.value.querySelector(".".concat(resolveClassName('modal-header'))).getBoundingClientRect(),
559
+ headerHeight = _root$value$querySele.height;
560
+ var _root$value$querySele2 = root.value.querySelector(".".concat(resolveClassName('modal-content'))).getBoundingClientRect(),
561
+ contentHeight = _root$value$querySele2.height;
562
+ var _root$value$querySele3 = root.value.querySelector(".".concat(resolveClassName('modal-footer'))).getBoundingClientRect(),
563
+ footerHeight = _root$value$querySele3.height;
564
+ var windowInnerHeight = window.innerHeight;
565
+ isContentScroll.value = windowInnerHeight < headerHeight + contentHeight + footerHeight;
566
+ if (isContentScroll.value || props.fullscreen) {
567
+ contentStyles.value = {
568
+ height: "".concat(windowInnerHeight - headerHeight - footerHeight, "px"),
569
+ overflow: 'scroll'
570
+ };
571
+ } else {
572
+ contentStyles.value = {};
573
+ }
574
+ };
575
+ observer = new MutationObserver(function () {
576
+ calcContentScroll();
577
+ });
578
+ observer.observe(root.value.querySelector(".".concat(resolveClassName('modal-content'), " div")), {
579
+ subtree: true,
580
+ attributes: true,
581
+ childList: true,
582
+ characterData: true
583
+ });
584
+ calcContentScroll();
585
+ }, 30);
586
+ (0,external_vue_namespaceObject.watch)(function () {
587
+ return props.isShow;
588
+ }, function () {
589
+ if (props.isShow) {
590
+ setTimeout(function () {
591
+ handleResize();
592
+ }, 100);
593
+ } else {
594
+ if (observer) {
595
+ observer.takeRecords();
596
+ observer.disconnect();
597
+ observer = null;
598
+ }
599
+ }
600
+ }, {
601
+ immediate: true
602
+ });
603
+ return {
604
+ contentStyles: contentStyles,
605
+ isContentScroll: isContentScroll
606
+ };
607
+ };
516
608
  ;// CONCATENATED MODULE: external "vue-types"
517
609
  var external_vue_types_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
518
610
  var external_vue_types_y = x => () => x
@@ -555,8 +647,8 @@ var ModalSizeEnum;
555
647
  var propsMixin = {
556
648
  // 是否显示弹框
557
649
  isShow: shared_namespaceObject.PropTypes.bool.def(false),
558
- width: shared_namespaceObject.PropTypes.oneOfType([String, Number]).def('50%'),
559
- height: shared_namespaceObject.PropTypes.oneOfType([String, Number]).def('50%'),
650
+ width: shared_namespaceObject.PropTypes.oneOfType([String, Number]).def('480px'),
651
+ height: shared_namespaceObject.PropTypes.oneOfType([String, Number]).def('1000'),
560
652
  // 配置自定义样式类名
561
653
  extCls: shared_namespaceObject.PropTypes.string || shared_namespaceObject.PropTypes.array,
562
654
  // 弹框出现时,是否允许页面滚动
@@ -582,7 +674,7 @@ var propsMixin = {
582
674
  // 内容区最大高度
583
675
  maxHeight: shared_namespaceObject.PropTypes.string,
584
676
  // 弹出方向
585
- direction: shared_namespaceObject.PropTypes.string,
677
+ direction: shared_namespaceObject.PropTypes.string.def(''),
586
678
  // title
587
679
  title: shared_namespaceObject.PropTypes.string.def(''),
588
680
  // 动画类型
@@ -639,36 +731,36 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
639
731
 
640
732
 
641
733
 
734
+
642
735
  /* harmony default export */ const modal = ((0,external_vue_namespaceObject.defineComponent)({
643
736
  name: 'Modal',
644
737
  props: _objectSpread({}, propsMixin),
645
738
  emits: ['quick-close', 'quickClose', 'hidden', 'shown', 'close'],
646
739
  setup: function setup(props, ctx) {
647
- var visible = (0,external_vue_namespaceObject.ref)(false);
648
- var zIndex = (0,external_vue_namespaceObject.ref)(props.zIndex);
649
740
  var refRoot = (0,external_vue_namespaceObject.ref)();
650
741
  var refMask = (0,external_vue_namespaceObject.ref)();
742
+ var teleportTo = (0,external_vue_namespaceObject.ref)('body');
743
+ var visible = (0,external_vue_namespaceObject.ref)(false);
744
+ var zIndex = (0,external_vue_namespaceObject.ref)(props.zIndex);
745
+ var enableTeleport = (0,external_vue_namespaceObject.ref)(!!props.transfer);
651
746
  var backgroundColor = (0,external_vue_namespaceObject.ref)('rgba(0,0,0,0.6)');
652
747
  var closeTimer;
653
- var dialogWidth = (0,external_vue_namespaceObject.computed)(function () {
654
- return /^\d+\.?\d*$/.test("".concat(props.width)) ? "".concat(props.width, "px") : props.width;
655
- });
656
- var dialogHeight = (0,external_vue_namespaceObject.computed)(function () {
657
- return /^\d+\.?\d*$/.test("".concat(props.height)) ? "".concat(props.height, "px") : props.height;
658
- });
659
- var compStyle = (0,external_vue_namespaceObject.computed)(function () {
660
- return _defineProperty({
661
- width: dialogWidth.value,
662
- height: dialogHeight.value,
663
- minHeigth: "".concat(200, "px"),
664
- display: visible.value ? 'inherit' : 'none',
665
- zIndex: zIndex.value || 'inherit',
748
+ var _useContentResize = useContentResize(refRoot, props),
749
+ contentStyles = _useContentResize.contentStyles,
750
+ isContentScroll = _useContentResize.isContentScroll;
751
+ var modalWrapperStyles = (0,external_vue_namespaceObject.computed)(function () {
752
+ var baseStyles = {
753
+ display: visible.value ? 'inherit' : 'none'
754
+ };
755
+ if (props.fullscreen) {
756
+ return baseStyles;
757
+ }
758
+ return Object.assign(baseStyles, _defineProperty({
759
+ width: /^\d+\.?\d*$/.test("".concat(props.width)) ? "".concat(props.width, "px") : props.width,
666
760
  left: props.left,
667
761
  top: props.top
668
- }, props.direction, 0);
762
+ }, props.direction, 0));
669
763
  });
670
- var enableTeleport = (0,external_vue_namespaceObject.ref)(!!props.transfer);
671
- var teleportTo = (0,external_vue_namespaceObject.ref)('body');
672
764
  var resolveTransfer = function resolveTransfer() {
673
765
  if (props.transfer) {
674
766
  if (typeof props.transfer === 'boolean') {
@@ -703,12 +795,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
703
795
  _target === null || _target === void 0 || _target.appendChild(refRoot.value);
704
796
  }
705
797
  };
706
- var fullscreenStyle = (0,external_vue_namespaceObject.computed)(function () {
707
- return {
708
- width: "".concat(100, "%"),
709
- height: "".concat(100, "%")
710
- };
711
- });
712
798
  var closeModal = function closeModal() {
713
799
  shared_namespaceObject.mask.hideMask({
714
800
  el: refRoot.value,
@@ -753,7 +839,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
753
839
  immediate: true
754
840
  });
755
841
  var handleBeforeClose = /*#__PURE__*/function () {
756
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee(callbackFn) {
842
+ var _ref = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee(callbackFn) {
757
843
  var shouldClose, execRet;
758
844
  return regenerator_default().wrap(function _callee$(_context) {
759
845
  while (1) switch (_context.prev = _context.next) {
@@ -791,7 +877,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
791
877
  }, _callee);
792
878
  }));
793
879
  return function handleBeforeClose(_x) {
794
- return _ref2.apply(this, arguments);
880
+ return _ref.apply(this, arguments);
795
881
  };
796
882
  }();
797
883
  var handleClickOutSide = function handleClickOutSide(e) {
@@ -807,67 +893,56 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
807
893
  }
808
894
  };
809
895
  return {
896
+ zIndex: zIndex,
810
897
  visible: visible,
811
- compStyle: compStyle,
812
- fullscreenStyle: fullscreenStyle,
898
+ contentStyles: contentStyles,
899
+ isContentScroll: isContentScroll,
900
+ modalWrapperStyles: modalWrapperStyles,
813
901
  handleClickOutSide: handleClickOutSide,
814
902
  refRoot: refRoot,
815
903
  refMask: refMask,
816
- showMask: props.showMask
904
+ resolveClassName: resolveClassName
817
905
  };
818
906
  },
819
907
  render: function render() {
820
- var _this$extCls,
821
- _this$bodyClass,
822
- _this$$slots$header,
823
- _this$$slots$header2,
908
+ var _this$$slots$header,
824
909
  _this$$slots,
825
- _this$$slots$footer,
826
- _this$$slots$footer2,
910
+ _this$$slots$default,
827
911
  _this$$slots2,
828
- _this$$slots$close,
829
- _this$$slots$close2,
912
+ _this$$slots$footer,
830
913
  _this$$slots3,
914
+ _this$$slots$close,
915
+ _this$$slots4,
831
916
  _this = this;
832
- console.log('this.$sltos = ', this.$slots);
833
- var _usePrefix2 = (0,config_provider_namespaceObject.usePrefix)(),
834
- resolveClassName = _usePrefix2.resolveClassName;
835
- var maxHeight = this.maxHeight ? {
836
- maxHeight: this.maxHeight
837
- } : {};
838
- var bodyClass = "".concat(resolveClassName('modal-body'), " ").concat(this.animateType === 'slide' ? this.direction : '');
839
917
  return (0,external_vue_namespaceObject.createVNode)("div", {
840
918
  "ref": "refRoot",
841
- "class": [resolveClassName('modal-ctx'), this.visible ? '--show' : '--hide'],
919
+ "class": _defineProperty(_defineProperty(_defineProperty({}, this.resolveClassName('modal-ctx'), true), '--show', this.visible), '--hide', !this.visible),
842
920
  "style": {
843
- zIndex: this.compStyle.zIndex
921
+ zIndex: this.zIndex
844
922
  }
845
- }, [this.showMask ? (0,external_vue_namespaceObject.createVNode)("div", {
923
+ }, [this.showMask && (0,external_vue_namespaceObject.createVNode)("div", {
846
924
  "ref": "refMask",
847
- "class": [resolveClassName('modal-ctx-mask'), this.visible ? '--show' : '--hide'],
848
- "onClick": this.handleClickOutSide,
849
- "style": {
850
- zIndex: this.compStyle.zIndex
851
- }
852
- }, null) : '', (0,external_vue_namespaceObject.createVNode)("div", {
853
- "class": [resolveClassName('modal-wrapper'), (_this$extCls = this.extCls) !== null && _this$extCls !== void 0 ? _this$extCls : '', (_this$bodyClass = this.bodyClass) !== null && _this$bodyClass !== void 0 ? _this$bodyClass : '', this.size, this.fullscreen ? 'fullscreen' : ''],
854
- "style": [this.compStyle, this.fullscreen ? this.fullscreenStyle : '']
925
+ "class": _defineProperty({}, this.resolveClassName('modal-ctx-mask'), true),
926
+ "onClick": this.handleClickOutSide
927
+ }, null), (0,external_vue_namespaceObject.createVNode)("div", {
928
+ "class": _defineProperty(_defineProperty(_defineProperty({}, this.resolveClassName('modal-wrapper'), true), 'scroll-able', this.scrollable), 'multi-instance', this.multiInstance),
929
+ "style": this.modalWrapperStyles
855
930
  }, [(0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Transition, {
856
931
  "name": this.animateType
857
932
  }, {
858
933
  "default": function _default() {
859
- return [_this.visible ? (0,external_vue_namespaceObject.createVNode)("div", {
860
- "class": bodyClass
934
+ return [_this.visible && (0,external_vue_namespaceObject.createVNode)("div", {
935
+ "class": _defineProperty(_defineProperty({}, _this.resolveClassName('modal-body'), true), _this.direction, _this.animateType === 'slide')
861
936
  }, [(0,external_vue_namespaceObject.createVNode)("div", {
862
- "class": resolveClassName('modal-header')
863
- }, [(_this$$slots$header = (_this$$slots$header2 = (_this$$slots = _this.$slots).header) === null || _this$$slots$header2 === void 0 ? void 0 : _this$$slots$header2.call(_this$$slots)) !== null && _this$$slots$header !== void 0 ? _this$$slots$header : '']), _this.$slots["default"] && (0,external_vue_namespaceObject.createVNode)("div", {
864
- "class": resolveClassName('modal-content'),
865
- "style": [_this.dialogType === 'show' ? 'padding-bottom: 20px' : '', _objectSpread({}, maxHeight)]
866
- }, [_this.$slots["default"]()]), _this.dialogType === 'show' ? '' : (0,external_vue_namespaceObject.createVNode)("div", {
867
- "class": resolveClassName('modal-footer')
868
- }, [(_this$$slots$footer = (_this$$slots$footer2 = (_this$$slots2 = _this.$slots).footer) === null || _this$$slots$footer2 === void 0 ? void 0 : _this$$slots$footer2.call(_this$$slots2)) !== null && _this$$slots$footer !== void 0 ? _this$$slots$footer : '']), _this.closeIcon && (0,external_vue_namespaceObject.createVNode)("div", {
869
- "class": resolveClassName('modal-close')
870
- }, [(_this$$slots$close = (_this$$slots$close2 = (_this$$slots3 = _this.$slots).close) === null || _this$$slots$close2 === void 0 ? void 0 : _this$$slots$close2.call(_this$$slots3)) !== null && _this$$slots$close !== void 0 ? _this$$slots$close : ''])]) : ''];
937
+ "class": _this.resolveClassName('modal-header')
938
+ }, [(_this$$slots$header = (_this$$slots = _this.$slots).header) === null || _this$$slots$header === void 0 ? void 0 : _this$$slots$header.call(_this$$slots)]), (0,external_vue_namespaceObject.createVNode)("div", {
939
+ "class": _this.resolveClassName('modal-content'),
940
+ "style": _this.contentStyles
941
+ }, [(0,external_vue_namespaceObject.createVNode)("div", null, [(_this$$slots$default = (_this$$slots2 = _this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots2)])]), (0,external_vue_namespaceObject.createVNode)("div", {
942
+ "class": _defineProperty(_defineProperty({}, _this.resolveClassName('modal-footer'), true), 'is-fixed', _this.isContentScroll)
943
+ }, [(_this$$slots$footer = (_this$$slots3 = _this.$slots).footer) === null || _this$$slots$footer === void 0 ? void 0 : _this$$slots$footer.call(_this$$slots3)]), _this.closeIcon && (0,external_vue_namespaceObject.createVNode)("div", {
944
+ "class": _this.resolveClassName('modal-close')
945
+ }, [(_this$$slots$close = (_this$$slots4 = _this.$slots).close) === null || _this$$slots$close === void 0 ? void 0 : _this$$slots$close.call(_this$$slots4)])])];
871
946
  }
872
947
  })])]);
873
948
  }
@@ -1,37 +1,16 @@
1
- .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper {
1
+ .bk-info-wrapper .bk-modal-wrapper {
2
2
  width: 440px;
3
3
  }
4
- .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper.normal {
5
- width: 440px;
6
- }
7
- .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper.small {
8
- width: 400px;
9
- }
10
- .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-modal-body {
11
- border-radius: 2px;
12
- }
13
- .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-dialog-header .bk-dialog-title {
4
+ .bk-info-wrapper .bk-modal-wrapper .bk-dialog-header .bk-dialog-title {
14
5
  margin-top: 16px;
15
6
  }
16
- .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-modal-content {
17
- height: initial;
18
- max-height: initial;
19
- min-height: initial;
20
- word-break: break-all;
7
+ .bk-info-wrapper .bk-dialog-footer button {
8
+ min-width: 88px;
21
9
  }
22
- .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-modal-content .bk-info-sub-title {
10
+ .bk-info-sub-title {
23
11
  text-align: center;
24
12
  word-break: break-all;
25
13
  }
26
- .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-modal-footer {
27
- height: initial;
28
- margin-top: 24px;
29
- background-color: #fff;
30
- border-top: none;
31
- }
32
- .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-modal-footer .bk-dialog-footer button {
33
- min-width: 88px;
34
- }
35
14
  .bk-modal-ctx {
36
15
  top: 0px;
37
16
  left: 0px;
@@ -42,10 +21,13 @@
42
21
  .bk-modal-ctx.--show {
43
22
  position: fixed;
44
23
  }
24
+ .bk-modal-ctx.--show .bk-modal-ctx-mask {
25
+ display: block;
26
+ }
45
27
  .bk-modal-ctx.--hide {
46
28
  display: none;
47
29
  }
48
- .bk-modal-ctx .bk-modal-ctx-mask {
30
+ .bk-modal-ctx-mask {
49
31
  top: 0;
50
32
  left: 0;
51
33
  display: none;
@@ -53,44 +35,45 @@
53
35
  height: 100%;
54
36
  background-color: rgba(0, 0, 0, 0.6);
55
37
  }
56
- .bk-modal-ctx .bk-modal-ctx-mask.--show {
57
- position: fixed;
58
- display: inherit;
59
- }
60
38
  .bk-modal-wrapper {
61
39
  position: absolute;
62
40
  top: 50%;
63
41
  left: 50%;
64
- width: 480px;
65
42
  border-radius: 2px;
66
43
  transform: translate(-50%, -50%);
67
44
  }
68
- .bk-modal-wrapper .bk-modal-outside {
45
+ .bk-modal-outside {
69
46
  position: fixed;
70
47
  top: 0;
71
48
  right: 0;
72
49
  bottom: 0;
73
50
  left: 0;
74
51
  }
75
- .bk-modal-wrapper.normal {
76
- width: 480px;
77
- height: 240px;
78
- }
79
- .bk-modal-wrapper.small {
80
- width: 400px;
81
- height: 200px;
82
- }
83
- .bk-modal-wrapper.medium {
84
- width: 640px;
85
- height: 400px;
86
- }
87
- .bk-modal-wrapper.large {
88
- width: 960px;
89
- height: 720px;
90
- }
91
- .bk-modal-wrapper .bk-modal-body {
52
+ .bk-modal-body {
92
53
  height: 100%;
93
54
  overflow: hidden;
94
55
  background: #fff;
56
+ border-radius: 2px;
95
57
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
96
58
  }
59
+ .bk-modal-body {
60
+ overflow: auto;
61
+ }
62
+ .bk-modal-close {
63
+ position: absolute;
64
+ top: 6px;
65
+ right: 6px;
66
+ display: flex;
67
+ width: 32px;
68
+ height: 32px;
69
+ font-size: 18px;
70
+ color: #979ba5;
71
+ cursor: pointer;
72
+ align-items: center;
73
+ justify-content: center;
74
+ border-radius: 50%;
75
+ transition: 0.15s;
76
+ }
77
+ .bk-modal-close:hover {
78
+ background: #f0f1f5;
79
+ }