bk-magic-vue 2.4.0-beta.2 → 2.4.0

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 (49) hide show
  1. package/dist/bk-magic-vue.css +17 -8
  2. package/dist/bk-magic-vue.js +63 -22
  3. package/dist/bk-magic-vue.min.css +1 -1
  4. package/dist/bk-magic-vue.min.css.gz +0 -0
  5. package/dist/bk-magic-vue.min.css.map +1 -1
  6. package/dist/bk-magic-vue.min.js +1 -1
  7. package/dist/bk-magic-vue.min.js.gz +0 -0
  8. package/dist/bk-magic-vue.min.js.map +1 -1
  9. package/lib/big-tree.js +1 -1
  10. package/lib/breadcrumb.js +28 -1
  11. package/lib/cascade.js +14 -4
  12. package/lib/date-picker.js +13 -8
  13. package/lib/dialog.js +1 -1
  14. package/lib/directives/overflow-tips.js +1 -1
  15. package/lib/directives/tooltips.js +1 -1
  16. package/lib/form-item.js +1 -1
  17. package/lib/image-viewer.js +1 -1
  18. package/lib/image.js +1 -1
  19. package/lib/info-box.js +1 -1
  20. package/lib/pagination.js +1 -1
  21. package/lib/row.js +1 -1
  22. package/lib/search-select.js +1 -1
  23. package/lib/select.js +1 -1
  24. package/lib/slider.js +1 -1
  25. package/lib/table-column.js +4 -2
  26. package/lib/table.js +6 -9
  27. package/lib/tag-input.js +1 -1
  28. package/lib/time-picker.js +9 -4
  29. package/lib/transfer.js +1 -1
  30. package/lib/ui/bk-magic-vue.css +17 -8
  31. package/lib/ui/bk-magic-vue.min.css +1 -1
  32. package/lib/ui/bk-magic-vue.min.css.gz +0 -0
  33. package/lib/ui/bk-magic-vue.min.css.map +1 -1
  34. package/lib/ui/breadcrumb.css +10 -0
  35. package/lib/ui/breadcrumb.min.css +1 -1
  36. package/lib/ui/breadcrumb.min.css.map +1 -1
  37. package/lib/ui/cascade.css +2 -2
  38. package/lib/ui/cascade.min.css +1 -1
  39. package/lib/ui/cascade.min.css.map +1 -1
  40. package/lib/ui/table.css +8 -5
  41. package/lib/ui/table.min.css +1 -1
  42. package/lib/ui/table.min.css.map +1 -1
  43. package/lib/ui/time-picker.css +0 -1
  44. package/lib/ui/time-picker.min.css +1 -1
  45. package/lib/ui/time-picker.min.css.map +1 -1
  46. package/lib/upload.js +1 -1
  47. package/lib/version-detail.js +1 -1
  48. package/lib/virtual-render.js +1 -1
  49. package/package.json +1 -1
@@ -10344,9 +10344,11 @@ span.bk-date-picker-cells-cell-disabled.bk-date-picker-cells-cell-selected em{
10344
10344
  cursor:pointer;
10345
10345
  color:#C4C6CC
10346
10346
  }
