bk-magic-vue 2.5.6-beta.3 → 2.5.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.
@@ -944,19 +944,28 @@
944
944
  cursor:not-allowed;
945
945
  }
946
946
  .bk-button.bk-primary.is-loading{
947
- cursor:default
947
+ cursor:default
948
948
  }
949
949
  .bk-button.bk-primary.is-loading:hover,
950
- .bk-button.bk-primary.is-loading.hover{
951
- background-color:#3a84ff;
952
- border-color:#3a84ff;
953
- opacity:1;
954
- }
950
+ .bk-button.bk-primary.is-loading.hover{
951
+ background-color:#3a84ff;
952
+ border-color:#3a84ff;
953
+ opacity:1;
954
+ }
955
955
  .bk-button.bk-primary.is-loading:active,
956
- .bk-button.bk-primary.is-loading.active{
956
+ .bk-button.bk-primary.is-loading.active{
957
+ background-color:#3a84ff;
958
+ border-color:#3a84ff;
959
+ }
960
+ .bk-button.bk-primary.is-loading.is-outline .bk-button-loading div{
957
961
  background-color:#3a84ff;
958
- border-color:#3a84ff;
959
- }
962
+ }
963
+ .bk-button.bk-primary.is-loading.is-outline:hover .bk-button-loading div, .bk-button.bk-primary.is-loading.is-outline.hover .bk-button-loading div{
964
+ background-color:#fff;
965
+ }
966
+ .bk-button.bk-primary.is-loading.is-outline.active .bk-button-loading div, .bk-button.bk-primary.is-loading.is-outline:active .bk-button-loading div{
967
+ background-color:#fff;
968
+ }
960
969
  .bk-button.bk-primary.is-outline{
961
970
  color:#3a84ff;
962
971
  border-color:#3a84ff;
@@ -1000,19 +1009,28 @@
1000
1009
  cursor:not-allowed;
1001
1010
  }
1002
1011
  .bk-button.bk-success.is-loading{
1003
- cursor:default
1012
+ cursor:default
1004
1013
  }
1005
1014
  .bk-button.bk-success.is-loading:hover,
1006
- .bk-button.bk-success.is-loading.hover{
1007
- background-color:#2dcb56;
1008
- border-color:#2dcb56;
1009
- opacity:1;
1010
- }
1015
+ .bk-button.bk-success.is-loading.hover{
1016
+ background-color:#2dcb56;
1017
+ border-color:#2dcb56;
1018
+ opacity:1;
1019
+ }
1011
1020
  .bk-button.bk-success.is-loading:active,
1012
- .bk-button.bk-success.is-loading.active{
1021
+ .bk-button.bk-success.is-loading.active{
1022
+ background-color:#2dcb56;
1023
+ border-color:#2dcb56;
1024
+ }
1025
+ .bk-button.bk-success.is-loading.is-outline .bk-button-loading div{
1013
1026
  background-color:#2dcb56;
1014
- border-color:#2dcb56;
1015
- }
1027
+ }
1028
+ .bk-button.bk-success.is-loading.is-outline:hover .bk-button-loading div, .bk-button.bk-success.is-loading.is-outline.hover .bk-button-loading div{
1029
+ background-color:#fff;
1030
+ }
1031
+ .bk-button.bk-success.is-loading.is-outline.active .bk-button-loading div, .bk-button.bk-success.is-loading.is-outline:active .bk-button-loading div{
1032
+ background-color:#fff;
1033
+ }
1016
1034
  .bk-button.bk-success.is-outline{
1017
1035
  color:#2dcb56;
1018
1036
  border-color:#2dcb56;
@@ -1056,19 +1074,28 @@
1056
1074
  cursor:not-allowed;
1057
1075
  }
1058
1076
  .bk-button.bk-warning.is-loading{
1059
- cursor:default
1077
+ cursor:default
1060
1078
  }
1061
1079
  .bk-button.bk-warning.is-loading:hover,
