1.安装 npm install pinia --save
2.src文件夹下新建store文件夹,并新建index.ts
import {createPinia } from 'pinia'
const pinia = createPinia()
export default pinia
2.在main.ts中引入 pinia
import pinia from './store'
import {createApp} from 'vue'
const app = createApp()
app.use(router)
app.use(pinia)
app.mount('#app')
标签:use,Pinia,app,管理工具,ts,pinia,vue3,import From: https://www.cnblogs.com/bamboopanders/p/17585083.html