Browse Source

输入框输入文字长度设置

lalalashen 1 month ago
parent
commit
092e4a430d

+ 3 - 3
pages/login/login.vue

@@ -21,12 +21,12 @@
 			<block v-if="type == 'mobile' || type == 'pass'">
 				<view class="name">手机号码:</view>
 				<view class="item">
-					<input type="text" class="input" v-model="mobile" placeholder="请输入手机号码" />
+					<input type="text" class="input" v-model="mobile" placeholder="请输入手机号码" maxlength="11"/>
 				</view>
 				<block v-if="type == 'pass'">
 					<view class="name">登录密码:</view>
 					<view class="item">
-						<input type="password" class="input" v-model="password" placeholder="请输入登录密码" />
+						<input type="password" class="input" v-model="password" placeholder="请输入登录密码" maxlength="32"/>
 					</view>
 					<view class="other_list">
 						<text class="left" v-if="false">忘记密码</text>
@@ -38,7 +38,7 @@
 				<block v-if="type == 'mobile'">
 					<view class="name">验证码:</view>
 					<view class="item">
-						<input type="text" class="input" v-model="code" placeholder="请输入验证码" />
+						<input type="text" class="input" v-model="code" placeholder="请输入验证码" maxlength="6"/>
 						<view class="btn">获取验证码</view>
 					</view>
 					<view class="other_list">

+ 1 - 1
pages/login/loginFirst.vue

@@ -3,7 +3,7 @@
 		<view class="list_info">
 			<view class="name">给自己取个名字吧:</view>
 			<view class="item">
-				<input type="text" class="input" v-model="nickname" placeholder="请输入昵称" />
+				<input type="text" class="input" v-model="nickname" placeholder="请输入昵称" maxlength="10"/>
 			</view>
 			<view class="name">请问你的性别是:</view>
 			<view class="itemSex">

+ 4 - 4
pages/my/editInfo.vue

@@ -9,11 +9,11 @@
 			</view>
 			<view class="name">昵称:</view>
 			<view class="item">
-				<input type="text" class="input" placeholder="请输入昵称" />
+				<input type="text" class="input" placeholder="请输入昵称"  maxlength="10"/>
 			</view>
 			<view class="name">微信号:</view>
 			<view class="item">
-				<input type="text" class="input" placeholder="请输入微信号" />
+				<input type="text" class="input" placeholder="请输入微信号"  maxlength="32"/>
 			</view>
 			<view class="name">性别:</view>
 			<view class="item2">
@@ -47,11 +47,11 @@
 			</view>
 			<view class="name">职业:</view>
 			<view class="item">
-				<input type="text" class="input" placeholder="请输入职业" />
+				<input type="text" class="input" placeholder="请输入职业"  maxlength="32"/>
 			</view>
 			<view class="name">个性签名:</view>
 			<view class="item">
-				<input type="text" class="input" placeholder="请输入个性签名" />
+				<input type="text" class="input" placeholder="请输入个性签名"  maxlength="64"/>
 			</view>
 			<view class="name">兴趣爱好:
 				<view class="right">添加+</view>

+ 3 - 3
pages/my/editMobile.vue

@@ -3,15 +3,15 @@
 		<view class="list_info">
 			<view class="name">旧手机号码:</view>
 			<view class="item">
-				<input type="text" class="input" placeholder="请输入旧手机号码" />
+				<input type="text" class="input" placeholder="请输入旧手机号码"  maxlength="11"/>
 			</view>
 			<view class="name">新手机号码:</view>
 			<view class="item">
-				<input type="text" class="input" placeholder="请输入新手机号码" />
+				<input type="text" class="input" placeholder="请输入新手机号码"  maxlength="11"/>
 			</view>
 			<view class="name">验证码:</view>
 			<view class="item">
-				<input type="text" class="input" placeholder="请输入验证码" />
+				<input type="text" class="input" placeholder="请输入验证码"  maxlength="6"/>
 				<view class="btn">获取验证码</view>
 			</view>
 