1062
- .bk-button.bk-warning.is-loading.hover{
1063
- background-color:#ff9c01;
1064
- border-color:#ff9c01;
1065
- opacity:1;
1066
- }
1080
+ .bk-button.bk-warning.is-loading.hover{
1081
+ background-color:#ff9c01;
1082
+ border-color:#ff9c01;
1083
+ opacity:1;
1084
+ }
1067
1085
  .bk-button.bk-warning.is-loading:active,
1068
- .bk-button.bk-warning.is-loading.active{
1086
+ .bk-button.bk-warning.is-loading.active{
1087
+ background-color:#ff9c01;
1088
+ border-color:#ff9c01;
1089
+ }
1090
+ .bk-button.bk-warning.is-loading.is-outline .bk-button-loading div{
1069
1091
  background-color:#ff9c01;
1070
- border-color:#ff9c01;
1071
- }
1092
+ }
1093
+ .bk-button.bk-warning.is-loading.is-outline:hover .bk-button-loading div, .bk-button.bk-warning.is-loading.is-outline.hover .bk-button-loading div{
1094
+ background-color:#fff;
1095
+ }
1096
+ .bk-button.bk-warning.is-loading.is-outline.active .bk-button-loading div, .bk-button.bk-warning.is-loading.is-outline:active .bk-button-loading div{
1097
+ background-color:#fff;
1098
+ }
1072
1099
  .bk-button.bk-warning.is-outline{
1073
1100
  color:#ff9c01;
1074
1101
  border-color:#ff9c01;
@@ -1112,19 +1139,28 @@
1112
1139
  cursor:not-allowed;
1113
1140
  }
1114
1141
  .bk-button.bk-danger.is-loading{
1115
- cursor:default
1142
+ cursor:default
1116
1143
  }
1117
1144
  .bk-button.bk-danger.is-loading:hover,
1118
- .bk-button.bk-danger.is-loading.hover{
1119
- background-color:#ea3636;
1120
- border-color:#ea3636;
1121
- opacity:1;
1122
- }
1145
+ .bk-button.bk-danger.is-loading.hover{
1146
+ background-color:#ea3636;
1147
+ border-color:#ea3636;
1148
+ opacity:1;
1149
+ }
1123
1150
  .bk-button.bk-danger.is-loading:active,
1124
- .bk-button.bk-danger.is-loading.active{
1151
+ .bk-button.bk-danger.is-loading.active{
1152
+ background-color:#ea3636;
1153
+ border-color:#ea3636;
1154
+ }
1155
+ .bk-button.bk-danger.is-loading.is-outline .bk-button-loading div{
1125
1156
  background-color:#ea3636;
1126
- border-color:#ea3636;
1127
- }
1157
+ }
1158
+ .bk-button.bk-danger.is-loading.is-outline:hover .bk-button-loading div, .bk-button.bk-danger.is-loading.is-outline.hover .bk-button-loading div{
1159
+ background-color:#fff;
1160
+ }
1161
+ .bk-button.bk-danger.is-loading.is-outline.active .bk-button-loading div, .bk-button.bk-danger.is-loading.is-outline:active .bk-button-loading div{
1162
+ background-color:#fff;
1163
+ }
1128
1164
  .bk-button.bk-danger.is-outline{
1129
1165
  color:#ea3636;
1130
1166
  border-color:#ea3636;
@@ -1427,6 +1463,9 @@
1427
1463
  transition:background-color ease 0.3s;
1428
1464
  min-width:68px;
1429
1465
  }
1466
+ .bk-button-hover .bk-loading-wrapper{
1467
+ opacity:0;
1468
+ }
1430
1469
  .bk-button-hover .bk-button-loading{
1431
1470
  width:58px;
1432
1471
  display:inline-block;
@@ -39183,15 +39183,18 @@
39183
39183
  return _this2.updateElsHeight();
39184
39184
  });
39185
39185
  }