10347
- .bk-table th .bk-table-column-filter-trigger.is-open,
10348
- .bk-table th .bk-table-column-filter-trigger.is-filtered{
10349
- color:#63656E;
10347
+ .bk-table th .bk-table-column-filter-trigger.is-open{
10348
+ color:#63656e;
10349
+ }
10350
+ .bk-table th .bk-table-column-filter-trigger.is-filtered{
10351
+ color:#3a84ff;
10350
10352
  }
10351
10353
  .bk-table th .bk-table-caret-wrapper{
10352
10354
  display:-webkit-inline-box;
@@ -10384,10 +10386,10 @@ span.bk-date-picker-cells-cell-disabled.bk-date-picker-cells-cell-selected em{
10384
10386
  bottom:-1px;
10385
10387
  }
10386
10388
  .bk-table th.ascending .bk-table-sort-caret.ascending{
10387
- border-bottom-color:#63656E;
10389
+ border-bottom-color:#3a84ff;
10388
10390
  }
10389
10391
  .bk-table th.descending .bk-table-sort-caret.descending{
10390
- border-top-color:#63656E;
10392
+ border-top-color:#3a84ff;
10391
10393
  }
10392
10394
  .bk-table td.gutter{
10393
10395
  width:0;
@@ -11245,7 +11247,6 @@ th.bk-table-column-selection .cell, th.bk-table-column-expand .cell, td.bk-table
11245
11247
  box-sizing:border-box;
11246
11248
  padding-top:6px;
11247
11249
  text-align:left;
11248
- //background-color:#e1ecff;
11249
11250
  background-color:rgba(58,132,255,.16);
11250
11251
  mix-blend-mode:multiply;
11251
11252
  color:#3a84ff;
@@ -14508,14 +14509,14 @@ th.bk-table-column-selection .cell, th.bk-table-column-expand .cell, td.bk-table
14508
14509
  min-height:21px;
14509
14510
  line-height:19px;
14510
14511
  word-break:break-all;
14511
- max-width:200px;
14512
+ max-width:150px;
14512
14513
  overflow:hidden;
14513
14514
  display:inline-block;
14514
14515
  text-overflow:ellipsis;
14515
14516
  white-space:nowrap;
14516
14517
  }
14517
14518
  .bk-cascade-tag-list .remove-key{
14518
- position:relative;
14519
+ position:absolute;
14519
14520
  width:18px;
14520
14521
  height:16px;
14521
14522
  top:3px;
@@ -15149,6 +15150,14 @@ th.bk-table-column-selection .cell, th.bk-table-column-expand .cell, td.bk-table
15149
15150
  .bk-breadcrumb-item:last-child .bk-breadcrumb-separator{
15150
15151
  display:none;
15151
15152
  }
15153
+ .bk-breadcrumb-goback{
15154
+ color:#699df4;
15155
+ margin-right:12px;
15156
+ cursor:pointer
15157
+ }
15158
+ .bk-breadcrumb-goback .icon-default{
15159
+ font-size:26px;
15160
+ }
15152
15161
  .bk-divider{
15153
15162
  position:relative
15154
15163
  }
@@ -120,7 +120,7 @@
120
120
  var ownKeys = Object.keys(source);
121
121
 
122
122
  if (typeof Object.getOwnPropertySymbols === 'function') {
123
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
123
+ ownKeys.push.apply(ownKeys, Object.getOwnPropertySymbols(source).filter(function (sym) {
124
124
  return Object.getOwnPropertyDescriptor(source, sym).enumerable;
125
125
  }));
126
126
  }
@@ -7853,10 +7853,10 @@
7853
7853
  return !this.editable || this.readonly;
7854
7854
  },
7855
7855
  hasFooter: function hasFooter() {
7856
- return !!this.$slots.footer;
7856
+ return !!this.$slots.footer || !!this.$scopedSlots.footer;
7857
7857
  },
7858
7858
  hasHeader: function hasHeader() {
7859
- return !!this.$slots.header;
7859
+ return !!this.$slots.header || !!this.$scopedSlots.header;
7860
7860
  },
7861
7861
  allowCrossDayProp: function allowCrossDayProp() {
7862
7862
  return this.panel === 'RangeTimePickerPanel' ? this.allowCrossDay : false;
@@ -8488,7 +8488,12 @@
8488
8488
  },
8489
8489
  "selection-mode-change": _vm.onSelectionModeChange
8490
8490
  }
8491
- }, 'component', _vm.ownPickerProps, false)), _vm.hasFooter ? [_c('div', {
8491
+ }, 'component', _vm.ownPickerProps, false), [_vm.$slots.shortcuts || _vm.$scopedSlots.shortcuts ? _c('div', {
8492
+ attrs: {
8493
+ "slot": "shortcuts"
8494
+ },
8495
+ slot: "shortcuts"
8496
+ }, [_vm._t("shortcuts")], 2) : _vm._e()]), _vm.hasFooter ? [_c('div', {
8492
8497
  staticClass: "bk-date-picker-footer-wrapper",
8493
8498
  class: _vm.footerSlotCls
8494
8499
  }, [_vm._t("footer")], 2)] : _vm._e()], 2)], 1)], 1);
@@ -11879,7 +11884,7 @@
11879
11884
 
