File tree 2 files changed +42
-2
lines changed
2 files changed +42
-2
lines changed Original file line number Diff line number Diff line change
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 `
Original file line number Diff line number Diff line change 458
458
459
459
▸ (...` args ` ): ` any `
460
460
461
- Generic type for a function that can infer arguments and return type
461
+ 可以推断参数和返回值类型的函数通用类型。
462
462
463
463
** 仅** 供内部使用
464
464
@@ -1199,4 +1199,4 @@ getter 和 plugin 添加的 state 属性。
1199
1199
1200
1200
#### 返回值
1201
1201
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 ` \>\>\>
You can’t perform that action at this time.
0 commit comments