Skip to content

Commit 4a8e87f

Browse files
committed
docs: add Options API and Composition API
1 parent b9e2b21 commit 4a8e87f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/content/en/index.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,22 @@ Changes API name from "$vfm" to any other string value. It is useful when you us
192192

193193
## **API**
194194

195+
- In Options API:
196+
195197
Plugin API can be called within any component through `this.$vfm`.
196198

199+
- In Composition API:
200+
201+
```js
202+
import { inject } from 'vue'
203+
204+
export default {
205+
setup() {
206+
const $vfm = inject('$vfm')
207+
}
208+
}
209+
```
210+
197211
### `$vfm.show(name, params)`
198212

199213
- Type: `Function`

0 commit comments

Comments
 (0)