diff --git a/App.vue b/App.vue index d1a2a332160bd4c8a4e54e30a9c096b3a458a9af..ed44ba025dd5770527975981690c7bd5acf76a21 100644 --- a/App.vue +++ b/App.vue @@ -32,10 +32,6 @@ export default { onLastPageBackPress: function (): boolean | null { // 自动化测试 setLifeCycleNum(state.lifeCycleNum - 1000) - uni.showToast({ - title: '再按一次退出应用', - position: 'bottom', - }) return null }, } diff --git a/store/index.uts b/store/index.uts index e60cf830cbd19169ddaa7bb9971b6f6bc9dc6a13..09170b23d3441415ea74e19ddcf6eb7b267a81c7 100644 --- a/store/index.uts +++ b/store/index.uts @@ -1,9 +1,8 @@ -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