1
0
mirror of synced 2025-01-31 23:01:39 +03:00

Adds maxlength attribute support

This commit is contained in:
Justin Schroeder 2018-08-08 23:30:16 -04:00
parent 33442c291f
commit a012b120ba
2 changed files with 10 additions and 2 deletions

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@ -187,6 +187,14 @@ export default {
type: [String, Number, Boolean],
default: () => false
},
maxlength: {
type: [String, Number, Boolean],
default: () => false
},
minlength: {
type: [String, Number, Boolean],
default: () => false
},
placeholder: {
type: [String, Number, Boolean],
default: () => false
@ -320,7 +328,7 @@ export default {
return show
},
attributes () {
return ['min', 'max', 'placeholder', 'id', 'multiple']
return ['min', 'max', 'minlength', 'maxlength', 'placeholder', 'id', 'multiple']
.filter(prop => this[prop] !== false)
.reduce((attributes, attr) => {
attributes[attr] = this[attr]