Skip to content

Commit f046d34

Browse files
authored
docs(zh): add translation for @pinia/nuxt.ModuleOptions to avoid 404 (#2312)
1 parent 49d53fc commit f046d34

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
editLink: false
3+
---
4+
5+
[API 文档](../index.md) / [@pinia/nuxt](../modules/pinia_nuxt.md) / ModuleOptions
6+
7+
# 接口:ModuleOptions
8+
9+
[@pinia/nuxt](../modules/pinia_nuxt.md).ModuleOptions
10+
11+
## 属性 %{#Properties}%
12+
13+
### autoImports %{#Properties-autoImports}%
14+
15+
`Optional` **autoImports**: (`string` \| [`string`, `string`])[]
16+
17+
将被添加到 nuxt.config.js 文件的自动导入数组。
18+
19+
**`Example`**
20+
21+
```js
22+
autoImports: [
23+
// automatically import `defineStore`
24+
'defineStore',
25+
// automatically import `defineStore` as `definePiniaStore`
26+
['defineStore', 'definePiniaStore',
27+
]
28+
```
29+
30+
---
31+
32+
### disableVuex %{#Properties-disableVuex}%
33+
34+
`Optional` **disableVuex**: `boolean`
35+
36+
默认情况下,Pinia 会禁用 Vuex,将此选项设置为 `false` 可启用 Vuex,然后便可同时使用 Pinia 和 Vuex(仅在 Nuxt 2 中支持)。
37+
38+
**`Default`**
39+
40+
`true`

Diff for: packages/docs/zh/api/modules/pinia.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ ___
458458

459459
▸ (...`args`): `any`
460460

461-
Generic type for a function that can infer arguments and return type
461+
可以推断参数和返回值类型的函数通用类型。
462462

463463
****供内部使用
464464

@@ -1199,4 +1199,4 @@ getter 和 plugin 添加的 state 属性。
11991199
12001200
#### 返回值
12011201
1202-
`ToRefs`<[`StoreState`](pinia.md#storestate)<`SS`\> & [`StoreGetters`](pinia.md#storegetters)<`SS`\> & [`PiniaCustomStateProperties`](../interfaces/pinia.PiniaCustomStateProperties.md)<[`StoreState`](pinia.md#storestate)<`SS`\>\>\>
1202+
`ToRefs`<[`StoreState`](pinia.md#storestate)<`SS`\> & [`StoreGetters`](pinia.md#storegetters)<`SS`\> & [`PiniaCustomStateProperties`](../interfaces/pinia.PiniaCustomStateProperties.md)<[`StoreState`](pinia.md#storestate)<`SS`\>\>\>

0 commit comments

Comments
 (0)