bkui-vue 1.0.3-beta.11 → 1.0.3-beta.13

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.
@@ -993,6 +993,7 @@ var InfoBox = function InfoBox(config) {
993
993
  name: 'DialogConfirm',
994
994
  setup: function setup(_props, _ref) {
995
995
  var expose = _ref.expose;
996
+ var isLoading = false;
996
997
  var beforeHiddenFn = [];
997
998
  var resolveUserCallbackFnBeforeClose = /*#__PURE__*/function () {
998
999
  var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee(userCallbackFn) {
@@ -1049,8 +1050,12 @@ var InfoBox = function InfoBox(config) {
1049
1050
  return regenerator_default().wrap(function _callee3$(_context3) {
1050
1051
  while (1) switch (_context3.prev = _context3.next) {
1051
1052
  case 0:
1052
- resolveUserCallbackFnBeforeClose((_modalFuncProps$value2 = modalFuncProps.value) === null || _modalFuncProps$value2 === void 0 ? void 0 : _modalFuncProps$value2.onConfirm);
1053
- case 1:
1053
+ isLoading = true;
1054
+ _context3.next = 3;
1055
+ return resolveUserCallbackFnBeforeClose((_modalFuncProps$value2 = modalFuncProps.value) === null || _modalFuncProps$value2 === void 0 ? void 0 : _modalFuncProps$value2.onConfirm);
1056
+ case 3:
1057
+ isLoading = false;
1058
+ case 4:
1054
1059
  case "end":
1055
1060
  return _context3.stop();
1056
1061
  }
@@ -1104,7 +1109,8 @@ var InfoBox = function InfoBox(config) {
1104
1109
  "class": resolveClassName('info-wrapper'),
1105
1110
  headerAlign: 'center',
1106
1111
  footerAlign: 'center',
1107
- fullscreen: false
1112
+ fullscreen: false,
1113
+ isLoading: isLoading
1108
1114
  }, modalFuncProps.value), {}, {
1109
1115
  isShow: isShow.value,
1110
1116
  transfer: false,
@@ -23,5 +23,5 @@
23
23
  * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24
24
  * IN THE SOFTWARE.
25
25
  */
26
- import $bkPopover from '../../popover/src/plugin-popover';
26
+ import $bkPopover from '../popover/plugin-popover';
27
27
  export default $bkPopover;
@@ -741,7 +741,19 @@ var TableColumnProp = {
741
741
  var fn = function fn() {
742
742
  // @ts-ignore
743
743
  var selfVnode = _this._;
744
- var colList = selfVnode.parent.vnode.children["default"]() || [];
744
+ var getTableNode = function getTableNode() {
745
+ var _parentVnode$type;
746
+ var parentVnode = selfVnode.parent;
747
+ if (((_parentVnode$type = parentVnode.type) === null || _parentVnode$type === void 0 ? void 0 : _parentVnode$type.name) === 'Table') {
748
+ return parentVnode.vnode;
749
+ }
750
+ return getTableNode();
751
+ };
752
+ var tableNode = getTableNode();
753
+ if (!tableNode) {
754
+ return;
755
+ }
756
+ var colList = tableNode.children["default"]() || [];
745
757
  var sortColumns = [];
746
758
  var index = 0;
747
759
  var reduceColumns = function reduceColumns(nodes) {
@@ -749,7 +761,7 @@ var TableColumnProp = {
749
761
  return;
750
762
  }
751
763
  nodes.forEach(function (node) {
752
- var _node$type, _node$children2;
764
+ var _node$type, _node$children2, _node$type2;
753
765
  if (Array.isArray(node)) {
754
766
  reduceColumns(node);
755
767
  return;
@@ -767,7 +779,7 @@ var TableColumnProp = {
767
779
  sortColumns.push((0,external_vue_namespaceObject.unref)(resolveProp));
768
780
  index = index + 1;
769
781
  }
770
- if ((_node$children2 = node.children) !== null && _node$children2 !== void 0 && _node$children2.length && skipValidateKey0) {
782
+ if ((_node$children2 = node.children) !== null && _node$children2 !== void 0 && _node$children2.length && skipValidateKey0 && ((_node$type2 = node.type) === null || _node$type2 === void 0 ? void 0 : _node$type2.name) !== 'Table') {
771
783
  reduceColumns(node.children);
772
784
  }
773
785
  });
@@ -4423,14 +4435,21 @@ const directives_namespaceObject = directives_x({ ["bkEllipsisInstance"]: () =>
4423
4435
  });
4424
4436
  var resolveSetting = function resolveSetting() {
4425
4437
  if (/boolean|object/.test(typeof_typeof(props.column.showOverflowTooltip)) && props.column.showOverflowTooltip !== null) {
4438
+ var _props$column$showOve = props.column.showOverflowTooltip,
4439
+ _props$column$showOve2 = _props$column$showOve.content,
4440
+ content = _props$column$showOve2 === void 0 ? '' : _props$column$showOve2,
4441
+ _props$column$showOve3 = _props$column$showOve.mode,
4442
+ mode = _props$column$showOve3 === void 0 ? undefined : _props$column$showOve3,
4443
+ _props$column$showOve4 = _props$column$showOve.popoverOption,
4444
+ popoverOption = _props$column$showOve4 === void 0 ? {} : _props$column$showOve4;
4426
4445
  var result = {
4427
4446
  showOverflowTooltip: {
4428
- content: '',
4447
+ content: content,
4429
4448
  disabled: !props.column.showOverflowTooltip,
4430
- mode: undefined,
4449
+ mode: mode,
4431
4450
  resizerWay: undefined,
4432
4451
  watchCellResize: undefined,
4433
- popoverOption: {}
4452
+ popoverOption: popoverOption
4434
4453
  }
4435
4454
  };
4436
4455
  if (props.parentSetting !== null && typeof_typeof(props.parentSetting) === 'object') {
@@ -4448,11 +4467,11 @@ const directives_namespaceObject = directives_x({ ["bkEllipsisInstance"]: () =>
4448
4467
  showOverflowTooltip: props.parentSetting
4449
4468
  };
4450
4469
  };
4451
- var _resolveSetting = resolveSetting(),
4452
- _resolveSetting$showO = _resolveSetting.showOverflowTooltip,
4453
- showOverflowTooltip = _resolveSetting$showO === void 0 ? false : _resolveSetting$showO;
4454
4470
  var bkEllipsisIns = null;
4455
4471
  var resolveTooltipOption = function resolveTooltipOption() {
4472
+ var _resolveSetting = resolveSetting(),
4473
+ _resolveSetting$showO = _resolveSetting.showOverflowTooltip,
4474
+ showOverflowTooltip = _resolveSetting$showO === void 0 ? false : _resolveSetting$showO;
4456
4475
  var disabled = true;
4457
4476
  var resizerWay = props.resizerWay;
4458
4477
  var content = function content() {
@@ -4495,8 +4514,8 @@ const directives_namespaceObject = directives_x({ ["bkEllipsisInstance"]: () =>
4495
4514
  }
4496
4515
  }
4497
4516
  if (props.isHead) {
4498
- var _props$column$showOve, _props$column;
4499
- disabled = !((_props$column$showOve = (_props$column = props.column) === null || _props$column === void 0 || (_props$column = _props$column.showOverflowTooltip) === null || _props$column === void 0 ? void 0 : _props$column.showHead) !== null && _props$column$showOve !== void 0 ? _props$column$showOve : true);
4517
+ var _props$column$showOve5, _props$column;
4518
+ disabled = !((_props$column$showOve5 = (_props$column = props.column) === null || _props$column === void 0 || (_props$column = _props$column.showOverflowTooltip) === null || _props$column === void 0 ? void 0 : _props$column.showHead) !== null && _props$column$showOve5 !== void 0 ? _props$column$showOve5 : true);
4500
4519
  mode = 'auto';
4501
4520
  content = function content() {
4502
4521
  var _getEllipsisTarget;
@@ -5065,13 +5084,14 @@ function _isSlot(s) {
5065
5084
  });
5066
5085
  });
5067
5086
  var lastDragRow = null;
5087
+ var lastDragRowClass = '';
5068
5088
  var insertPlaceDiv = function insertPlaceDiv(target, placement) {
5069
5089
  if (placement === '--top') {
5070
5090
  target.parentNode.insertBefore(placeDiv, target);
5071
5091
  return;
5072
5092
  }
5073
5093
  if (target.nextElementSibling === null) {
5074
- target.parentNode.appendChild(placeDiv);
5094
+ target.parentNode.append(placeDiv);
5075
5095
  return;
5076
5096
  }
5077
5097
  target.parentNode.insertBefore(placeDiv, target.nextElementSibling);
@@ -5127,6 +5147,7 @@ function _isSlot(s) {
5127
5147
  var onDragleave = function onDragleave(event) {
5128
5148
  beforeEventFire(function () {
5129
5149
  var target = getTargetRow(event);
5150
+ lastDragRowClass = target.classList.contains('--bottom') ? '--bottom' : '--top';
5130
5151
  removeDragClass(target, ['--drag-enter', '--bottom', '--top']);
5131
5152
  });
5132
5153
  };
@@ -5149,12 +5170,12 @@ function _isSlot(s) {
5149
5170
  var rowIndex = target.dataset.rowIndex;
5150
5171
  var targetIndex = Number(rowIndex);
5151
5172
  var sourceIndex = (_event$target$dataset = event.target.dataset) === null || _event$target$dataset === void 0 ? void 0 : _event$target$dataset.rowIndex;
5152
- if (target.classList.contains('--bottom')) {
5173
+ if (lastDragRowClass === '--bottom') {
5153
5174
  targetIndex = targetIndex + 1;
5154
5175
  }
5155
5176
  resp.changePageRowIndex(Number(sourceIndex), targetIndex);
5156
- removeDragClass(target, ['--drag-enter', '--bottom', '--top']);
5157
5177
  lastDragRow = null;
5178
+ lastDragRowClass = '';
5158
5179
  ctx.emit(EMIT_EVENTS.DRAG_END, {
5159
5180
  sourceEvent: event,
5160
5181
  data: resp.pageData
@@ -43,7 +43,7 @@ export declare enum FixedEnum {
43
43
  RIGHT = "right"
44
44
  }
45
45
  export declare const fixedType: import("vue-types").VueTypeValidableDef<"right" | "left">;
46
- export type IOverflowTooltipProp = {
46
+ export type IOverflowTooltipOption = {
47
47
  content: string | Function;
48
48
  disabled?: (col: Column, row: any) => boolean | boolean;
49
49
  watchCellResize?: boolean;
@@ -51,7 +51,8 @@ export type IOverflowTooltipProp = {
51
51
  popoverOption?: any;
52
52
  resizerWay?: ResizerWay;
53
53
  showHead?: boolean;
54
- } | boolean;
54
+ };
55
+ export type IOverflowTooltipProp = IOverflowTooltipOption | boolean;
55
56
  export type IOverflowTooltip = IOverflowTooltipProp;
56
57
  export declare const IOverflowTooltipPropType: import("vue-types").VueTypeDef<IOverflowTooltipProp>;
57
58
  export type ISortOption = {