123456789101112131415161718 |
- import { defineStore } from 'pinia';
- import type { AccountModel } from '@model/account.model.ts';
- import { defaultMenus } from '@/router/menu.ts';
- export const useAccountStore = defineStore('account', () => {
- const token = ref<string>();
- const account = shallowRef<AccountModel>();
- const menus = shallowRef(defaultMenus);
- function $reset() {
- token.value = void 0;
- account.value = void 0;
- menus.value = [];
- }
- return { token, account, menus, $reset };
- });
|