提交 a38a03f1 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

refactor: code optimize

上级 aca612db
......@@ -32,10 +32,6 @@ export default {
onLastPageBackPress: function (): boolean | null {
// 自动化测试
setLifeCycleNum(state.lifeCycleNum - 1000)
uni.showToast({
title: '再按一次退出应用',
position: 'bottom',
})
return null
},
}
......
class State {
constructor(public lifeCycleNum: number) {
}
type State = {
lifeCycleNum: number
}
export const state = reactive(new State(0))
export const state = reactive({ lifeCycleNum: 0 } as State)
export const setLifeCycleNum = (num: number) => {
state.lifeCycleNum = num
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册