mirror of https://github.com/halo-dev/halo-admin
[release-2.0] fix: activated theme not loaded after initialization (#793)
This is an automated cherry-pick of #790 /assign ruibaby ```release-note 修复首次初始化之后,Console 没有加载已激活主题的问题。 ```pull/808/head
parent
8433dcbff1
commit
c2f9b73a8d
|
@ -18,6 +18,7 @@ import type {
|
||||||
SinglePageRequest,
|
SinglePageRequest,
|
||||||
Tag,
|
Tag,
|
||||||
} from "@halo-dev/api-client";
|
} from "@halo-dev/api-client";
|
||||||
|
import { useThemeStore } from "@/stores/theme";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
@ -98,6 +99,8 @@ const handleSubmit = async () => {
|
||||||
|
|
||||||
const systemStateStore = useSystemStatesStore();
|
const systemStateStore = useSystemStatesStore();
|
||||||
await systemStateStore.fetchSystemStates();
|
await systemStateStore.fetchSystemStates();
|
||||||
|
const themeStore = useThemeStore();
|
||||||
|
await themeStore.fetchActivatedTheme();
|
||||||
|
|
||||||
router.push({ name: "Dashboard" });
|
router.push({ name: "Dashboard" });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in New Issue