Kaynağa Gözat

修复up-input输入框在ios机型上获取不到光标问题:改为原生input输入框

htc 3 gün önce
ebeveyn
işleme
4ba3fdc5c7

+ 8 - 0
App.vue

@@ -96,5 +96,13 @@
 		flex-direction: column;
 		align-items: center;
 		justify-content: center;
+	}
+	
+	.setinp{
+		font-size: 30rpx !important;
+		color: #252525 !important;
+		line-height: 42rpx !important;
+		text-align: right !important;
+		// caret-color: #252525 !important; 
 	}
 </style>

+ 1 - 13
components/CusSearch/index.vue

@@ -2,7 +2,7 @@
 	<view class="search adfac">
 		<image class="icon" src="https://oss.familydaf.cn/sxsnfile/20251218/9093140778f4463489a7e83746b70ab2.png"></image>
 		<view class="input">
-			<up-input :placeholder="placeholder" v-model="keyword" border="none" style="font-size: 26rpx;" @confirm="handleSearch"></up-input>
+			<input :placeholder="placeholder" v-model="keyword" style="font-size: 26rpx;" @confirm="handleSearch"></input>
 		</view>
 		<view class="btn" @click="handleSearch" v-if="!isCancel">搜索</view>
 		<view class="btn" @click="handleCancel" v-else>取消</view>
@@ -39,18 +39,6 @@
 </script>
 
 <style scoped lang="scss">
