bkui-vue 0.0.3-beta.5 → 0.0.3-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/index.cjs.js +36 -36
  2. package/dist/index.esm.js +9814 -10065
  3. package/dist/index.umd.js +36 -36
  4. package/dist/locale/en.esm.js +1 -1
  5. package/dist/locale/en.esm.js.map +1 -1
  6. package/dist/locale/en.umd.js +1 -1
  7. package/dist/locale/en.umd.js.map +1 -1
  8. package/dist/locale/zh-cn.esm.js +1 -1
  9. package/dist/locale/zh-cn.esm.js.map +1 -1
  10. package/dist/locale/zh-cn.umd.js +1 -1
  11. package/dist/locale/zh-cn.umd.js.map +1 -1
  12. package/dist/style.css +1 -1
  13. package/dist/style.variable.css +1 -1
  14. package/lib/config-provider/config-provider.d.ts +9 -0
  15. package/lib/config-provider/index.d.ts +12 -0
  16. package/lib/config-provider/token.d.ts +3 -0
  17. package/lib/dialog/dialog.css +61 -35
  18. package/lib/dialog/dialog.d.ts +20 -11
  19. package/lib/dialog/dialog.less +2 -2
  20. package/lib/dialog/dialog.variable.css +61 -35
  21. package/lib/dialog/index.d.ts +38 -22
  22. package/lib/dialog/index.js +4 -3
  23. package/lib/dialog/props.d.ts +8 -4
  24. package/lib/form/form.css +3 -0
  25. package/lib/form/form.less +3 -0
  26. package/lib/form/form.variable.css +3 -0
  27. package/lib/form/index.js +4 -1
  28. package/lib/info-box/index.d.ts +1 -0
  29. package/lib/info-box/index.js +112 -17332
  30. package/lib/info-box/info-box.css +10 -10
  31. package/lib/info-box/info-box.d.ts +4 -3
  32. package/lib/info-box/info-box.less +37 -34
  33. package/lib/info-box/info-box.variable.css +10 -10
  34. package/lib/loading/index.d.ts +4 -4
  35. package/lib/loading/loading.d.ts +3 -3
  36. package/lib/locale/index.js +8 -10
  37. package/lib/locale/lang/en.d.ts +3 -0
  38. package/lib/modal/index.d.ts +108 -65
  39. package/lib/modal/index.js +160 -103
  40. package/lib/modal/modal.css +36 -10
  41. package/lib/modal/modal.d.ts +40 -22
  42. package/lib/modal/modal.less +34 -0
  43. package/lib/modal/modal.variable.css +36 -10
  44. package/lib/modal/props.mixin.d.ts +8 -4
  45. package/lib/preset.d.ts +6 -0
  46. package/lib/resize-layout/index.d.ts +3 -3
  47. package/lib/resize-layout/resize-layout.d.ts +1 -1
  48. package/lib/shared/index.d.ts +1 -2
  49. package/lib/shared/index.js +486 -1133
  50. package/lib/shared/mask.d.ts +11 -0
  51. package/lib/sideslider/index.d.ts +38 -22
  52. package/lib/sideslider/index.js +0 -1
  53. package/lib/sideslider/sideslider.css +12 -11
  54. package/lib/sideslider/sideslider.d.ts +20 -11
  55. package/lib/sideslider/sideslider.less +79 -77
  56. package/lib/sideslider/sideslider.variable.css +12 -11
  57. package/lib/styles/index.d.ts +1 -0
  58. package/lib/table/components/table-column.d.ts +1 -0
  59. package/lib/table/index.d.ts +1 -0
  60. package/lib/table/index.js +2 -1
  61. package/lib/table/props.d.ts +1 -0
  62. package/lib/table/use-column.d.ts +3 -0
  63. package/lib/table-column/index.d.ts +3 -0
  64. package/lib/version-log/index.d.ts +298 -0
  65. package/lib/version-log/index.js +9045 -0
  66. package/lib/version-log/version-log.css +224 -0
  67. package/lib/version-log/version-log.d.ts +203 -0
  68. package/lib/version-log/version-log.less +239 -0
  69. package/lib/version-log/version-log.variable.css +350 -0
  70. package/package.json +2 -1
  71. package/lib/shared/mask-manager.d.ts +0 -89
  72. package/lib/shared/pop-manager.d.ts +0 -41
