mall-app-t/peach/store/modal.js

41 lines
975 B
JavaScript
Raw Normal View History

2024-05-22 15:42:13 +08:00
import { defineStore } from 'pinia'
import { ref } from 'vue'
const useModalStore = defineStore(
'modal',
() => {
// 授权弹窗 accountLoginsmsLoginresetPasswordchangeMobilechangePasswordchangeUsername
const auth = ref('')
const share = ref(false)
const menu = ref(false)
const advHistory = ref([])
const lastTimer = ref({
smsLogin: 0,
changeMobile: 0,
resetPassword: 0,
changePassword: 0,
})
return {
auth,
share,
menu,
advHistory,
lastTimer,
}
},
{
persist: {
enabled: true,
strategies: [
{
key: 'modal-store',
paths: ['lastTimer', 'advHistory'],
},
],
},
}
)
export default useModalStore