fix: center input modal to prevent keyboard covering confirm button

Bottom sheet modal gets obscured by virtual keyboard on H5.
Switch to centered dialog + adjust-position=false to keep buttons visible.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
ila
2026-06-08 11:59:30 +08:00
co-authored by Claude Sonnet 4.6
parent a4f715cadd
commit fc1f6a7098
+5 -3
View File
@@ -104,9 +104,9 @@ function saveSnapshot() {
<text class="text-white text-2xl leading-none">+</text> <text class="text-white text-2xl leading-none">+</text>
</view> </view>
<!-- 录入弹窗 --> <!-- 录入弹窗(居中,避免键盘遮挡按钮) -->
<view v-if="showForm" class="fixed inset-0 bg-black/40 flex items-end" @tap.self="showForm = false"> <view v-if="showForm" class="fixed inset-0 bg-black/40 flex items-center px-6" @tap.self="showForm = false">
<view class="w-full rounded-t-3xl bg-white p-6"> <view class="w-full rounded-2xl bg-white p-6">
<view class="mb-4 text-lg font-medium text-gray-800"> <view class="mb-4 text-lg font-medium text-gray-800">
录入当前净资产 录入当前净资产
</view> </view>
@@ -115,6 +115,8 @@ function saveSnapshot() {
type="digit" type="digit"
placeholder="请输入金额(元)" placeholder="请输入金额(元)"
class="w-full rounded-xl border border-gray-200 px-4 py-3 text-base" class="w-full rounded-xl border border-gray-200 px-4 py-3 text-base"
:adjust-position="false"
focus
/> />
<view class="mt-4 flex gap-3"> <view class="mt-4 flex gap-3">
<view <view