1
0
mirror of https://github.com/sendevia/website.git synced 2026-03-05 23:32:45 +08:00

feat: add Pinia state management

This commit is contained in:
2025-11-30 20:01:10 +08:00
parent 54bdfb0d14
commit 6d60ed1c94
2 changed files with 6 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
import type { Theme } from "vitepress";
import { createPinia } from "pinia";
import Layout from "./layouts/Default.vue";
import AppBar from "./components/AppBar.vue";
@@ -12,10 +13,13 @@ import ScrollToTop from "./components/ScrollToTop.vue";
import NavBar from "./components/NavBar.vue";
import "./styles/main.scss";
const pinia = createPinia();
export default {
Layout,
enhanceApp({ app }) {
app.use(pinia);
app.component("AppBar", AppBar);
app.component("Footer", Footer);
app.component("Header", Header);

View File

@@ -15,6 +15,7 @@
"vue": "^3.5.0"
},
"dependencies": {
"@material/material-color-utilities": "^0.3.0"
"@material/material-color-utilities": "^0.3.0",
"pinia": "^3.0.4"
}
}