]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs(zh): add translation for `@pinia/nuxt.ModuleOptions` to avoid `404` (#2312)
authorShizuku <starsmoe@outlook.com>
Tue, 18 Jul 2023 16:05:07 +0000 (00:05 +0800)
committerGitHub <noreply@github.com>
Tue, 18 Jul 2023 16:05:07 +0000 (18:05 +0200)
packages/docs/zh/api/interfaces/pinia_nuxt.ModuleOptions.md [new file with mode: 0644]
packages/docs/zh/api/modules/pinia.md

diff --git a/packages/docs/zh/api/interfaces/pinia_nuxt.ModuleOptions.md b/packages/docs/zh/api/interfaces/pinia_nuxt.ModuleOptions.md
new file mode 100644 (file)
index 0000000..6cad240
--- /dev/null
@@ -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`
index b21b93442bf4cadaf3168ff7e8864f7b4175cb23..ff6d930b3b3a0c634e93445a35a9902d108be38a 100644 (file)
@@ -458,7 +458,7 @@ ___
 
 ▸ (...`args`): `any`
 
-Generic type for a function that can infer arguments and return type
+可以推断参数和返回值类型的函数通用类型。
 
 **仅**供内部使用
 
@@ -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`\>\>\>
\ No newline at end of file