Skip to content

Commit 3026c78

Browse files
docs: ✏️ Input 密码输入框示例移除disabled属性
1 parent 0252bd9 commit 3026c78

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/pages/input/Index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<wd-input type="text" v-model="value4" clearable @change="handleChange1" />
1717
</demo-block>
1818
<demo-block title="密码框">
19-
<wd-input type="text" v-model="value5" disabled clearable show-password @change="handleChange2" />
19+
<wd-input type="text" v-model="value5" clearable show-password @change="handleChange2" />
2020
</demo-block>
2121
<demo-block title="数字类型">
2222
<wd-input type="number" v-model="value9" />

src/uni_modules/wot-design-uni/components/wd-input/wd-input.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<slot v-else name="label"></slot>
1111
</view>
1212
</view>
13-
<!-- 输入域 -->
1413
<view class="wd-input__body">
1514
<view class="wd-input__value">
1615
<view v-if="(prefixIcon || usePrefixSlot) && !label" class="wd-input__prefix">
@@ -206,7 +205,6 @@ function initState() {
206205
emit('update:modelValue', inputValue.value)
207206
}
208207
function togglePwdVisible() {
209-
// password属性设置false不生效,置空生效
210208
isPwdVisible.value = !isPwdVisible.value
211209
}
212210
function clear() {
@@ -223,7 +221,6 @@ function clear() {
223221
emit('clear')
224222
})
225223
}
226-
// 失去焦点时会先后触发change、blur,未输入内容但失焦不触发 change 只触发 blur
227224
function handleBlur() {
228225
isFocus.value = false
229226
emit('change', {
@@ -242,7 +239,6 @@ function handleFocus({ detail }: any) {
242239
isFocus.value = true
243240
emit('focus', detail)
244241
}
245-
// input事件需要传入
246242
function handleInput() {
247243
emit('update:modelValue', inputValue.value)
248244
emit('input', inputValue.value)

0 commit comments

Comments
 (0)