一个page绑定2个转场 , 触发前面的转场, 转场视图不弹出
// 文本编辑
.bindContentCover(this.curTextEditItemConfig != undefined, this.buildTextEditWidge(), {
modalTransition: ModalTransition.DEFAULT,
transition: TransitionEffect.translate({ y: DeviceUtil.getDeviceHeightPt() })
.animation({ duration: 200 }),
backgroundColor: Color.Transparent,
})
// 通用条目样式选择
.bindContentCover(this.styleEditConfig != undefined, this.buildStyleChooseWidge(), {
modalTransition: ModalTransition.DEFAULT,
transition: TransitionEffect.opacity(0)
.animation({ duration: 200 }),
backgroundColor: Color.Transparent,
})
当前全模态弹出后,通过路由跳转,全模态页面会消失,是当前的设计规格。暂提供以下思路:
思路一:目前可以通过全局状态控制弹窗显示和隐藏,在做页面跳转router.pushUrl 到其他界面后再次返回时,可以在onPageShow生命周期中通过状态判断是否显示之前的弹窗。
思路二:容器页面外层使用Stack包裹,弹窗页面属于Stack容器的子组件,弹窗状态有页面状态控制,路由跳转,再返回之前页面的状态不受影响,还是会保持之前的弹窗为弹出状态。