mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-18 12:34:25 +08:00
feat(input): maxlength
This commit is contained in:
parent
d9273efe2f
commit
2126785d3d
@ -61,6 +61,7 @@ export default {
|
||||
type="password"
|
||||
size="large"
|
||||
icon="md-person"
|
||||
maxlength="16"
|
||||
/>
|
||||
<br>
|
||||
value: {{ value }}
|
||||
|
@ -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"
|
||||
>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "naive-ui",
|
||||
"version": "0.1.87",
|
||||
"version": "0.1.88",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user