Fixed #1509 - Add getFormatter method to InputNumber
parent
888a187845
commit
b17ed7924e
|
@ -477,7 +477,7 @@ export default {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
if (selectionStart === selectionEnd) {
|
if (selectionStart === selectionEnd) {
|
||||||
let deleteChar = inputValue.charAt(selectionStart);
|
const deleteChar = inputValue.charAt(selectionStart);
|
||||||
const { decimalCharIndex, decimalCharIndexWithoutPrefix } = this.getDecimalCharIndexes(inputValue);
|
const { decimalCharIndex, decimalCharIndexWithoutPrefix } = this.getDecimalCharIndexes(inputValue);
|
||||||
|
|
||||||
if (this.isNumeralChar(deleteChar)) {
|
if (this.isNumeralChar(deleteChar)) {
|
||||||
|
@ -938,6 +938,9 @@ export default {
|
||||||
formattedValue() {
|
formattedValue() {
|
||||||
const val = !this.modelValue && !this.allowEmpty ? 0 : this.modelValue;
|
const val = !this.modelValue && !this.allowEmpty ? 0 : this.modelValue;
|
||||||
return this.formatValue(val);
|
return this.formatValue(val);
|
||||||
|
},
|
||||||
|
getFormatter() {
|
||||||
|
return this.numberFormat;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|
Loading…
Reference in New Issue