bk-magic-vue 2.5.3-beta.3 → 2.5.3-beta.5

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.
@@ -29474,7 +29474,7 @@
29474
29474
  var target = event.currentTarget;
29475
29475
  var value = target.value;
29476
29476
  if (this.inputType === 'number') {
29477
- if (this.validKeyCodeList.indexOf(keyCode) < 0) {
29477
+ if (this.validKeyCodeList.indexOf(keyCode) < 0 || event.shiftKey) {
29478
29478
  event.stopPropagation();
29479
29479
  event.preventDefault();
29480
29480
  return false;
@@ -29549,7 +29549,7 @@
29549
29549
  }
29550
29550
  }
29551
29551
  if (typeof this.precision !== 'undefined') {
29552
- value = this.toPrecision(Number(value), this.precision, true);
29552
+ value = this.toPrecision(_parseFloat$2(value), this.precision, true);
29553
29553
  } else {
29554
29554
  value = Number(value);
29555
29555
  }
@@ -29583,43 +29583,27 @@
29583
29583
  return '';
29584
29584
  },
29585
29585
  handlerCompositionstart: function handlerCompositionstart(e) {
29586
- if (this.inputType === 'number') {
29587
- this.isOnComposition = true;
29588
- }
29586
+ this.isOnComposition = true;
29589
29587
  },
29590
29588
  handlerCompositionend: function handlerCompositionend(e) {
29591
- this.isOnComposition = false;
29589
+ if (this.inputType === 'number' && this.isOnComposition) {
29590
+ e.target.value = this.curValue;
29591
+ this.isOnComposition = false;
29592
+ this.handlerInput(e);
29593
+ }
29592
29594
  },
29593
29595
  handlerInput: function handlerInput(event) {
29594
29596
  var _this3 = this;
29595
- return _asyncToGenerator( _regeneratorRuntime().mark(function _callee() {
29596
- var value;
29597
- return _regeneratorRuntime().wrap(function _callee$(_context) {
29598
- while (1) {
29599
- switch (_context.prev = _context.next) {
29600
- case 0:
29601
- if (!_this3.isOnComposition) {
29602
- _context.next = 6;
29603
- break;
29604
- }
29605
- event.target.value = _this3.curValue;
29606
- _this3.isOnComposition = false;
29607
- event.stopPropagation();
29608
- event.preventDefault();
29609
- return _context.abrupt("return", false);
29610
- case 6:
29611
- value = event.target.value;
29612
- _this3.setCurValue(value);
29613
- _this3.$emit('input', value, event);
29614
- _this3.$emit('change', value, event);
29615
- _this3.dispatch('bk-form-item', 'form-change');
29616
- case 11:
29617
- case "end":
29618
- return _context.stop();
29619
- }
29620
- }
29621
- }, _callee);
29622
- }))();
29597
+ if (this.isOnComposition) {
29598
+ return;
29599
+ }
29600
+ this.$nextTick(function () {
29601
+ var value = event.target.value;
29602
+ _this3.setCurValue(value);
29603
+ _this3.$emit('input', value, event);
29604
+ _this3.$emit('change', value, event);
29605
+ _this3.dispatch('bk-form-item', 'form-change');
29606
+ });
29623
29607
  },
29624
29608
  handlerClear: function handlerClear(event) {
29625
29609
  this.curValue = '';