fix(ui): 多项 UI 修复 — 弹窗遮挡/按钮可见性/暗黑闪烁/云函数版本
- 计划编辑弹窗移出 .container 避免 fixed 降级 + 修复滚动 - dock bottom 40rpx→8rpx 紧贴底部, sheet padding 同步调整 - 计划编辑器取消/恢复默认按钮可见性修复(bg 匹配容器) - ui-btn--danger 按钮可见性修复 - 清除确认弹窗跟随暗黑模式切换 - icons.js build() 中 Fill 路径覆盖 outlined 路径修复 - plan.js getPlanDay 忽略 customPlans 修复 - darkMode.js 冗余三元简化 - util.js fileToDataURI fallback 可读性提升 - theme.js: BASE_VARS 与 getThemeStyle 统一来源, 去 50ms navbar 延迟 - app.wxss: 移除 page transition 和 background-color 减少闪白 - 云函数 wx-server-sdk 版本统一 ~2.6.3, tts cloud.init 一致化 - 闪白问题: wx.setBackgroundColor 三层防护(onLaunch/applyThemeToPage/switchTab) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -197,12 +197,14 @@
|
||||
<text class="about-copy">Made with ❤️ for better fitness</text>
|
||||
</view>
|
||||
</ui-card>
|
||||
</view>
|
||||
<!-- /container — 关闭在这里,让下面的弹窗 fixed 相对视口而非 .container -->
|
||||
|
||||
<!-- 训练计划编辑器:用普通 view 不用 ui-modal,
|
||||
因为 WeChat 自定义组件根元素上 position: fixed 会被吃,导致 body 被推到容器末尾。
|
||||
普通 view 的 position: fixed 在小程序里 100% 生效。 -->
|
||||
<view wx:if="{{showPlanEditor}}" class="plan-editor-mask" catchtouchmove="onNoop">
|
||||
<view class="plan-editor-mask__bg" bindtap="onCloseEditor"></view>
|
||||
<view wx:if="{{showPlanEditor}}" class="plan-editor-mask" style="{{themeStyle}}">
|
||||
<view class="plan-editor-mask__bg" bindtap="onCloseEditor" catchtouchmove="onNoop"></view>
|
||||
<view class="plan-editor-sheet" catchtap="onNoop">
|
||||
<view class="plan-editor-handle"></view>
|
||||
<view class="editor-title">编辑训练计划</view>
|
||||
@@ -284,33 +286,37 @@
|
||||
<view class="editor-action-reset" wx:if="{{editingIsCustom}}" bindtap="onResetPlan">
|
||||
<text>恢复默认</text>
|
||||
</view>
|
||||
<view class="editor-action-cancel" bindtap="onCloseEditor">
|
||||
<text>取消</text>
|
||||
</view>
|
||||
<view class="editor-action-save" bindtap="onSavePlan">
|
||||
<text>保存</text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="editor-cancel" bindtap="onCloseEditor">取消</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 清除数据确认弹窗:用自定义 ui-modal 替代 wx.showModal
|
||||
避免开发者工具中 wx.showModal 首次点击不关闭的问题 -->
|
||||
<ui-modal
|
||||
visible="{{showClearConfirm}}"
|
||||
position="center"
|
||||
showHandle="{{false}}"
|
||||
bind:close="onCancelClear"
|
||||
>
|
||||
<view class="confirm-dialog" catchtap="onNoop">
|
||||
<text class="confirm-title">清除数据</text>
|
||||
<text class="confirm-desc">将删除所有训练记录和连续打卡数据,此操作不可恢复。确定继续吗?</text>
|
||||
<view class="confirm-actions">
|
||||
<view class="confirm-btn confirm-btn--cancel" bindtap="onCancelClear">
|
||||
<text>取消</text>
|
||||
</view>
|
||||
<view class="confirm-btn confirm-btn--danger" bindtap="onConfirmClear">
|
||||
<text>确定清除</text>
|
||||
避免开发者工具中 wx.showModal 首次点击不关闭的问题。
|
||||
外层 view 注入 themeStyle,确保弹窗跟随暗黑模式切换。 -->
|
||||
<view style="{{themeStyle}}">
|
||||
<ui-modal
|
||||
visible="{{showClearConfirm}}"
|
||||
position="center"
|
||||
showHandle="{{false}}"
|
||||
bind:close="onCancelClear"
|
||||
>
|
||||
<view class="confirm-dialog" catchtap="onNoop">
|
||||
<text class="confirm-title">清除数据</text>
|
||||
<text class="confirm-desc">将删除所有训练记录和连续打卡数据,此操作不可恢复。确定继续吗?</text>
|
||||
<view class="confirm-actions">
|
||||
<view class="confirm-btn confirm-btn--cancel" bindtap="onCancelClear">
|
||||
<text>取消</text>
|
||||
</view>
|
||||
<view class="confirm-btn confirm-btn--danger" bindtap="onConfirmClear">
|
||||
<text>确定清除</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</ui-modal>
|
||||
</view>
|
||||
</ui-modal>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user