39186
- var tableHeight = this.tableHeight = this.table.$el.offsetHeight - this.paginationHeight;
39187
- var footerHeight = this.footerHeight = footerWrapper ? footerWrapper.offsetHeight : 0;
39188
- this.bodyHeight = tableHeight - headerHeight - footerHeight + (footerWrapper ? 1 : 0);
39189
- this.fixedBodyHeight = this.scrollX ? this.bodyHeight - this.gutterWidth : this.bodyHeight;
39190
- var noData = !this.table.data || this.table.data.length === 0;
39191
- this.viewportHeight = this.scrollX ? tableHeight - (noData ? 0 : this.gutterWidth) : tableHeight;
39192
- this.syncRowHeight();
39193
- this.updateScrollY();
39194
- this.notifyObservers('scrollable');
39186
+ setTimeout(function () {
39187
+ var tableHeight = _this2.tableHeight = _this2.table.$el.offsetHeight - _this2.paginationHeight;
39188
+ console.warn("this.table.$el.offsetHeight: ".concat(_this2.table.$el.offsetHeight, " --- this.paginationHeight: ").concat(_this2.paginationHeight, " --- tableHeight: ").concat(tableHeight));
39189
+ var footerHeight = _this2.footerHeight = footerWrapper ? footerWrapper.offsetHeight : 0;
39190
+ _this2.bodyHeight = tableHeight - headerHeight - footerHeight + (footerWrapper ? 1 : 0);
39191
+ _this2.fixedBodyHeight = _this2.scrollX ? _this2.bodyHeight - _this2.gutterWidth : _this2.bodyHeight;
39192
+ var noData = !_this2.table.data || _this2.table.data.length === 0;
39193
+ _this2.viewportHeight = _this2.scrollX ? tableHeight - (noData ? 0 : _this2.gutterWidth) : tableHeight;
39194
+ _this2.syncRowHeight();
39195
+ _this2.updateScrollY();
39196
+ _this2.notifyObservers('scrollable');
39197
+ }, 0);
39195
39198
  }
39196
39199
  }, {
39197
39200
  key: "getFlattenColumns",
@@ -43719,27 +43722,31 @@
43719
43722
  this.$refs.input.style.width = this.INPUT_MIN_WIDTH + 'px';
43720
43723
  },