+ 4 - 4
pages/my/forgetPass.vue

@@ -3,20 +3,20 @@
 		<view class="list_info">
 			<view class="name">手机号码:</view>
 			<view class="item">
-				<input type="text" class="input" placeholder="请输入手机号码" />
+				<input type="text" class="input" placeholder="请输入手机号码"  maxlength="11"/>
 			</view>
 			<view class="name">验证码:</view>
 			<view class="item">
-				<input type="text" class="input" placeholder="请输入验证码" />
+				<input type="text" class="input" placeholder="请输入验证码"  maxlength="6"/>
 				<view class="btn">获取验证码</view>
 			</view>
 			<view class="name">设置新密码:</view>
 			<view class="item">
-				<input type="text" class="input" placeholder="请输入新登录密码" />
+				<input type="text" class="input" placeholder="请输入新登录密码"  maxlength="32"/>
 			</view>
 			<view class="name">确认新密码:</view>
 			<view class="item">
-				<input type="text" class="input" placeholder="请再次输入新登录密码" />
+				<input type="text" class="input" placeholder="请再次输入新登录密码"  maxlength="32"/>
 			</view>
 
 

+ 2 - 2
pages/my/idcheck.vue

@@ -4,11 +4,11 @@
 			<view class="list_info">
 				<view class="name">姓名:</view>
 				<view class="item">
-					<input type="text" class="input" v-model="realname" placeholder="请输入真实姓名" />
+					<input type="text" class="input" v-model="realname" placeholder="请输入真实姓名" maxlength="16"/>
 				</view>
 				<view class="name">身份证号:</view>
 				<view class="item">
-					<input type="text" class="input" v-model="idcard" placeholder="请输入身份证号" />
+					<input type="text" class="input" v-model="idcard" placeholder="请输入身份证号"  maxlength="18"/>
 				</view>
 
 				<view class="blankHeight"></view>

+ 4 - 4
pages/my/step.vue

@@ -15,11 +15,11 @@
 				</view>
 				<view class="name">给自己取个名字吧:</view>
 				<view class="item">
-					<input type="text" class="input" placeholder="请输入昵称" />
+					<input type="text" class="input" placeholder="请输入昵称" maxlength="10"/>
 				</view>
 				<view class="name">你的微信号是:</view>
 				<view class="item">
-					<input type="text" class="input" placeholder="请输入微信号" />
+					<input type="text" class="input" placeholder="请输入微信号" maxlength="32"/>
 				</view>
 				<view class="name">选一张你的真实照片作为封面:</view>
 				<view class="bcenter">
@@ -32,11 +32,11 @@
 			<block v-if="step == 2">
 				<view class="name">给自己写一个个性签名:</view>
 				<view class="item">
-					<input type="text" class="input" placeholder="请输入个性签名" />
+					<input type="text" class="input" placeholder="请输入个性签名" maxlength="64"/>
 				</view>
 				<view class="name">职业:</view>
 				<view class="item">
-					<input type="text" class="input" placeholder="请输入职业" />
+					<input type="text" class="input" placeholder="请输入职业" maxlength="16"/>
 				</view>
 				<view class="name">年龄:</view>
 				<view class="itemSingle">

+ 2 - 2
pages/w3/tran.vue

@@ -7,7 +7,7 @@
 				</view>
 				<view class="num1">
 					<view class="num">
-						<input type="number" v-model="num" placeholder="请输入传送数量" />
+						<input type="number" v-model="num" placeholder="请输入传送数量" maxlength="16"/>
 					</view>
 					<view class="all" @click="num = myinfo.num_gmb">
 						全部
@@ -27,7 +27,7 @@
 				</view>
 				<view class="num1">
 					<view class="num">
-						<input type="number" v-model="mobile" placeholder="请输入传送手机号" />
+						<input type="number" v-model="mobile" placeholder="请输入传送手机号" maxlength="11"/>
 					</view>
 					<view class="all">
 					</view>