Skip to content

Commit

Permalink
docs: 更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
markthree committed May 21, 2023
1 parent 34fe91d commit 8b43036
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -834,24 +834,18 @@ export const useCounterStore = defineStore("counter", {
```ts
// src/plugins/pinia.ts
import { App } from "vue";
// 导出 default 接口
export default (app: App) => app.use(createPinia());
export default createPinia() // pinia 将被自动安装
```
或者 `vue-router`
```ts
// src/plugins/router.ts
import { App } from "vue";
// 省略各种配置
// 导出 default 接口
export default (app: App) => app.use(router);
export default router // 路由将被自动安装
```
当然 `pinia``vue-router` 已经预设好了,你不需要重新关注他们。
Expand Down

0 comments on commit 8b43036

Please sign in to comment.