fix(ai-chat): 消除键盘弹出时输入框闪烁

- 键盘垫高层不再使用 v-if 突然插入,改为始终存在(高度默认为0)
- 添加 CSS transition: height 0.25s ease 平滑过渡动画
This commit is contained in:
2026-05-13 16:38:33 +08:00
parent 69466f410c
commit a252d42b62

View File

@@ -329,8 +329,8 @@
</view> </view>
</view> </view>
<!-- 键盘垫高层:键盘弹出时撑开空间将输入框上推 --> <!-- 键盘垫高层:键盘弹出时平滑撑开空间将输入框上推 -->
<view v-if="keyboardHeight > 0" :style="{ height: keyboardHeight + 'px', flexShrink: 0 }"></view> <view class="keyboard-spacer" :style="{ height: keyboardHeight + 'px' }"></view>
<!-- 语音输入面板 --> <!-- 语音输入面板 -->
<view v-if="enalbeVoicePanelShow" class="voice-popup"> <view v-if="enalbeVoicePanelShow" class="voice-popup">
@@ -2895,6 +2895,12 @@ $radius-lg: 36rpx;
} }
} }
/* 键盘垫高层:高度变化时平滑过渡 */
.keyboard-spacer {
flex-shrink: 0;
transition: height 0.25s ease;
}
/* 输入区域 */ /* 输入区域 */
.input-area { .input-area {
background: white; /* 白色 */ background: white; /* 白色 */