[bugfix] Field: cut off charactor input when use maxlength (#2295)
This commit is contained in:
@@ -146,7 +146,7 @@ export default create({
|
||||
let { value } = target;
|
||||
const { maxlength } = this.$attrs;
|
||||
|
||||
if (this.isDef(maxlength) && value.length > maxlength) {
|
||||
if (this.type === 'number' && this.isDef(maxlength) && value.length > maxlength) {
|
||||
value = value.slice(0, maxlength);
|
||||
target.value = value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user