diff --git a/docs/component/input.md b/docs/component/input.md
index d4d7c248444950af12acfa67e4aa253930ef6260..5a82c05ea11e043a1c6d705e735c65996ceb6ce6 100644
--- a/docs/component/input.md
+++ b/docs/component/input.md
@@ -246,6 +246,21 @@ App平台软键盘弹出有 adjustResize|adjustPan 两种模式,默认为 adju
控制占位符颜色的input
+
+ 带清除按钮的输入框
+
+
+
+
+
+
+ 可查看密码的输入框
+
+
+
+
+
@@ -259,7 +274,10 @@ export default {
title: 'input',
focus: false,
inputValue: '',
- changeValue: ''
+ showClearIcon: false,
+ inputClearValue: '',
+ changeValue: '',
+ showPassword: true
}
},
methods: {
@@ -276,6 +294,21 @@ export default {
if (event.target.value === '123') {
uni.hideKeyboard();
}
+ },
+ clearInput: function(event) {
+ this.inputClearValue = event.detail.value;
+ if (event.detail.value.length > 0) {
+ this.showClearIcon = true;
+ } else {
+ this.showClearIcon = false;
+ }
+ },
+ clearIcon: function() {
+ this.inputClearValue = '';
+ this.showClearIcon = false;
+ },
+ changePassword: function() {
+ this.showPassword = !this.showPassword;
}
}
}