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

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.
@@ -7687,6 +7687,9 @@
7687
7687
  if (shouldEmitInput) {
7688
7688
  this.$emit('input', now);
7689
7689
  }
7690
+ },
7691
+ visualValue: function visualValue(val) {
7692
+ this.focusedTime.time = this.internalValue.map(extractTime);
7690
7693
  }
7691
7694
  },
7692
7695
  mounted: function mounted() {
@@ -27119,7 +27122,7 @@
27119
27122
  var isIOS = isBrowser$2 && /iPhone|iPad|iPod/.test(navigator.platform) && !window.MSStream;
27120
27123
  var defaultProps = {
27121
27124
  a11y: true,
27122
- allowHTML: false,
27125
+ allowHTML: true,
27123
27126
  animateFill: true,
27124
27127
  animation: 'shift-away',
27125
27128
  appendTo: function appendTo() {
@@ -29208,7 +29211,8 @@
29208
29211
  38, 40, 37, 39,
29209
29212
  46,
29210
29213
  9
29211
- ]
29214
+ ],
29215
+ isOnComposition: false
29212
29216
  };
29213
29217
  },
29214
29218
  computed: {
@@ -29508,7 +29512,7 @@
29508
29512
  this.handleNumberDelete(event);
29509
29513
  }
29510
29514
  if (document.getSelection().type !== 'Range') {
29511
- if (value.substring(target.selectionStart, target.selectionEnd + 1) === '-') {
29515
+ if (value.indexOf('-') === 0 && target.selectionStart === 0) {
29512
29516
  var keyCodeList = [48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
29513
29517
  96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
29514
29518
  189,
@@ -29578,12 +29582,44 @@
29578
29582
  }
29579
29583
  return '';
29580
29584
  },
29585
+ handlerCompositionstart: function handlerCompositionstart(e) {
29586
+ if (this.inputType === 'number') {
29587
+ this.isOnComposition = true;
29588
+ }
29589
+ },
29590
+ handlerCompositionend: function handlerCompositionend(e) {
29591
+ this.isOnComposition = false;
29592
+ },
29581
29593
  handlerInput: function handlerInput(event) {
29582
- var value = event.target.value;
29583
- this.setCurValue(value);
29584
- this.$emit('input', value, event);
29585
- this.$emit('change', value, event);
29586
- this.dispatch('bk-form-item', 'form-change');
29594
+ 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
+ }))();
29587
29623
  },
29588
29624
  handlerClear: function handlerClear(event) {
29589
29625
  this.curValue = '';
@@ -29706,7 +29742,9 @@
29706
29742
  "focus": _vm.handlerFocus,
29707
29743
  "blur": _vm.handlerBlur,
29708
29744
  "input": _vm.handlerInput,
29709
- "paste": _vm.handlerPaste
29745
+ "paste": _vm.handlerPaste,
29746
+ "compositionstart": _vm.handlerCompositionstart,
29747
+ "compositionend": _vm.handlerCompositionend
29710
29748
  }
29711
29749
  }, 'input', _vm.bindAttribute, false)), /^number$/i.test(_vm.type) && !_vm.disabled && !_vm.readonly ? [_vm.showControls ? _c('span', {
29712
29750
  staticClass: "input-number-option"