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"
|
type="password"
|
||||||
size="large"
|
size="large"
|
||||||
icon="md-person"
|
icon="md-person"
|
||||||
|
maxlength="16"
|
||||||
/>
|
/>
|
||||||
<br>
|
<br>
|
||||||
value: {{ value }}
|
value: {{ value }}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="demo">
|
<div class="demo">
|
||||||
<n-nimbus-service-layout
|
<n-nimbus-service-layout
|
||||||
icon="md-contacts"
|
icon="md-contacts"
|
||||||
name="NAIVE UI (0.1.87)"
|
name="NAIVE UI (0.1.88)"
|
||||||
:padding-body="false"
|
:padding-body="false"
|
||||||
:items="items"
|
:items="items"
|
||||||
>
|
>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "naive-ui",
|
"name": "naive-ui",
|
||||||
"version": "0.1.87",
|
"version": "0.1.88",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
:value="value"
|
:value="value"
|
||||||
:disabled="disabled === true"
|
:disabled="disabled === true"
|
||||||
v-on="$listeners"
|
v-on="$listeners"
|
||||||
@blur="$listeners.blur"
|
@blur="$listeners.blur ? $listeners.blur : false"
|
||||||
@focus="$listeners.focus"
|
@focus="$listeners.focus ? $listeners.focus : false"
|
||||||
@input="handleInput"
|
@input="handleInput"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -39,8 +39,9 @@
|
|||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
:value="value"
|
:value="value"
|
||||||
:disabled="disabled === true"
|
:disabled="disabled === true"
|
||||||
@blur="$listeners.blur"
|
:maxlength="maxlength"
|
||||||
@focus="$listeners.focus"
|
@blur="$listeners.blur ? $listeners.blur : false"
|
||||||
|
@focus="$listeners.focus ? $listeners.focus : false"
|
||||||
@input="handleInput"
|
@input="handleInput"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@ -96,6 +97,10 @@ export default {
|
|||||||
icon: {
|
icon: {
|
||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: null
|
||||||
|
},
|
||||||
|
maxlength: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: 'false'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
Loading…
Reference in New Issue
Block a user