| 12345678910111213141516 |
- import { ref } from "vue"
- import { defineStore } from "pinia"
- export const useGlobalStore = defineStore('global', () => {
- let token = ref('');
- const change = function <T>(types: string, value: T): T | string {
- if (types == 'token') {
- token.value = value as string;
- return token.value;
- }
- return value
- }
- return {
- token, change
- }
- })
|