Skip to content

Commit 34b23bf

Browse files
committed
docs: add options
1 parent ac603d0 commit 34b23bf

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

docs/guide/getting-started.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,35 @@ module.exports = {
126126

127127
::::
128128

129+
### Options
130+
131+
```ts
132+
VueMacros({
133+
root: '/your-project-path',
134+
/**
135+
* Vue version, 2 or 3.
136+
*
137+
* optional, detecting automatically.
138+
*/
139+
version: 3,
140+
141+
plugins: {
142+
vue: Vue(),
143+
vueJsx: VueJsx(),
144+
},
145+
146+
/** Defaults to true */
147+
defineModel: {
148+
/**
149+
* Unified mode, only works for Vue 2
150+
*
151+
* Converts `modelValue` to `value`
152+
*/
153+
unified: true,
154+
},
155+
})
156+
```
157+
129158
## TypeScript Support
130159

131160
:::: code-group

docs/macros/define-model.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@ Declaring and mutate `v-model` props as the same as normal variable using the `d
88
| Vue 2 | :white_check_mark: |
99
| TypeScript / Volar | :white_check_mark: |
1010

11+
## Options
12+
13+
```ts
14+
VueMacros({
15+
defineModel: {
16+
/**
17+
* Unified mode, only works for Vue 2
18+
*
19+
* Converts `modelValue` to `value`
20+
*/
21+
unified: false,
22+
},
23+
})
24+
```
25+
1126
## Usage
1227

1328
```vue

0 commit comments

Comments
 (0)