From 01048b5bc49a10b20ffd2fe19eb71800dad81af6 Mon Sep 17 00:00:00 2001
From: zhenyuWang <13641039885@163.com>
Date: Fri, 3 Mar 2023 17:33:44 +0800
Subject: [PATCH] =?UTF-8?q?docs(input):=20=E8=A1=A5=E5=85=85=E7=A4=BA?=
=?UTF-8?q?=E4=BE=8B=E5=AF=B9=E5=BA=94=E4=BB=A3=E7=A0=81=20(question/16441?=
=?UTF-8?q?1)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docs/component/input.md | 35 ++++++++++++++++++++++++++++++++++-
1 file changed, 34 insertions(+), 1 deletion(-)
diff --git a/docs/component/input.md b/docs/component/input.md
index d4d7c2484..5a82c05ea 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;
}
}
}
--
GitLab