import { defineStore } from 'pinia' import { getLogo } from '@/api/setting' const settingStore = defineStore('setting', { state: () => ({ logo: '', }), actions: { setLogo() { getLogo().then((res: any) => { console.log(res, 'this.logo') this.logo = res.result.logo document.querySelector("link[rel~='icon']").href = import.meta.env.VITE_APP_BASE_API + '/' + this.logo }) }, }, }) export default settingStore