From: Shizuku Date: Tue, 18 Jul 2023 16:05:07 +0000 (+0800) Subject: docs(zh): add translation for `@pinia/nuxt.ModuleOptions` to avoid `404` (#2312) X-Git-Tag: @pinia/testing@0.1.3~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f046d345c7a45bae8dbe0dae0e3e3c7c0117f769;p=thirdparty%2Fvuejs%2Fpinia.git docs(zh): add translation for `@pinia/nuxt.ModuleOptions` to avoid `404` (#2312) --- 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 index 00000000..6cad240c --- /dev/null +++ b/packages/docs/zh/api/interfaces/pinia_nuxt.ModuleOptions.md @@ -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` diff --git a/packages/docs/zh/api/modules/pinia.md b/packages/docs/zh/api/modules/pinia.md index b21b9344..ff6d930b 100644 --- a/packages/docs/zh/api/modules/pinia.md +++ b/packages/docs/zh/api/modules/pinia.md @@ -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