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

41 lines
975 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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