@@ -36,7 +36,7 @@ __webpack_require__.d(__webpack_exports__, {
36
36
  ;// CONCATENATED MODULE: external "../shared"
37
37
  var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
38
38
  var y = x => () => x
39
- const external_shared_namespaceObject = x({ ["BKPopIndexManager"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.BKPopIndexManager, ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PropTypes, ["dialogTypeUnion"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.dialogTypeUnion, ["renderDirectiveType"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.renderDirectiveType, ["withInstallProps"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.withInstallProps });
39
+ const external_shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PropTypes, ["bkZIndexManager"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.bkZIndexManager, ["dialogTypeUnion"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.dialogTypeUnion, ["isElement"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.isElement, ["mask"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.mask, ["renderDirectiveType"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.renderDirectiveType, ["withInstallProps"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.withInstallProps });
40
40
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
41
41
  function _typeof(obj) {
42
42
  "@babel/helpers - typeof";
@@ -85,7 +85,7 @@ function _defineProperty(obj, key, value) {
85
85
  ;// CONCATENATED MODULE: external "vue"
86
86
  var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
87
87
  var external_vue_y = x => () => x
88
- const external_vue_namespaceObject = external_vue_x({ ["Transition"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Transition, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent });
88
+ const external_vue_namespaceObject = external_vue_x({ ["Transition"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Transition, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
89
89
  ;// CONCATENATED MODULE: external "../config-provider"
90
90
  var external_config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
91
91
  var external_config_provider_y = x => () => x
@@ -155,7 +155,7 @@ var propsMixin = {
155
155
  // 是否显示在body内(即与id#app同级
156
156
  transfer: external_shared_namespaceObject.PropTypes.oneOfType([Boolean, String, HTMLElement]).def(false),
157
157
  // 弹出层z-index,实际显示的值会自动+1。为了抱证在遮罩上正常显示
158
- zIndex: external_shared_namespaceObject.PropTypes.oneOfType([String, Number]).def('inherit'),
158
+ zIndex: external_shared_namespaceObject.PropTypes.oneOfType([String, Number]),
159
159
  // 内容区最大高度
160
160
  maxHeight: external_shared_namespaceObject.PropTypes.string,
161
161
  // 弹出方向
@@ -175,7 +175,9 @@ var propsMixin = {
175
175
  // 是否允许多个弹框同时存在
176
176
  multiInstance: external_shared_namespaceObject.PropTypes.bool.def(true),
177
177
  // info-box
178
- infoType: external_shared_namespaceObject.PropTypes.infoType()
178
+ infoType: external_shared_namespaceObject.PropTypes.theme(),
179
+ left: external_shared_namespaceObject.PropTypes.string,
180
+ top: external_shared_namespaceObject.PropTypes.string
179
181
  };
180
182
  ;// CONCATENATED MODULE: ../../packages/modal/src/modal.tsx
181
183
 
@@ -215,106 +217,148 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
215
217
  name: 'Modal',
216
218
  props: _objectSpread({}, propsMixin),
217
219
  emits: ['quick-close', 'quickClose', 'hidden', 'shown', 'close'],
218
- data: function data() {
219
- return {
220
- visible: false,
221
- closeTimer: null,
222
- bkPopIndexManager: null
223
- };
224
- },
225
- computed: {
226
- dialogWidth: function dialogWidth() {
227
- return /^\d+\.?\d*$/.test("".concat(this.width)) ? "".concat(this.width, "px") : this.width;
228
- },
229
- dialogHeight: function dialogHeight() {
230
- return /^\d+\.?\d*$/.test("".concat(this.height)) ? "".concat(this.height, "px") : this.height;
231
- },
232
- compStyle: function compStyle() {
233
- return {
234
- width: this.dialogWidth,
235
- height: this.dialogHeight,
220
+ setup: function setup(props, ctx) {
221
+ var visible = (0,external_vue_namespaceObject.ref)(false);
222
+ var zIndex = (0,external_vue_namespaceObject.ref)(props.zIndex);
223
+ var refRoot = (0,external_vue_namespaceObject.ref)();
224
+ var refMask = (0,external_vue_namespaceObject.ref)();
225
+ var backgroundColor = (0,external_vue_namespaceObject.ref)('rgba(0,0,0,0.6)');
226
+ var closeTimer;
227
+ var dialogWidth = (0,external_vue_namespaceObject.computed)(function () {
228
+ return /^\d+\.?\d*$/.test("".concat(props.width)) ? "".concat(props.width, "px") : props.width;
229
+ });
230
+ var dialogHeight = (0,external_vue_namespaceObject.computed)(function () {
231
+ return /^\d+\.?\d*$/.test("".concat(props.height)) ? "".concat(props.height, "px") : props.height;
232
+ });
233
+ var compStyle = (0,external_vue_namespaceObject.computed)(function () {
234
+ return _defineProperty({
235
+ width: dialogWidth.value,
236
+ height: dialogHeight.value,
236
237
  minHeigth: "".concat(200, "px"),
237
- display: this.visible ? 'inherit' : 'none',
238
- zIndex: this.zIndex || 'inherit'
239
- };
240
- },
241
- fullscreenStyle: function fullscreenStyle() {
238
+ display: visible.value ? 'inherit' : 'none',
239
+ zIndex: zIndex.value || 'inherit',
240
+ left: props.left,
241
+ top: props.top
242
+ }, props.direction, 0);
243
+ });
244
+ var enableTeleport = (0,external_vue_namespaceObject.ref)(!!props.transfer);
245
+ var teleportTo = (0,external_vue_namespaceObject.ref)('body');
246
+ var resolveTransfer = function resolveTransfer() {
247
+ if (props.transfer) {
248
+ if (typeof props.transfer === 'boolean') {
249
+ teleportTo.value = 'body';
250
+ return;
251
+ }
252
+ teleportTo.value = props.transfer;
253
+ }
254
+ };
255
+ resolveTransfer();
256
+ var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
257
+ resolveClassName = _usePrefix.resolveClassName;
258
+ var resolveClosetModal = function resolveClosetModal() {
259
+ var _refRoot$value;
260
+ if (enableTeleport.value) {
261
+ if (typeof teleportTo.value === 'string') {
262
+ var target = document.querySelector(teleportTo.value);
263
+ target === null || target === void 0 ? void 0 : target.appendChild(refRoot.value);
264
+ return;
265
+ }
266
+ if ((0,external_shared_namespaceObject.isElement)(teleportTo.value)) {
267
+ teleportTo.value.appendChild(refRoot.value);
268
+ return;
269
+ }
270
+ }
271
+ var className = ".".concat(resolveClassName('modal-ctx'));
272
+ var parentNode = (_refRoot$value = refRoot.value) === null || _refRoot$value === void 0 || (_refRoot$value = _refRoot$value.parentElement) === null || _refRoot$value === void 0 ? void 0 : _refRoot$value.closest(className);
273
+ if (parentNode) {
274
+ enableTeleport.value = true;
275
+ teleportTo.value = 'body';
276
+ var _target = document.querySelector(teleportTo.value);
277
+ _target === null || _target === void 0 ? void 0 : _target.appendChild(refRoot.value);
278
+ }
279
+ };
280
+ var fullscreenStyle = (0,external_vue_namespaceObject.computed)(function () {
242
281
  return {
243
282
  width: "".concat(100, "%"),
244
283
  height: "".concat(100, "%")
245
284
  };
246
- }
247
- },
248
- watch: {
249
- isShow: {
250
- handler: function handler(val) {
251
- var _this = this;
252
- if (val) {
253
- // 避免is-show: false执行覆盖
254
- this.closeTimer && clearTimeout(this.closeTimer);
255
- this.closeTimer = null;
256
- this.visible = val;
257
- } else {
258
- this.closeTimer = setTimeout(function () {
259
- // 直接设为false会失去离开的动画效果,这里延迟设置
260
- _this.$emit('hidden'); // 为false直接触发hidden事件,在上层有200ms的延时
261
- _this.visible = val;
262
- }, 250);
285
+ });
286
+ var closeModal = function closeModal() {
287
+ external_shared_namespaceObject.mask.hideMask({
288
+ el: refRoot.value,
289
+ mask: refMask.value,
290
+ showMask: props.showMask,
291
+ backgroundColor: backgroundColor.value
292
+ });
293
+ closeTimer = setTimeout(function () {
294
+ // 直接设为false会失去离开的动画效果,这里延迟设置
295
+ ctx.emit('hidden'); // 为false直接触发hidden事件,在上层有200ms的延时
296
+ if (enableTeleport.value) {
297
+ var _refRoot$value2;
298
+ (_refRoot$value2 = refRoot.value) === null || _refRoot$value2 === void 0 ? void 0 : _refRoot$value2.remove();
263
299
  }
264
- },
265
- immediate: true
266
- },
267
- // isShow 初始化为 true 的时候,防止直接展示
268
- visible: {
269
- handler: function handler(val) {
270
- var _this2 = this;
271
- if (val) {
272
- this.$nextTick(function () {
273
- // isShow初始化为true的时候,放在nextTick才能获取$el
274
- var hideMaskStyle = {
275
- 'background-color': 'rgba(0,0,0,0)'
276
- };
277
- var appendStyle = _this2.showMask ? {} : hideMaskStyle;
278
- _this2.bkPopIndexManager.show(_this2.$el, _this2.showMask, appendStyle, !!_this2.transfer, _this2.zIndex, function (_e) {
279
- _this2.handleClickOutSide();
280
- });
281
- _this2.$emit('shown');
282
- });
283
- } else {
284
- var _this$bkPopIndexManag, _this$bkPopIndexManag2, _this$bkPopIndexManag3;
285
- (_this$bkPopIndexManag = this.bkPopIndexManager) === null || _this$bkPopIndexManag === void 0 ? void 0 : _this$bkPopIndexManag.removeLastEvent();
286
- (_this$bkPopIndexManag2 = this.bkPopIndexManager) === null || _this$bkPopIndexManag2 === void 0 ? void 0 : _this$bkPopIndexManag2.hide(this.$el, !!this.transfer);
287
- (_this$bkPopIndexManag3 = this.bkPopIndexManager) === null || _this$bkPopIndexManag3 === void 0 ? void 0 : _this$bkPopIndexManag3.destroy();
300
+ }, 250);
301
+ };
302
+ (0,external_vue_namespaceObject.watch)(function () {
303
+ return props.isShow;
304
+ }, function (val) {
305
+ if (val) {
306
+ closeTimer && clearTimeout(closeTimer);
307
+ closeTimer = null;
308
+ if (!props.zIndex) {
309
+ zIndex.value = external_shared_namespaceObject.bkZIndexManager.getModalNextIndex();
288
310
  }
289
- },
311
+ visible.value = true;
312
+ (0,external_vue_namespaceObject.nextTick)(function () {
313
+ ctx.emit('shown');
314
+ resolveClosetModal();
315
+ external_shared_namespaceObject.mask.showMask({
316
+ el: refRoot.value,
317
+ mask: refMask.value,
318
+ showMask: props.showMask,
319
+ backgroundColor: backgroundColor.value
320
+ });
321
+ });
322
+ return;
323
+ }
324
+ visible.value = false;
325
+ closeModal();
326
+ }, {
290
327
  immediate: true
291
- }
292
- },
293
- mounted: function mounted() {
294
- var _this$$el;
295
- var popConfig = _objectSpread(_objectSpread({}, this.$props), {
296
- transfer: this.transfer === 'parent' ? (_this$$el = this.$el) === null || _this$$el === void 0 ? void 0 : _this$$el.parentElement : this.transfer
297
328
  });
298
- this.bkPopIndexManager = new external_shared_namespaceObject.BKPopIndexManager(popConfig);
299
- },
300
- beforeUnmount: function beforeUnmount() {
301
- if (this.visible) {
302
- var _this$bkPopIndexManag4, _this$bkPopIndexManag5;
303
- (_this$bkPopIndexManag4 = this.bkPopIndexManager) === null || _this$bkPopIndexManag4 === void 0 ? void 0 : _this$bkPopIndexManag4.hide(this.$el);
304
- (_this$bkPopIndexManag5 = this.bkPopIndexManager) === null || _this$bkPopIndexManag5 === void 0 ? void 0 : _this$bkPopIndexManag5.destroy();
305
- }
306
- },
307
- methods: {
308
- handleClickOutSide: function handleClickOutSide() {
309
- if (this.quickClose) {
310
- this.$emit('close');
311
- this.$emit('quick-close', this.$el);
312
- this.$emit('quickClose', this.$el);
329
+ var handleBeforeClose = function handleBeforeClose(callbackFn) {
330
+ if (typeof props.beforeClose === 'function') {
331
+ if (props.beforeClose() !== true) {
332
+ return;
333
+ }
313
334
  }
314
- }
335
+ callbackFn === null || callbackFn === void 0 ? void 0 : callbackFn();
336
+ };
337
+ var handleClickOutSide = function handleClickOutSide(e) {
338
+ e.stopImmediatePropagation();
339
+ e.stopPropagation();
340
+ e.preventDefault();
341
+ if (props.quickClose) {
342
+ handleBeforeClose(function () {
343
+ ctx.emit('close');
344
+ ctx.emit('quick-close');
345
+ ctx.emit('quickClose');
346
+ });
347
+ }
348
+ };
349
+ return {
350
+ visible: visible,
351
+ compStyle: compStyle,
352
+ fullscreenStyle: fullscreenStyle,
353
+ handleClickOutSide: handleClickOutSide,
354
+ refRoot: refRoot,
355
+ refMask: refMask,
356
+ showMask: props.showMask
357
+ };
315
358
  },
316
359
  render: function render() {
317
- var _this$$slots$header,
360
+ var _this$extCls,
361
+ _this$$slots$header,
318
362
  _this$$slots$header2,
319
363
  _this$$slots,
320
364
  _this$$slots$default,
@@ -326,34 +370,47 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
326
370
  _this$$slots$close,
327
371
  _this$$slots$close2,
328
372
  _this$$slots4,
329
- _this3 = this;
330
- var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
331
- resolveClassName = _usePrefix.resolveClassName;
373
+ _this = this;
374
+ var _usePrefix2 = (0,external_config_provider_namespaceObject.usePrefix)(),
375
+ resolveClassName = _usePrefix2.resolveClassName;
332
376
  var maxHeight = this.maxHeight ? {
333
377
  maxHeight: this.maxHeight
334
378
  } : {};
335
379
  var bodyClass = "".concat(resolveClassName('modal-body'), " ").concat(this.animateType === 'slide' ? this.direction : '');
336
380
  return (0,external_vue_namespaceObject.createVNode)("div", {
337
- "class": [resolveClassName('modal-wrapper'), this.extCls, this.size, this.fullscreen ? 'fullscreen' : ''],
381
+ "ref": "refRoot",
382
+ "class": [resolveClassName('modal-ctx'), this.visible ? '--show' : '--hide'],
383
+ "style": {
384
+ zIndex: this.compStyle.zIndex
385
+ }
386
+ }, [this.showMask ? (0,external_vue_namespaceObject.createVNode)("div", {
387
+ "ref": "refMask",
388
+ "class": [resolveClassName('modal-ctx-mask'), this.visible ? '--show' : '--hide'],
389
+ "onClick": this.handleClickOutSide,
390
+ "style": {
391
+ zIndex: this.compStyle.zIndex
392
+ }
393
+ }, null) : '', (0,external_vue_namespaceObject.createVNode)("div", {
394
+ "class": [resolveClassName('modal-wrapper'), (_this$extCls = this.extCls) !== null && _this$extCls !== void 0 ? _this$extCls : '', this.size, this.fullscreen ? 'fullscreen' : ''],
338
395
  "style": [this.compStyle, this.fullscreen ? this.fullscreenStyle : '']
339
396
  }, [(0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Transition, {
340
397
  "name": this.animateType
341
398
  }, {
342
399
  "default": function _default() {
343
- return [_this3.isShow ? (0,external_vue_namespaceObject.createVNode)("div", {
400
+ return [_this.visible ? (0,external_vue_namespaceObject.createVNode)("div", {
344
401
  "class": bodyClass
345
402
  }, [(0,external_vue_namespaceObject.createVNode)("div", {
346
403
  "class": resolveClassName('modal-header')
347
- }, [(_this$$slots$header = (_this$$slots$header2 = (_this$$slots = _this3.$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 : '']), (0,external_vue_namespaceObject.createVNode)("div", {
404
+ }, [(_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 : '']), (0,external_vue_namespaceObject.createVNode)("div", {
348
405
  "class": resolveClassName('modal-content'),
349
- "style": [_this3.dialogType === 'show' ? 'padding-bottom: 20px' : '', _objectSpread({}, maxHeight)]
350
- }, [(_this$$slots$default = (_this$$slots$default2 = (_this$$slots2 = _this3.$slots)["default"]) === null || _this$$slots$default2 === void 0 ? void 0 : _this$$slots$default2.call(_this$$slots2)) !== null && _this$$slots$default !== void 0 ? _this$$slots$default : '']), _this3.dialogType === 'show' ? '' : (0,external_vue_namespaceObject.createVNode)("div", {
406
+ "style": [_this.dialogType === 'show' ? 'padding-bottom: 20px' : '', _objectSpread({}, maxHeight)]
407
+ }, [(_this$$slots$default = (_this$$slots$default2 = (_this$$slots2 = _this.$slots)["default"]) === null || _this$$slots$default2 === void 0 ? void 0 : _this$$slots$default2.call(_this$$slots2)) !== null && _this$$slots$default !== void 0 ? _this$$slots$default : '']), _this.dialogType === 'show' ? '' : (0,external_vue_namespaceObject.createVNode)("div", {
351
408
  "class": resolveClassName('modal-footer')
352
- }, [(_this$$slots$footer = (_this$$slots$footer2 = (_this$$slots3 = _this3.$slots).footer) === null || _this$$slots$footer2 === void 0 ? void 0 : _this$$slots$footer2.call(_this$$slots3)) !== null && _this$$slots$footer !== void 0 ? _this$$slots$footer : '']), _this3.closeIcon && (0,external_vue_namespaceObject.createVNode)("div", {
409
+ }, [(_this$$slots$footer = (_this$$slots$footer2 = (_this$$slots3 = _this.$slots).footer) === null || _this$$slots$footer2 === void 0 ? void 0 : _this$$slots$footer2.call(_this$$slots3)) !== null && _this$$slots$footer !== void 0 ? _this$$slots$footer : '']), _this.closeIcon && (0,external_vue_namespaceObject.createVNode)("div", {
353
410
  "class": resolveClassName('modal-close')
354
- }, [(_this$$slots$close = (_this$$slots$close2 = (_this$$slots4 = _this3.$slots).close) === null || _this$$slots$close2 === void 0 ? void 0 : _this$$slots$close2.call(_this$$slots4)) !== null && _this$$slots$close !== void 0 ? _this$$slots$close : ''])]) : ''];
411
+ }, [(_this$$slots$close = (_this$$slots$close2 = (_this$$slots4 = _this.$slots).close) === null || _this$$slots$close2 === void 0 ? void 0 : _this$$slots$close2.call(_this$$slots4)) !== null && _this$$slots$close !== void 0 ? _this$$slots$close : ''])]) : ''];
355
412
  }
356
- })]);
413
+ })])]);
357
414
  }
358
415
  }));
359
416
  ;// CONCATENATED MODULE: ../../packages/modal/src/index.ts
@@ -1,42 +1,67 @@
1
- .bk-modal-wrapper.bk-info-wrapper {
1
+ .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper {
2
2
  width: 440px;
3
3
  }
4
- .bk-modal-wrapper.bk-info-wrapper.normal {
4
+ .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper.normal {
5
5
  width: 440px;
6
6
  }
7
- .bk-modal-wrapper.bk-info-wrapper.small {
7
+ .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper.small {
8
8
  width: 400px;
9
9
  }
10
- .bk-modal-wrapper.bk-info-wrapper .bk-modal-body {
10
+ .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-modal-body {
11
11
  border-radius: 2px;
12
12
  }
13
- .bk-modal-wrapper.bk-info-wrapper .bk-dialog-header {
13
+ .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-dialog-header {
14
14
  padding: 24px 24px 0;
15
15
  }
16
- .bk-modal-wrapper.bk-info-wrapper .bk-dialog-header .bk-dialog-title {
16
+ .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-dialog-header .bk-dialog-title {
17
17
  height: 27px;
18
18
  margin: 15px 0 10px;
19
19
  }
20
- .bk-modal-wrapper.bk-info-wrapper .bk-modal-content {
20
+ .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-modal-content {
21
21
  height: 100%;
22
22
  max-height: 100%;
23
23
  min-height: 100%;
24
24
  padding: 0 50px 10px;
25
25
  word-break: break-all;
26
26
  }
27
- .bk-modal-wrapper.bk-info-wrapper .bk-modal-content .bk-info-sub-title {
27
+ .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-modal-content .bk-info-sub-title {
28
28
  margin-bottom: 10px;
29
29
  text-align: center;
30
30
  word-break: break-all;
31
31
  }
32
- .bk-modal-wrapper.bk-info-wrapper .bk-modal-footer {
32
+ .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-modal-footer {
33
33
  padding: 0 65px 33px;
34
34
  background-color: #fff;
35
35
  border-top: none;
36
36
  }
37
- .bk-modal-wrapper.bk-info-wrapper .bk-modal-footer .bk-dialog-footer button {
37
+ .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-modal-footer .bk-dialog-footer button {
38
38
  min-width: 88px;
39
39
  }
40
+ .bk-modal-ctx {
41
+ pointer-events: auto;
42
+ top: 0px;
43
+ left: 0px;
44
+ width: 100%;
45
+ height: 100%;
46
+ }
47
+ .bk-modal-ctx.--show {
48
+ position: fixed;
49
+ }
50
+ .bk-modal-ctx.--hide {
51
+ display: none;
52
+ }
53
+ .bk-modal-ctx .bk-modal-ctx-mask {
54
+ display: none;
55
+ left: 0;
56
+ top: 0;
57
+ width: 100%;
58
+ height: 100%;
59
+ background-color: rgba(0, 0, 0, 0.6);
60
+ }
61
+ .bk-modal-ctx .bk-modal-ctx-mask.--show {
62
+ position: fixed;
63
+ display: inherit;
64
+ }
40
65
  .bk-modal-wrapper {
41
66
  position: absolute;
42
67
  top: 50%;
@@ -70,6 +95,7 @@
70
95
  }
71
96
  .bk-modal-wrapper .bk-modal-body {
72
97
  height: 100%;
98
+ width: 100%;
73
99
  background: #fff;
74
100
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
75
101
  }
@@ -54,9 +54,7 @@ declare const _default: import("vue").DefineComponent<{
54
54
  transfer: import("vue-types").VueTypeDef<string | boolean | HTMLElement> & {
55
55
  default: string | boolean | (() => HTMLElement);
56
56
  };
57
- zIndex: import("vue-types").VueTypeDef<string | number> & {
58
- default: string | number;
59
- };
57
+ zIndex: import("vue-types").VueTypeDef<string | number>;
60
58
  maxHeight: import("vue-types").VueTypeValidableDef<string> & {
61
59
  default: string;
62
60
  };
@@ -83,19 +81,34 @@ declare const _default: import("vue").DefineComponent<{
83
81
  } & {
84
82
  default: boolean;
85
83
  };
86
- infoType: import("vue-types").VueTypeDef<"loading" | "success" | "warning" | "danger">;
87
- }, unknown, {
88
- visible: boolean;
89
- closeTimer: any;
90
- bkPopIndexManager: any;
91
- }, {
92
- dialogWidth(): String | Number;
93
- dialogHeight(): String | Number;
94
- compStyle(): any;
95
- fullscreenStyle(): any;
84
+ infoType: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary">;
85
+ left: import("vue-types").VueTypeValidableDef<string> & {
86
+ default: string;
87
+ };
88
+ top: import("vue-types").VueTypeValidableDef<string> & {
89
+ default: string;
90
+ };
96
91
  }, {
97
- handleClickOutSide(): void;
98
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "shown" | "hidden" | "quick-close" | "quickClose")[], "close" | "shown" | "hidden" | "quick-close" | "quickClose", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
92
+ visible: import("vue").Ref<boolean>;
93
+ compStyle: import("vue").ComputedRef<{
94
+ [x: string]: string | number;
95
+ width: string | number;
96
+ height: string | number;
97
+ minHeigth: string;
98
+ display: string;
99
+ zIndex: string | number;
100
+ left: string;
101
+ top: string;
102
+ }>;
103
+ fullscreenStyle: import("vue").ComputedRef<{
104
+ width: string;
105
+ height: string;
106
+ }>;
107
+ handleClickOutSide: (e: MouseEvent) => void;
108
+ refRoot: import("vue").Ref<HTMLElement>;
109
+ refMask: import("vue").Ref<HTMLElement>;
110
+ showMask: boolean;
111
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "shown" | "hidden" | "quick-close" | "quickClose")[], "close" | "shown" | "hidden" | "quick-close" | "quickClose", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
99
112
  isShow: import("vue-types").VueTypeValidableDef<boolean> & {
100
113
  default: boolean;
101
114
  } & {
@@ -151,9 +164,7 @@ declare const _default: import("vue").DefineComponent<{
151
164
  transfer: import("vue-types").VueTypeDef<string | boolean | HTMLElement> & {
152
165
  default: string | boolean | (() => HTMLElement);
153
166
  };
154
- zIndex: import("vue-types").VueTypeDef<string | number> & {
155
- default: string | number;
156
- };
167
+ zIndex: import("vue-types").VueTypeDef<string | number>;
157
168
  maxHeight: import("vue-types").VueTypeValidableDef<string> & {
158
169
  default: string;
159
170
  };
@@ -180,7 +191,13 @@ declare const _default: import("vue").DefineComponent<{
180
191
  } & {
181
192
  default: boolean;
182
193
  };
183
- infoType: import("vue-types").VueTypeDef<"loading" | "success" | "warning" | "danger">;
194
+ infoType: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary">;
195
+ left: import("vue-types").VueTypeValidableDef<string> & {
196
+ default: string;
197
+ };
198
+ top: import("vue-types").VueTypeValidableDef<string> & {
199
+ default: string;
200
+ };
184
201
  }>> & {
185
202
  onClose?: (...args: any[]) => any;
186
203
  onShown?: (...args: any[]) => any;
@@ -193,19 +210,20 @@ declare const _default: import("vue").DefineComponent<{
193
210
  height: string | number;
194
211
  maxHeight: string;
195
212
  extCls: string | unknown[];
213
+ top: string;
214
+ left: string;
196
215
  isShow: boolean;
197
- zIndex: string | number;
198
216
  draggable: boolean;
199
217
  transfer: string | boolean | HTMLElement;
200
- showMask: boolean;
201
- multiInstance: boolean;
202
218
  direction: string;
203
219
  renderDirective: "show" | "if";
204
220
  quickClose: boolean;
205
221
  scrollable: boolean;
222
+ showMask: boolean;
206
223
  closeIcon: boolean;
207
224
  escClose: boolean;
208
225
  fullscreen: boolean;
209
226
  animateType: string;
227
+ multiInstance: boolean;
210
228
  }, {}>;
211
229
  export default _default;
@@ -1,6 +1,39 @@
1
1
  @import '../styles/themes/themes.less';
2
2
  @import '../info-box/info-box.less';
3
3
 
4
+ .@{bk-prefix}-modal-ctx {
5
+ pointer-events: auto;
6
+ top: 0px;
7
+ left: 0px;
8
+
9
+ width: 100%;
10
+ height: 100%;
11
+
12
+ &.--show {
13
+ position: fixed;
14
+ }
15
+
16
+ &.--hide {
17
+ display: none;
18
+ }
19
+
20
+ .@{bk-prefix}-modal-ctx-mask {
21
+ display: none;
22
+ left: 0;
23
+ top: 0;
24
+ width: 100%;
25
+ height: 100%;
26
+ background-color: rgba(0,0,0,0.6);
27
+
28
+ &.--show {
29
+ position: fixed;
30
+ display: inherit;
31
+ }
32
+ }
33
+ }
34
+
35
+
36
+
4
37
  .@{bk-prefix}-modal-wrapper {
5
38
  position: absolute;
6
39
  top: 50%;
@@ -40,6 +73,7 @@
40
73
 
41
74
  .@{bk-prefix}-modal-body {
42
75
  height: 100%;
76
+ width: 100%;
43
77
  background: #fff;
44
78
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
45
79
  }
@@ -124,45 +124,70 @@
124
124
  --search-select-message-color: var(--danger-color);
125
125
  --search-select-menu-border-color: var(--disable-color);
126
126
  }
127
- .bk-modal-wrapper.bk-info-wrapper {
127
+ .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper {
128
128
  width: 440px;
129
129
  }
130
- .bk-modal-wrapper.bk-info-wrapper.normal {
130
+ .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper.normal {
131
131
  width: 440px;
132
132
  }
133
- .bk-modal-wrapper.bk-info-wrapper.small {
133
+ .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper.small {
134
134
  width: 400px;
135
135
  }
136
- .bk-modal-wrapper.bk-info-wrapper .bk-modal-body {
136
+ .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-modal-body {
137
137
  border-radius: 2px;
138
138
  }
139
- .bk-modal-wrapper.bk-info-wrapper .bk-dialog-header {
139
+ .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-dialog-header {
140
140
  padding: 24px 24px 0;
141
141
  }
142
- .bk-modal-wrapper.bk-info-wrapper .bk-dialog-header .bk-dialog-title {
142
+ .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-dialog-header .bk-dialog-title {
143
143
  height: 27px;
144
144
  margin: 15px 0 10px;
145
145
  }
146
- .bk-modal-wrapper.bk-info-wrapper .bk-modal-content {
146
+ .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-modal-content {
147
147
  height: 100%;
148
148
  max-height: 100%;
149
149
  min-height: 100%;
150
150
  padding: 0 50px 10px;
151
151
  word-break: break-all;
152
152
  }
153
- .bk-modal-wrapper.bk-info-wrapper .bk-modal-content .bk-info-sub-title {
153
+ .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-modal-content .bk-info-sub-title {
154
154
  margin-bottom: 10px;
155
155
  text-align: center;
156
156
  word-break: break-all;
157
157
  }
158
- .bk-modal-wrapper.bk-info-wrapper .bk-modal-footer {
158
+ .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-modal-footer {
159
159
  padding: 0 65px 33px;
160
160
  background-color: #fff;
161
161
  border-top: none;
162
162
  }
163
- .bk-modal-wrapper.bk-info-wrapper .bk-modal-footer .bk-dialog-footer button {
163
+ .bk-modal-ctx.bk-info-wrapper .bk-modal-wrapper .bk-modal-footer .bk-dialog-footer button {
164
164
  min-width: 88px;
165
165
  }
166
+ .bk-modal-ctx {
167
+ pointer-events: auto;
168
+ top: 0px;
169
+ left: 0px;
170
+ width: 100%;
171
+ height: 100%;
172
+ }
173
+ .bk-modal-ctx.--show {
174
+ position: fixed;
175
+ }
176
+ .bk-modal-ctx.--hide {
177
+ display: none;
178
+ }
179
+ .bk-modal-ctx .bk-modal-ctx-mask {
180
+ display: none;
181
+ left: 0;
182
+ top: 0;
183
+ width: 100%;
184
+ height: 100%;
185
+ background-color: rgba(0, 0, 0, 0.6);
186
+ }
187
+ .bk-modal-ctx .bk-modal-ctx-mask.--show {
188
+ position: fixed;
189
+ display: inherit;
190
+ }
166
191
  .bk-modal-wrapper {
167
192
  position: absolute;
168
193
  top: 50%;
@@ -196,6 +221,7 @@
196
221
  }
197
222
  .bk-modal-wrapper .bk-modal-body {
198
223
  height: 100%;
224
+ width: 100%;
199
225
  background: #fff;
200
226
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
201
227
  }