11880
11885
  return _c('div', {
11881
11886
  staticClass: "bk-picker-panel-body-wrapper bk-date-picker-with-range",
11882
- class: [_vm.shortcuts.length ? 'bk-picker-panel-with-sidebar' : ''],
11887
+ class: [_vm.shortcuts.length || _vm.$slots.shortcuts ? 'bk-picker-panel-with-sidebar' : ''],
11883
11888
  on: {
11884
11889
  "mousedown": function mousedown($event) {
11885
11890
  $event.preventDefault();
@@ -12113,9 +12118,9 @@
12113
12118
  "pick-clear": _vm.handlePickClear,
12114
12119
  "pick-success": _vm.handlePickSuccess
12115
12120
  }
12116
- }) : _vm._e()], 1), _vm.shortcuts.length ? _c('div', {
12121
+ }) : _vm._e()], 1), _vm.shortcuts.length || _vm.$slots.shortcuts ? _c('div', {
12117
12122
  staticClass: "bk-picker-panel-sidebar"
12118
- }, _vm._l(_vm.shortcuts, function (shortcut, index) {
12123
+ }, [_vm.$slots.shortcuts ? _vm._t("shortcuts") : _vm._l(_vm.shortcuts, function (shortcut, index) {
12119
12124
  return _c('div', {
12120
12125
  key: index,
12121
12126
  staticClass: "bk-picker-panel-shortcut",
@@ -12125,7 +12130,7 @@
12125
12130
  }
12126
12131
  }
12127
12132
  }, [_vm._v(_vm._s(shortcut.text))]);
12128
- }), 0) : _vm._e()]);
12133
+ })], 2) : _vm._e()]);
12129
12134
  };
12130
12135
 
12131
12136
  var __vue_staticRenderFns__$t = [];
