feat(input): maxlength

This commit is contained in:
07akioni 2019-07-04 11:01:06 +08:00
parent d9273efe2f
commit 2126785d3d
4 changed files with 12 additions and 6 deletions

View File

@ -61,6 +61,7 @@ export default {
type="password"
size="large"
icon="md-person"
maxlength="16"
/>
<br>
value: {{ value }}

View File

@ -2,7 +2,7 @@
<div class="demo">
<n-nimbus-service-layout
icon="md-contacts"
name="NAIVE UI (0.1.87)"
name="NAIVE UI (0.1.88)"
:padding-body="false"
:items="items"
>

View File

@ -1,6 +1,6 @@
{
"name": "naive-ui",
"version": "0.1.87",
"version": "0.1.88",
"description": "",
"main": "index.js",
"scripts": {

View File

@ -16,8 +16,8 @@
:value="value"
:disabled="disabled === true"
v-on="$listeners"
@blur="$listeners.blur"
@focus="$listeners.focus"
@blur="$listeners.blur ? $listeners.blur : false"
@focus="$listeners.focus ? $listeners.focus : false"
@input="handleInput"
/>
</div>
@ -39,8 +39,9 @@
:placeholder="placeholder"
:value="value"
:disabled="disabled === true"
@blur="$listeners.blur"
@focus="$listeners.focus"
:maxlength="maxlength"
@blur="$listeners.blur ? $listeners.blur : false"
@focus="$listeners.focus ? $listeners.focus : false"
@input="handleInput"
>
<div
@ -96,6 +97,10 @@ export default {
icon: {
type: String,
default: null
},
maxlength: {
type: [String, Number],
default: 'false'
}
},
methods: {