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:
@@ -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);
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user