Skip to content

Commit 5aa1c00

Browse files
docs: ✏️ 增加 Input 字数限制的示例
1 parent 4f1d945 commit 5aa1c00

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pages/input/Index.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
<wd-input type="text" label="清除、密码" v-model="value14" @input="handleInput" placeholder="请输入..." clearable show-password />
5151
<wd-input type="text" label="错误状态" v-model="value15" @input="handleInput" placeholder="请输入歪比巴卜" error />
5252
<wd-input type="text" label="必填" v-model="value16" @input="handleInput" placeholder="请输入歪比巴卜" required />
53+
<wd-input type="text" label="字数限制" v-model="value22" placeholder="请输入..." :maxlength="20" show-word-limit clearable />
5354
<wd-input type="text" label="图标" v-model="value17" @input="handleInput" placeholder="请输入..." prefix-icon="dong" suffix-icon="list" />
5455
<wd-input type="text" label="自定义插槽" center v-model="value18" @input="handleInput" placeholder="请输入..." clearable>
5556
<template #suffix>
@@ -84,6 +85,7 @@ const value18 = ref<string>('')
8485
const value19 = ref<string>('')
8586
const value20 = ref<string>('')
8687
const value21 = ref<string>('')
88+
const value22 = ref<string>('')
8789
8890
function handleChange(event: any) {
8991
console.log(event)

0 commit comments

Comments
 (0)