Skip to content

Commit

Permalink
docs(zh): add translation for @pinia/nuxt.ModuleOptions to avoid `4…
Browse files Browse the repository at this point in the history
…04` (#2312)
  • Loading branch information
ifshizuku committed Jul 18, 2023
1 parent 49d53fc commit f046d34
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
40 changes: 40 additions & 0 deletions packages/docs/zh/api/interfaces/pinia_nuxt.ModuleOptions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
editLink: false
---

[API 文档](../index.md) / [@pinia/nuxt](../modules/pinia_nuxt.md) / ModuleOptions

# 接口:ModuleOptions

[@pinia/nuxt](../modules/pinia_nuxt.md).ModuleOptions

## 属性 %{#Properties}%

### autoImports %{#Properties-autoImports}%

`Optional` **autoImports**: (`string` \| [`string`, `string`])[]

将被添加到 nuxt.config.js 文件的自动导入数组。

**`Example`**

```js
autoImports: [
// automatically import `defineStore`
'defineStore',
// automatically import `defineStore` as `definePiniaStore`
['defineStore', 'definePiniaStore',
]
```

---

### disableVuex %{#Properties-disableVuex}%

`Optional` **disableVuex**: `boolean`

默认情况下,Pinia 会禁用 Vuex,将此选项设置为 `false` 可启用 Vuex,然后便可同时使用 Pinia 和 Vuex(仅在 Nuxt 2 中支持)。

**`Default`**

`true`
4 changes: 2 additions & 2 deletions packages/docs/zh/api/modules/pinia.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ ___

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

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

****供内部使用

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

0 comments on commit f046d34

Please sign in to comment.