fix(splash-screen): 修复启动屏拦截首页触摸事件的问题
针对H5端和普通启动场景,分别处理触摸事件拦截问题: 1. 给启动屏组件添加pointer-events:none,让首页在渐隐期也能正常交互 2. 修改uni.showLoading的mask参数为false,避免原生蒙层遮挡触摸
This commit is contained in:
@@ -103,8 +103,12 @@ class SplashState {
|
||||
this._emit('splash:show');
|
||||
|
||||
// H5 降级: 走系统 loading (Vue 还没挂载,组件层无法渲染)
|
||||
// 注意: mask 设为 false。原 mask:true 会在 H5 注入 .uni-mask 全屏透明蒙层,
|
||||
// 配合 z-index:99999 的 Vue splash 一起把首页触摸全部拦截,导致 H5
|
||||
// 首屏在 boot 期间无法滚动。Vue splash 组件本身已带白色背景提供视觉遮罩,
|
||||
// 这里只要 loading 文字提示,不需要拦截触摸。
|
||||
if (useNativeLoading()) {
|
||||
try { uni.showLoading({ title: opts.title || '加载中...', mask: true }); } catch (e) {}
|
||||
try { uni.showLoading({ title: opts.title || '加载中...', mask: false }); } catch (e) {}
|
||||
}
|
||||
|
||||
const timeout = opts.timeout || DEFAULT_TIMEOUT;
|
||||
|
||||
Reference in New Issue
Block a user