bk-magic-vue 2.5.9-beta.35 → 2.5.9-beta.37

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.
@@ -10627,7 +10627,7 @@ span.bk-date-picker-cells-cell-disabled.bk-date-picker-cells-cell-selected em{
10627
10627
  .bk-table.bk-table-dark-header th{
10628
10628
  background-color:#f0f1f5;
10629
10629
  }
10630
- .bk-table.bk-table-dark-header th :hover{
10630
+ .bk-table.bk-table-dark-header th .cell:hover{
10631
10631
  background-color:#eaebf0
10632
10632
  }
10633
10633
  .bk-table.bk-table-custom-header{
@@ -29670,7 +29670,11 @@
29670
29670
  type: Boolean,
29671
29671
  default: false
29672
29672
  },
29673
- initialControlValue: Number
29673
+ initialControlValue: Number,
29674
+ allowEmoji: {
29675
+ type: Boolean,
29676
+ default: true
29677
+ }
29674
29678
  },
29675
29679
  data: function data() {
29676
29680
  return {
@@ -29967,13 +29971,15 @@
29967
29971
  }
29968
29972
  },
29969
29973
  handleNumberDelete: function handleNumberDelete(event) {
29974
+ var isRawValEmpty = false;
29970
29975
  if (this.curValue === '') {
29976
+ isRawValEmpty = true;
29971
29977
  this.curValue = this.initialControlValue === undefined ? this.max : Math.min(this.initialControlValue, this.max);
29972
29978
  }
29973
29979
  var curNumberValue = Number(this.curValue);
29974
29980
  if (curNumberValue - 1 >= this.min) {
29975
29981
  var curLenAfterDot = (String(curNumberValue) || '').split('.')[1] || '';
29976
- var newVal = curNumberValue - 1;
29982
+ var newVal = isRawValEmpty ? curNumberValue : curNumberValue - 1;
29977
29983
  if (typeof this.precision !== 'undefined') {
29978
29984
  newVal = this.handleToFixed(newVal, Math.min(16, Math.max(curLenAfterDot.length, this.precision)));
29979
29985
  }
@@ -29984,13 +29990,15 @@
29984
29990
  }
29985
29991
  },
29986
29992
  handleNumberAdd: function handleNumberAdd(event) {
29993
+ var isRawValEmpty = false;
29987
29994
  if (this.curValue === '') {
29995
+ isRawValEmpty = true;
29988
29996
  this.curValue = this.initialControlValue === undefined ? this.min : Math.max(this.initialControlValue, this.min);
29989
29997
  }
29990
29998
  var curNumberValue = Number(this.curValue);
29991
29999
  if (curNumberValue <= this.max - 1) {
29992
30000
  var curLenAfterDot = (String(curNumberValue) || '').split('.')[1] || '';
29993
- var newVal = curNumberValue + 1;
30001
+ var newVal = isRawValEmpty ? curNumberValue : curNumberValue + 1;
29994
30002
  if (typeof this.precision !== 'undefined') {
29995
30003
  newVal = this.handleToFixed(newVal, Math.min(16, Math.max(curLenAfterDot.length, this.precision)));
29996
30004
  }
@@ -30146,6 +30154,9 @@
30146
30154
  }
30147
30155
  this.$nextTick(function () {
30148
30156
  var value = event.target.value;
30157
+ if (!_this5.allowEmoji) {
30158
+ value = value.replace(/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/ig, '');
30159
+ }
30149
30160
  _this5.setCurValue(value);
30150
30161
  _this5.$emit('input', value, event);
30151
30162
  _this5.$emit('change', value, event);
@@ -44245,11 +44256,7 @@
44245
44256
  var value = source[prop];
44246
44257
  if (value !== undefined) {
44247
44258
  if (prop === 'renderHeader') {
44248
- if (type === 'selection' && column[prop]) {
44249
- console.warn('[Magic Warn][TableColumn]Selection column doesn\'t allow to set render-header function.');
44250
- } else {
44251
- value = column[prop] || value;
44252
- }
44259
+ value = column[prop] || value;
44253
44260
  }
44254
44261
  column[prop] = prop === 'className' ? "".concat(column[prop], " ").concat(value) : value;
44255
44262
  }