@@ -38898,12 +38903,11 @@
38898
38903
  _createClass(TableLayout, [{
38899
38904
  key: "updateScrollY",
38900
38905
  value: function updateScrollY() {
38901
- var height = this.height;
38902
- if (typeof height !== 'string' && typeof height !== 'number') return;
38906
+ if (!this.bodyHeight) return;
38903
38907
  var bodyWrapper = this.table.bodyWrapper;
38904
38908
  if (this.table.$el && bodyWrapper) {
38905
38909
  if (this.table.isVirtualRender) {
38906
- var body = bodyWrapper.querySelector('.bk-virtual-render');
38910
+ var body = bodyWrapper.querySelector('.bk-virtual-section');
38907
38911
  this.scrollY = body.offsetHeight > this.bodyHeight;
38908
38912
  } else {
38909
38913
  var _body = bodyWrapper.querySelector('.bk-table-body');
@@ -38963,10 +38967,8 @@
38963
38967
  });
38964
38968
  }
38965
38969
  var tableHeight = this.tableHeight = this.table.$el.offsetHeight - this.paginationHeight;
38966
- if (this.height !== null && (!isNaN(this.height) || typeof this.height === 'string')) {
38967
- var footerHeight = this.footerHeight = footerWrapper ? footerWrapper.offsetHeight : 0;
38968
- this.bodyHeight = tableHeight - headerHeight - footerHeight + (footerWrapper ? 1 : 0);
38969
- }
38970
+ var footerHeight = this.footerHeight = footerWrapper ? footerWrapper.offsetHeight : 0;
38971
+ this.bodyHeight = tableHeight - headerHeight - footerHeight + (footerWrapper ? 1 : 0);
38970
38972
  this.fixedBodyHeight = this.scrollX ? this.bodyHeight - this.gutterWidth : this.bodyHeight;
38971
38973
  var noData = !this.table.data || this.table.data.length === 0;
38972
38974
  this.viewportHeight = this.scrollX ? tableHeight - (noData ? 0 : this.gutterWidth) : tableHeight;
@@ -41499,10 +41501,10 @@
41499
41501
  },
41500
41502
  doLayout: function doLayout() {
41501
41503
  if (this.$destroyed) return;
41502
- this.layout.updateColumnsWidth();
41503
41504
  if (this.shouldUpdateHeight) {
41504
41505
  this.layout.updateElsHeight();
41505
41506
  }
41507
+ this.layout.updateColumnsWidth();
41506
41508
  },
41507
41509
  sort: function sort(prop, order) {
41508
41510
  this.store.commit('sort', {
@@ -42295,7 +42297,9 @@
42295
42297
  renderCell = DEFAULT_RENDER_CELL;
42296
42298
  }
42297
42299
  if (_self.showOverflowTooltip) {
42298
- var config = _typeof(_self.showOverflowTooltip) === 'object' ? _self.showOverflowTooltip : {};
42300
+ var config = _typeof(_self.showOverflowTooltip) === 'object' ? _self.showOverflowTooltip : {
42301
+ interactive: false
42302
+ };
42299
42303
  return h("div", {
42300
42304
  "class": "cell",
42301
42305
  "directives": [{
@@ -53013,7 +53017,11 @@
53013
53017
  return selections;
53014
53018
  },
53015
53019
  changeValueList: function changeValueList() {
53016
- this.recursiveList(this.cascadeList, this.value, 'init');
53020
+ if (this.isRemote) {
53021
+ this.recursiveList(this.cascadeList, this.value, 'search');
53022
+ } else {
53023
+ this.recursiveList(this.cascadeList, this.value, 'init');
53024
+ }
53017
53025
  this.checkListStatus(this.value);
53018
53026
  var newList = this.changeList();
53019
53027
  this.multipleSelectedList = newList.filter(function (item) {
@@ -53132,7 +53140,7 @@
53132
53140
  var itemId = item.id[item.id.length - 1];
53133
53141
  var changeCheckStatus = function changeCheckStatus(arr) {
53134
53142
  arr.forEach(function (item) {
53135
- if (itemId === item.id) {
53143
+ if ("".concat(itemId) === "".concat(item.id)) {
53136
53144
  item.isSelected = false;
53137
53145
  item.isIndeterminate = false;
53138
53146
  }
@@ -53236,9 +53244,15 @@
53236
53244
  }, _vm._l(_vm.multipleSelectedList, function (item, index) {
53237
53245
  return _c('span', {
53238
53246
  key: index,
53239
- staticClass: "bk-cascade-tag-item"
53247
+ staticClass: "bk-cascade-tag-item",
53248
+ staticStyle: {
53249
+ "padding-right": "18px"
53250
+ }
53240
53251
  }, [_c('span', {
53241
- staticClass: "bk-cascade-item-name"
53252
+ staticClass: "bk-cascade-item-name",
53253
+ attrs: {
53254
+ "title": item.name
53255
+ }
53242
53256
  }, [_vm._v(_vm._s(item.name))]), _c('a', {
53243
53257
  staticClass: "remove-key",
53244
53258
  attrs: {
@@ -54342,6 +54356,16 @@
54342
54356
  separatorClass: {
54343
54357
  type: String,
54344
54358
  default: ''
54359
+ },
54360
+ backRouter: {
54361
+ type: [Object, String],
54362
+ default: function _default() {
54363
+ return null;
54364
+ }
54365
+ },
54366
+ replace: {
54367
+ type: Boolean,
54368
+ default: false
54345
54369
  }
54346
54370
  },
54347
54371
  provide: function provide() {
@@ -54354,6 +54378,14 @@
54354
54378
  if (items.length) {
54355
54379
  items[items.length - 1].setAttribute('aria-current', 'page');
54356
54380
  }
54381
+ },
54382
+ methods: {
54383
+ goBack: function goBack() {
54384
+ var backRouter = this.backRouter,
54385
+ $router = this.$router;
54386
+ if (!backRouter || !$router) return;
54387
+ this.replace ? $router.replace(backRouter) : $router.push(backRouter);
54388
+ }
54357
54389
  }
54358
54390
  };
54359
54391
 
@@ -54374,7 +54406,16 @@
54374
54406
  "aria-label": "Breadcrumb",
54375
54407
  "role": "navigation"
54376
54408
  }
54377
- }, [_vm._t("default")], 2);
54409
+ }, [!_vm.$slots.prefix && _vm.backRouter ? _c('div', {
54410
+ staticClass: "bk-breadcrumb-goback"
54411
+ }, [_c('i', {
54412
+ staticClass: "bk-icon icon-arrows-left icon-default",
54413
+ on: {
54414
+ "click": _vm.goBack
54415
+ }
54416
+ })]) : _vm._e(), _vm.$slots.prefix ? _c('div', {
54417
+ staticClass: "bk-breadcrumb-goback"
54418
+ }, [_vm._t("prefix")], 2) : _vm._e(), _vm._t("default")], 2);
54378
54419
  };
54379
54420
 
54380
54421
  var __vue_staticRenderFns__$1u = [];