-	::v-deep .u-input__content input{
-		// 解决输入框在ios机型上获取不到闪烁的光标的问题(安卓机型上有)
-		/* 1. (首选方案) 强制开启硬件加速,触发独立渲染层,修复iOS下的渲染bug */
-		transform: translateZ(0);
-		-webkit-transform: translateZ(0);
-		/* 2. (辅助方案) 明确指定文本可选,有时有助于唤醒光标 */
-		-webkit-user-select: text;
-		user-select: text;
-		/* 3. (保持) 您已正确设置,确保光标颜色正确 */
-		caret-color: #252525 !important;  
-	}
-	
 	.search{
 		width: 100%;
 		background: #FFFFFF;

+ 4 - 16
components/pages/loginRegister/index.vue

@@ -14,7 +14,7 @@
 				<view class="lr-box-form-item adfacjb">
 					<view class="lr-box-form-item-left adfac">
 						<view class="text" style="margin-right: 32rpx;"><span style="color: #F4657A;">*</span>手机号码</view>
-						<up-input v-model="register.phone" border="none" placeholder="请输入手机号码"></up-input>
+						<input v-model="register.phone" border="none" placeholder="请输入手机号码"></input>
 					</view>
 					<view class="lr-box-form-item-right">
 						<button class="yjsq" open-type="getPhoneNumber" @getphonenumber="decryptPhoneNumber" privacy-desc="用于获取您的手机号码,方便您快速注册。">一键授权</button>
@@ -46,7 +46,7 @@
 						<view class="text"><span style="color: #F4657A;">*</span>用户名</view>
 					</view>
 					<view class="lr-box-form-item-right">
-						<up-input v-model="register.nickName" border="none" inputAlign="right" placeholder="请输入真实姓名"></up-input>
+						<input v-model="register.nickName" border="none" inputAlign="right" placeholder="请输入真实姓名"></input>
 					</view>
 				</view>
 				<view class="lr-box-form-item adfacjb">
@@ -54,7 +54,7 @@
 						<view class="text">家庭公益名称</view>
 					</view>
 					<view class="lr-box-form-item-right">
-						<up-input v-model="register.welfareName" border="none" inputAlign="right" placeholder="请输入至少三个字"></up-input>
+						<input v-model="register.welfareName" border="none" inputAlign="right" placeholder="请输入至少三个字"></input>
 					</view>
 				</view>
 				<view class="lr-box-form-item adfacjb">
@@ -62,7 +62,7 @@
 						<view class="text">家庭公益口号</view>
 					</view>
 					<view class="lr-box-form-item-right">
-						<up-input v-model="register.welfareSlogan" border="none" inputAlign="right" placeholder="家庭公益口号"></up-input>
+						<input v-model="register.welfareSlogan" border="none" inputAlign="right" placeholder="家庭公益口号"></input>
 					</view>
 				</view>
 			</view>
@@ -164,18 +164,6 @@
 </script>
 
 <style scoped lang="scss">
-	::v-deep .u-input__content input{
-		// 解决输入框在ios机型上获取不到闪烁的光标的问题(安卓机型上有)
-		/* 1. (首选方案) 强制开启硬件加速,触发独立渲染层,修复iOS下的渲染bug */
-		transform: translateZ(0);
-		-webkit-transform: translateZ(0);
-		/* 2. (辅助方案) 明确指定文本可选,有时有助于唤醒光标 */
-		-webkit-user-select: text;
-		user-select: text;
-		/* 3. (保持) 您已正确设置,确保光标颜色正确 */
-		caret-color: #252525 !important;  
-	}
-	
 	.login-register{
 		position: fixed;
 		top: 0;

+ 2 - 14
pagesHome/activityApply.vue

@@ -42,13 +42,13 @@
 			<view class="box3-pre adfacjb">
 				<view class="box3-pre-left">联系人姓名</view>
 				<view class="box3-pre-right">
-					<up-input v-model="submitDto.contact" border="none" style="font-size: 30rpx;color: #151B29;text-align: right;" placeholder="请输入联系人姓名"></up-input>
+					<input v-model="submitDto.contact" style="font-size: 30rpx;color: #151B29;text-align: right;" placeholder="请输入联系人姓名"></input>
 				</view>
 			</view>
 			<view class="box3-pre adfacjb">
 				<view class="box3-pre-left">联系人电话</view>
 				<view class="box3-pre-right">
-					<up-input v-model="submitDto.contactPhone" border="none" style="font-size: 30rpx;color: #151B29;text-align: right;" placeholder="请输入联系人电话"></up-input>
+					<input v-model="submitDto.contactPhone" style="font-size: 30rpx;color: #151B29;text-align: right;" placeholder="请输入联系人电话"></input>
 				</view>
 			</view>
 		</view>
@@ -268,18 +268,6 @@
 </script>
 
 <style scoped lang="scss">
-	::v-deep .u-input__content input{
-		// 解决输入框在ios机型上获取不到闪烁的光标的问题(安卓机型上有)
-		/* 1. (首选方案) 强制开启硬件加速,触发独立渲染层,修复iOS下的渲染bug */
-		transform: translateZ(0);
-		-webkit-transform: translateZ(0);
-		/* 2. (辅助方案) 明确指定文本可选,有时有助于唤醒光标 */
-		-webkit-user-select: text;
-		user-select: text;
-		/* 3. (保持) 您已正确设置,确保光标颜色正确 */
-		caret-color: #252525 !important;  
-	}
-	
 	::v-deep .u-input__content__field-wrapper__field{
 		text-align: right !important;
 	}

+ 4 - 16
pagesHome/applyMemberVindicate.vue

@@ -21,19 +21,19 @@
 			<view class="pre adfac">
 				<view class="pre-title"><span>*</span>姓名</view>
 				<view class="pre-content">
-					<up-input v-model="memberInfo.name" border="none" style="font-size: 30rpx;color: #252525;" placeholder="请输入姓名"></up-input>
+					<input v-model="memberInfo.name" style="font-size: 30rpx;color: #252525;" placeholder="请输入姓名"></input>
 				</view>
 			</view>
 			<view class="pre adfac">
 				<view class="pre-title"><span>*</span>身份证</view>
 				<view class="pre-content">
-					<up-input v-model="memberInfo.idCard" border="none" style="font-size: 30rpx;color: #252525;" placeholder="请输入身份证"></up-input>
+					<input v-model="memberInfo.idCard" style="font-size: 30rpx;color: #252525;" placeholder="请输入身份证"></input>
 				</view>
 			</view>
 			<view class="pre adfac">
 				<view class="pre-title"><span style="color: #FFFFFF;">*</span>义工号</view>
 				<view class="pre-content">
-					<up-input v-model="memberInfo.volunteerNo" border="none" style="font-size: 30rpx;color: #252525;" placeholder="请输入义工号"></up-input>
+					<input v-model="memberInfo.volunteerNo" style="font-size: 30rpx;color: #252525;" placeholder="请输入义工号"></input>
 				</view>
 			</view>
 			<view class="pre adfac">
@@ -54,7 +54,7 @@
 			<view class="pre adfac" v-if="memberInfo.personnelType==2">
 				<view class="pre-title"><span>*</span>就读学校</view>
 				<view class="pre-content">
-					<up-input v-model="memberInfo.currentSchool" border="none" style="font-size: 30rpx;color: #252525;" placeholder="请输入就读学校"></up-input>
+					<input v-model="memberInfo.currentSchool" style="font-size: 30rpx;color: #252525;" placeholder="请输入就读学校"></input>
 				</view>
 			</view>
 		</view>
@@ -115,18 +115,6 @@
 </script>
 
 <style scoped lang="scss">
-	::v-deep .u-input__content input{
-		// 解决输入框在ios机型上获取不到闪烁的光标的问题(安卓机型上有)
-		/* 1. (首选方案) 强制开启硬件加速,触发独立渲染层,修复iOS下的渲染bug */
-		transform: translateZ(0);
-		-webkit-transform: translateZ(0);
-		/* 2. (辅助方案) 明确指定文本可选,有时有助于唤醒光标 */
-		-webkit-user-select: text;
-		user-select: text;
-		/* 3. (保持) 您已正确设置,确保光标颜色正确 */
-		caret-color: #252525 !important;   
-	}
-	
 	.common_page{
 		padding-bottom: 184rpx;
 		

+ 4 - 16
pagesMy/familyMemberVindicate.vue

@@ -21,19 +21,19 @@
 			<view class="pre adfac">
 				<view class="pre-title"><span>*</span>姓名</view>
 				<view class="pre-content">
-					<up-input v-model="memberInfo.name" border="none" style="font-size: 30rpx;color: #252525;" placeholder="请输入姓名"></up-input>
+					<input v-model="memberInfo.name" style="font-size: 30rpx;color: #252525;" placeholder="请输入姓名"></input>
 				</view>
 			</view>
 			<view class="pre adfac">
 				<view class="pre-title"><span>*</span>身份证</view>
 				<view class="pre-content">
-					<up-input v-model="memberInfo.idCard" border="none" style="font-size: 30rpx;color: #252525;" placeholder="请输入身份证"></up-input>
+					<input v-model="memberInfo.idCard" style="font-size: 30rpx;color: #252525;" placeholder="请输入身份证"></input>
 				</view>
 			</view>
 			<view class="pre adfac">
 				<view class="pre-title"><span style="color: #FFFFFF;">*</span>义工号</view>
 				<view class="pre-content">
-					<up-input v-model="memberInfo.volunteerNo" border="none" style="font-size: 30rpx;color: #252525;" placeholder="请输入义工号"></up-input>
+					<input v-model="memberInfo.volunteerNo" style="font-size: 30rpx;color: #252525;" placeholder="请输入义工号"></input>
 				</view>
 			</view>
 			<view class="pre adfac">
@@ -54,7 +54,7 @@
 			<view class="pre adfac" v-if="memberInfo.personnelType==2">
 				<view class="pre-title"><span>*</span>就读学校</view>
 				<view class="pre-content">
-					<up-input v-model="memberInfo.currentSchool" border="none" style="font-size: 30rpx;color: #252525;" placeholder="请输入就读学校"></up-input>
+					<input v-model="memberInfo.currentSchool" style="font-size: 30rpx;color: #252525;" placeholder="请输入就读学校"></input>
 				</view>
 			</view>
 		</view>
@@ -119,18 +119,6 @@
 </script>
 
 <style scoped lang="scss">
-	::v-deep .u-input__content input{
-		// 解决输入框在ios机型上获取不到闪烁的光标的问题(安卓机型上有)
-		/* 1. (首选方案) 强制开启硬件加速,触发独立渲染层,修复iOS下的渲染bug */
-		transform: translateZ(0);
-		-webkit-transform: translateZ(0);
-		/* 2. (辅助方案) 明确指定文本可选,有时有助于唤醒光标 */
-		-webkit-user-select: text;
-		user-select: text;
-		/* 3. (保持) 您已正确设置,确保光标颜色正确 */
-		caret-color: #252525 !important;  
-	}
-	
 	.common_page{
 		padding-bottom: 184rpx;
 		

+ 3 - 22
pagesMy/information.vue

@@ -14,7 +14,7 @@
 			<view class="item adfacjb">
 				<view class="left">用户名</view>
 				<view class="right">
-					<up-input v-model="userInfo.realName" border="none" placeholder="请输入用户名"></up-input>
+					<input class="setinp"v-model="userInfo.realName" placeholder="请输入用户名"></input>
 				</view>
 			</view>
 			<!-- <view class="item adfacjb">
@@ -26,13 +26,13 @@
 			<view class="item adfacjb">
 				<view class="left">家庭公益名称</view>
 				<view class="right">
-					<up-input v-model="userInfo.welfareName" border="none" placeholder="请输入家庭公益名称"></up-input>
+					<input class="setinp" type="text" v-model="userInfo.welfareName" placeholder="请输入家庭公益名称">
 				</view>
 			</view>
 			<view class="item adfacjb">
 				<view class="left">家庭公益口号</view>
 				<view class="right">
-					<up-input v-model="userInfo.welfareSlogan" border="none" placeholder="请输入家庭公益口号"></up-input>
+					<input class="setinp" v-model="userInfo.welfareSlogan" placeholder="请输入家庭公益口号"></input>
 				</view>
 			</view>
 		</view>
@@ -149,25 +149,6 @@
 </script>
 
 <style scoped lang="scss">
-	::v-deep .u-input__content input{
-		font-family: PingFangSC, PingFang SC;
-		font-weight: 400;
-		font-size: 30rpx !important;
-		color: #252525 !important;
-		line-height: 42rpx !important;
-		text-align: right !important;
-		
-		// 解决输入框在ios机型上获取不到闪烁的光标的问题(安卓机型上有)
-		/* 1. (首选方案) 强制开启硬件加速,触发独立渲染层,修复iOS下的渲染bug */
-		transform: translateZ(0);
-		-webkit-transform: translateZ(0);
-		/* 2. (辅助方案) 明确指定文本可选,有时有助于唤醒光标 */
-		-webkit-user-select: text;
-		user-select: text;
-		/* 3. (保持) 您已正确设置,确保光标颜色正确 */
-		caret-color: #252525 !important; 
-	}
-	
 	.common_page{
 		.form{
 			background: #FFFFFF;