优化内容+修复bug
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
<image src="https://wuyeadmin.bugtc.com/images/login/phone.png" mode=""
|
||||
style="height: 100%;width: 100%;"></image>
|
||||
</view>
|
||||
<uni-easyinput class="input-content" type="number" v-model="phoneNumber" @input="phoneNumber = phoneNumber.replace(/\D/g, '')" placeholder="请输入手机号"
|
||||
:inputBorder="false" maxlength="11" :placeholderStyle="placeholderStyle" />
|
||||
<input class="input-content native-input" :type="inputType" v-model="phoneNumber" placeholder="请输入手机号"
|
||||
placeholder-style="font-size:24rpx" maxlength="11"/>
|
||||
</view>
|
||||
|
||||
<!-- 验证码输入 + 获取验证码按钮 -->
|
||||
@@ -21,8 +21,8 @@
|
||||
<image src="https://wuyeadmin.bugtc.com/images/login/code.png" mode="" style="height: 100%;width: 100%;">
|
||||
</image>
|
||||
</view>
|
||||
<uni-easyinput class="input-content verify-input" type="number" v-model="verifyCode" @input="verifyCode = verifyCode.replace(/\D/g, '')" placeholder="请输入验证码"
|
||||
:inputBorder="false" maxlength="6" :placeholderStyle="placeholderStyle" />
|
||||
<input class="input-content verify-input native-input" :type="inputType" v-model="verifyCode" placeholder="请输入验证码"
|
||||
maxlength="6" placeholder-style="font-size:24rpx"/>
|
||||
|
||||
<button class="get-verify-btn" :disabled="!canGetVerify || countDown > 0" @click="getVerifyCode">
|
||||
{{ countDown > 0 ? `${countDown}s后重新获取` : '获取验证码' }}
|
||||
@@ -95,6 +95,9 @@
|
||||
} from '../api/api.js'
|
||||
import PrivacyPopup from '@/components/privacy-popup/privacy-popup.vue'
|
||||
|
||||
// 输入框类型:统一用 text,避免 number 在真机上把 -/. 过滤掉导致手机号被误判合法;非法手机号由 canGetVerify 禁用获取验证码按钮
|
||||
const inputType = 'text'
|
||||
|
||||
// ========== 响应式数据 ==========
|
||||
const phoneNumber = ref('');
|
||||
const verifyCode = ref('');
|
||||
@@ -434,6 +437,11 @@
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 原生 input 垂直居中 */
|
||||
.native-input {
|
||||
line-height: 88rpx;
|
||||
}
|
||||
|
||||
/* 深度覆盖 uni-easyinput 内部默认样式 */
|
||||
.input-content :deep(.uni-easyinput__content) {
|
||||
height: 100% !important;
|
||||
|
||||
Reference in New Issue
Block a user