diff --git a/README.md b/README.md index 1d83ef0..7f8686b 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,8 @@ To use `v-viewer`, simply import it and the `css` file, and call `app.use()` to The component, directive and api will be installed together in the global. +Two different API styles are both supported: **Options API** and **Composition API**. + ```ts import { createApp } from 'vue' import App from './App.vue' @@ -67,6 +69,7 @@ app.mount('#app') + + + ``` ### Support UMD @@ -133,6 +150,7 @@ Get the element by selector and then use `el.$viewer` to get the `viewer` instan + + + ``` #### Directive modifiers @@ -195,9 +230,10 @@ You can simply import the component and register it locally too. ```vue + + + ``` ## Options & Methods of Viewer @@ -388,6 +481,7 @@ app.mount('#app') + + + ``` ### defaultOptions diff --git a/example/views/example/ApiExample.vue b/example/views/example/ApiExample.vue index ae3ba5c..03eb0b6 100644 --- a/example/views/example/ApiExample.vue +++ b/example/views/example/ApiExample.vue @@ -1,3 +1,4 @@ + + +