ソースを参照

登录拉起键盘页面偏移调整

huangguoce 6 日 前
コミット
d8e92f6a3b
1 ファイル変更12 行追加5 行削除
  1. 12 5
      pages/login/login.vue

+ 12 - 5
pages/login/login.vue

@@ -12,13 +12,13 @@
 			<view class="login-form">
 				<u--form :model="inputForm" labelWidth="100px"  labelPosition="left" :rules="rules" ref="uForm">
 						<u-form-item label="用户名" borderBottom prop="username">
-							<u-input border="none" v-model="inputForm.username" />
+							<u-input border="none" v-model="inputForm.username" :adjust-position="false" />
 						</u-form-item>
 						<u-form-item label="密码" borderBottom prop="password">
-							<u-input border="none" password v-model="inputForm.password" />
+							<u-input border="none" password v-model="inputForm.password" :adjust-position="false" />
 						</u-form-item>
 						<u-form-item label="验证码" borderBottom prop="code" v-if="passwordErrorCount >= 5">
-							<u-input border="none" v-model="inputForm.code" />
+							<u-input border="none" v-model="inputForm.code" :adjust-position="false" />
 							<u--image :showLoading="true" :src="captchaImg" width="140px" height="40px" @click="getCaptcha"></u--image>
 						</u-form-item>
 				</u--form>
@@ -348,14 +348,21 @@
 </script>
 
 <style lang="scss" scoped>
+	.content {
+		height: 100vh;
+		overflow: hidden;
+	}
+
 	#box {
 		position: relative;
+		min-height: 100vh;
+		overflow: hidden;
 		// color: $u-content-color;
 	}
 
 	.title {
 		position: absolute;
-		top: 15vh;
+		top: 160rpx;
 		width: 100vw;
 		text-align: center;
 		font-size: 28rpx;
@@ -384,7 +391,7 @@
 
 	#top {
 		width: 100vw;
-		height: 40vh;
+		height: 420rpx;
 		position: relative;
 	}