|
|
@@ -40,7 +40,7 @@
|
|
|
</view>
|
|
|
|
|
|
<!-- 错误提示 -->
|
|
|
- <text v-if="error" class="error">
|
|
|
+ <text class="error-text" :class="{ visible: !!error }">
|
|
|
{{ error }}
|
|
|
</text>
|
|
|
</view>
|
|
|
@@ -138,6 +138,7 @@ const togglePassword = () => {
|
|
|
padding: 20rpx 0;
|
|
|
box-sizing: border-box;
|
|
|
border-bottom: 1rpx solid #e4e7ed;
|
|
|
+ position: relative;
|
|
|
|
|
|
.form-label {
|
|
|
margin-bottom: 8rpx;
|
|
|
@@ -181,11 +182,18 @@ const togglePassword = () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .error {
|
|
|
- margin-top: 8rpx;
|
|
|
- color: var(--form-error-font-color);
|
|
|
- font-size: 24rpx;
|
|
|
- line-height: 28rpx;
|
|
|
+ .error-text {
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ bottom: 6rpx;
|
|
|
+ font-size: 20rpx;
|
|
|
+ line-height: 20rpx;
|
|
|
+ color: #ff4d4f;
|
|
|
+ opacity: 0;
|
|
|
+ pointer-events: none; // 不影响点击
|
|
|
+ }
|
|
|
+ .error-text.visible {
|
|
|
+ opacity: 1;
|
|
|
}
|
|
|
}
|
|
|
</style>
|