43721
43724
  handleInput: function handleInput(event) {
43722
- if (this.maxData === -1 || this.maxData > this.tagList.length) {
43723
- var value = event.target.value;
43724
- var charLen = this.getCharLength(value);
43725
- this.cacheVal = value;
43726
- if (charLen) {
43727
- this.isCanRemoveTag = false;
43728
- this.filterData(value);
43729
- this.$refs.input.style.width = charLen * this.INPUT_MIN_WIDTH + 'px';
43730
- } else {
43731
- this.isCanRemoveTag = true;
43732
- if (this.trigger === 'focus') {
43733
- this.filterData();
43725
+ var _this7 = this;
43726
+ var value = event.target.value;
43727
+ this.$emit('inputchange', value);
43728
+ this.$nextTick(function () {
43729
+ if (_this7.maxData === -1 || _this7.maxData > _this7.tagList.length) {
43730
+ var charLen = _this7.getCharLength(value);
43731
+ _this7.cacheVal = value;
43732
+ if (charLen) {
43733
+ _this7.isCanRemoveTag = false;
43734
+ _this7.filterData(value);
43735
+ _this7.$refs.input.style.width = charLen * _this7.INPUT_MIN_WIDTH + 'px';
43736
+ } else {
43737
+ _this7.isCanRemoveTag = true;
43738
+ if (_this7.trigger === 'focus') {
43739
+ _this7.filterData();
43740
+ }
43734
43741
  }
43742
+ } else {
43743
+ _this7.handleBlur();
43744
+ _this7.curInputValue = '';
43745
+ _this7.showList = false;
43735
43746
  }
43736
- } else {
43737
- this.handleBlur();
43738
- this.curInputValue = '';
43739
- this.showList = false;
43740
- }
43741
- this.isEdit = true;
43742
- this.focusItemIndex = this.allowCreate ? -1 : 0;
43747
+ _this7.isEdit = true;
43748
+ _this7.focusItemIndex = _this7.allowCreate ? -1 : 0;
43749
+ });
43743
43750
  },
43744
43751
  handleFocus: function handleFocus(event) {
43745
43752
  this.isCanRemoveTag = true;
@@ -43748,7 +43755,7 @@
43748
43755
  event.currentTarget.select();
43749
43756
  },
43750
43757
  handlePaste: function handlePaste(event) {
43751
- var _this7 = this;
43758
+ var _this8 = this;
43752
43759
  if (this.isSingleSelect) {
43753
43760
  return false;
43754
43761
  }
@@ -43763,7 +43770,7 @@
43763
43770
  var valArr = this.pasteFn ? this.pasteFn(value) : this.defaultPasteFn(value);
43764
43771
  var tags = [];
43765
43772
  valArr.map(function (val) {
43766
- return tags.push(val[_this7.saveKey]);
43773
+ return tags.push(val[_this8.saveKey]);
43767
43774
  });
43768
43775
  if (tags.length) {
43769
43776
  var nodes = this.$refs.tagList.childNodes;
@@ -43771,10 +43778,10 @@
43771
43778
  var localTags = [];
43772
43779
  var localInitDara = [];
43773
43780
  this.initData.map(function (data) {
43774
- localInitDara.push(data[_this7.saveKey]);
43781
+ localInitDara.push(data[_this8.saveKey]);
43775
43782
  });
43776
43783
  tags = tags.filter(function (tag) {
43777
- return tag && tag.trim() && !_this7.tagList.includes(tag) && localInitDara.includes(tag);
43784
+ return tag && tag.trim() && !_this8.tagList.includes(tag) && localInitDara.includes(tag);
43778
43785
  });
43779
43786
  if (this.maxData !== -1) {
43780
43787
  if (this.tagList.length < this.maxData) {
@@ -43788,8 +43795,8 @@
43788
43795
  }
43789
43796
  tags.map(function (tag) {
43790
43797
  var temp = {};
43791
- temp[_this7.saveKey] = tag;
43792
- temp[_this7.displayKey] = tag;
43798
+ temp[_this8.saveKey] = tag;
43799
+ temp[_this8.displayKey] = tag;
43793
43800
  localTags.push(temp);
43794
43801
  });
43795
43802
  if (tags.length) {
@@ -43801,36 +43808,36 @@
43801
43808
  this.focusInputer();
43802
43809
  this.$refs.input.style.width = this.INPUT_MIN_WIDTH + 'px';
43803
43810
  this.initData = this.initData.filter(function (val) {
43804
- return !tags.includes(val[_this7.saveKey]);
43811
+ return !tags.includes(val[_this8.saveKey]);
43805
43812
  });
43806
43813
  this.handlerChange('select');
43807
43814
  }
43808
43815
  }
43809
43816
  },
43810
43817
  defaultPasteFn: function defaultPasteFn(val) {
43811
- var _this8 = this;
43818
+ var _this9 = this;
43812
43819
  var target = [];
43813
43820
  var textArr = val.split(';');
43814
43821
  textArr.map(function (item) {
43815
43822
  if (item.match(/^[a-zA-Z][a-zA-Z_]+/g)) {
43816
43823
  var finalItem = item.match(/^[a-zA-Z][a-zA-Z_]+/g).join('');
43817
43824
  var temp = {};
43818
- temp[_this8.saveKey] = finalItem;
43819
- temp[_this8.displayKey] = finalItem;
43825
+ temp[_this9.saveKey] = finalItem;
43826
+ temp[_this9.displayKey] = finalItem;
43820
43827
  target.push(temp);
43821
43828
  }
43822
43829
  });
43823
43830
  return target;
43824
43831
  },
43825
43832
  updateScrollTop: function updateScrollTop() {
43826
- var _this9 = this;
43833
+ var _this10 = this;
43827
43834
  var panelObj = this.$refs.selectorList;
43828
43835
  var panelInfo = {
43829
43836
  height: panelObj.clientHeight,
43830
43837
  yAxis: panelObj.getBoundingClientRect().y
43831
43838
  };
43832
43839
  this.$nextTick(function () {
43833
- var activeObj = _this9.$refs.selectorList.querySelector('.bk-selector-actived');
43840
+ var activeObj = _this10.$refs.selectorList.querySelector('.bk-selector-actived');
43834
43841
  if (!activeObj) {
43835
43842
  return;
43836
43843
  }
@@ -43942,7 +43949,7 @@
43942
43949
  this.showList = false;
43943
43950
  },
43944
43951
  backspaceHandler: function backspaceHandler(index, target) {
43945
- var _this10 = this;
43952
+ var _this11 = this;
43946
43953
  if (!this.curInputValue) {
43947
43954
  if (this.isCanRemoveTag) {
43948
43955
  this.tagList.splice(index - 1, 1);
@@ -43955,7 +43962,7 @@
43955
43962
  this.focusInputer();
43956
43963
  var localList = this.useGroup ? this.allList : this.list;
43957
43964
  var isExistInit = localList.some(function (item) {
43958
- return item === target[_this10.saveKey];
43965
+ return item === target[_this11.saveKey];
43959
43966
  });
43960
43967
  if ((this.allowCreate && isExistInit || !this.allowCreate) && !this.isSingleSelect) {
43961
43968
  this.initData.push(target);
@@ -43973,19 +43980,19 @@
43973
43980
  this.handlerChange('remove');
43974
43981
  },
43975
43982
  removeTag: function removeTag(data, index) {
43976
- var _this11 = this;
43983
+ var _this12 = this;
43977
43984
  this.tagList.splice(index, 1);
43978
43985
  this.localTagList.splice(index, 1);
43979
43986
  var localList = this.useGroup ? this.allList : this.list;
43980
43987
  var isExistInit = localList.some(function (item) {
43981
- return item === data[_this11.saveKey];
43988
+ return item === data[_this12.saveKey];
43982
43989
  });
43983
43990
  if ((this.allowCreate && isExistInit || !this.allowCreate) && !this.isSingleSelect) {
43984
43991
  this.initData.push(data);
43985
43992
  }
43986
43993
  },
43987
43994
  addTag: function addTag(item, type) {
43988
- var _this12 = this;
43995
+ var _this13 = this;
43989
43996
  var nodes = this.$refs.tagList.childNodes;
43990
43997
  var result = this.getSiteInfo();
43991
43998
  var isSelected = false;
@@ -43996,13 +44003,13 @@
43996
44003
  var localTags = [];
43997
44004
  tags = item.split(this.separator);
43998
44005
  tags = tags.filter(function (tag) {
43999
- var validate = typeof _this12.createTagValidator === 'function' ? _this12.createTagValidator(tag) : true;
44000
- return tag && tag.trim() && !_this12.tagList.includes(tag) && validate;
44006
+ var validate = typeof _this13.createTagValidator === 'function' ? _this13.createTagValidator(tag) : true;
44007
+ return tag && tag.trim() && !_this13.tagList.includes(tag) && validate;
44001
44008
  });
44002
44009
  tags.forEach(function (tag) {
44003
44010
  var temp = {};
44004
- temp[_this12.saveKey] = tag;
44005
- temp[_this12.displayKey] = tag;
44011
+ temp[_this13.saveKey] = tag;
44012
+ temp[_this13.displayKey] = tag;
44006
44013
  localTags.push(temp);
44007
44014
  });
44008
44015
  if (tags.length) {
@@ -44047,14 +44054,14 @@
44047
44054
  if (isSelected) {
44048
44055
  this.$nextTick(function () {
44049
44056
  var site = nodes[_parseInt$2(result.index, 10) + 1];
44050
- _this12.insertAfter(_this12.$refs.staffInput, site);
44051
- _this12.$refs.input.style.width = _this12.INPUT_MIN_WIDTH + 'px';
44052
- if (!_this12.isSingleSelect && _this12.allowNextFocus) {
44053
- _this12.focusInputer();
44054
- }
44055
- if (!_this12.isSingleSelect) {
44056
- _this12.initData = _this12.initData.filter(function (val) {
44057
- return !_this12.tagList.includes(val[_this12.saveKey]);
44057
+ _this13.insertAfter(_this13.$refs.staffInput, site);
44058
+ _this13.$refs.input.style.width = _this13.INPUT_MIN_WIDTH + 'px';
44059
+ if (!_this13.isSingleSelect && _this13.allowNextFocus) {
44060
+ _this13.focusInputer();
44061
+ }
44062
+ if (!_this13.isSingleSelect) {
44063
+ _this13.initData = _this13.initData.filter(function (val) {
44064
+ return !_this13.tagList.includes(val[_this13.saveKey]);
44058
44065
  });
44059
44066
  }
44060
44067
  });
@@ -44072,35 +44079,35 @@
44072
44079
  this.cacheVal = '';
44073
44080
  },
44074
44081
  handleBlur: function handleBlur(inputValue) {
44075
- var _this13 = this;
44082
+ var _this14 = this;
44076
44083
  this.timer = setTimeout(function () {
44077
- var inputValue = _this13.curInputValue;
44078
- _this13.clearInput();
44079
- _this13.dispatch('bk-form-item', 'form-blur');
44080
- _this13.isEdit = false;
44081
- if (_this13.isSingleSelect) {
44082
- var _this13$tagListCache = _slicedToArray(_this13.tagListCache, 1),
44083
- oldVal = _this13$tagListCache[0];
44084
- if (inputValue && inputValue === oldVal && _this13.localTagListCache.length) {
44085
- _this13.addTag(_this13.localTagListCache[0], 'select');
44084
+ var inputValue = _this14.curInputValue;
44085
+ _this14.clearInput();
44086
+ _this14.dispatch('bk-form-item', 'form-blur');
44087
+ _this14.isEdit = false;
44088
+ if (_this14.isSingleSelect) {
44089
+ var _this14$tagListCache = _slicedToArray(_this14.tagListCache, 1),
44090
+ oldVal = _this14$tagListCache[0];
44091
+ if (inputValue && inputValue === oldVal && _this14.localTagListCache.length) {
44092
+ _this14.addTag(_this14.localTagListCache[0], 'select');
44086
44093
  } else {
44087
- _this13.handlerChange('remove');
44094
+ _this14.handlerChange('remove');
44088
44095
  }
44089
- } else if (_this13.allowAutoMatch && inputValue) {
44090
- var matchItem = _this13.renderList.find(function (item) {
44091
- return item[_this13.searchKey] === inputValue;
44096
+ } else if (_this14.allowAutoMatch && inputValue) {
44097
+ var matchItem = _this14.renderList.find(function (item) {
44098
+ return item[_this14.searchKey] === inputValue;
44092
44099
  });
44093
44100
  if (matchItem) {
44094
- _this13.handlerResultSelect(matchItem, 'select');
44095
- } else if (_this13.allowCreate) {
44096
- _this13.handlerResultSelect(inputValue, 'custom');
44101
+ _this14.handlerResultSelect(matchItem, 'select');
44102
+ } else if (_this14.allowCreate) {
44103
+ _this14.handlerResultSelect(inputValue, 'custom');
44097
44104
  }
44098
44105
  }
44099
- _this13.$emit('blur', inputValue, _this13.tagList);
44106
+ _this14.$emit('blur', inputValue, _this14.tagList);
44100
44107
  }, 200);
44101
44108
  },
44102
44109
  focusInputer: function focusInputer(event) {
44103
- var _this14 = this;
44110
+ var _this15 = this;
44104
44111
  if (this.disabled) {
44105
44112
  return;
44106
44113
  }
@@ -44125,11 +44132,11 @@
44125
44132
  }
44126
44133
  this.isEdit = true;
44127
44134
  this.$nextTick(function () {
44128
- _this14.$refs.input.focus();
44129
- if (_this14.trigger === 'focus') {
44130
- _this14.showList = true;
44131
- _this14.filterData();
44132
- _this14.showPopover();
44135
+ _this15.$refs.input.focus();
44136
+ if (_this15.trigger === 'focus') {
44137
+ _this15.showList = true;
44138
+ _this15.filterData();
44139
+ _this15.showPopover();
44133
44140
  }
44134
44141
  });
44135
44142
  },