Skip to content

Commit b0164ca

Browse files
committed
update README.md
1 parent 7f4a4ba commit b0164ca

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

README.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,22 @@ NPM:
3434
npm install --save vue-rough-notation
3535
```
3636

37-
CDN:
37+
## Usage
38+
39+
### Vue3
3840

3941
```js
40-
<script src="https://unpkg.com/vue-rough-notation/dist/vue-rough-notation.js"></script>
41-
```
42+
import { createApp } from 'vue'
43+
import VueRoughNotation from 'vue-rough-notation';
4244

43-
## Usage
45+
const app = createApp(...);
46+
app.use(VueRoughNotation);
47+
```
4448

45-
main.js:
49+
### Vue2
4650

4751
```js
52+
import Vue from 'vue';
4853
import VueRoughNotation from 'vue-rough-notation';
4954

5055
Vue.use(VueRoughNotation);
@@ -77,6 +82,16 @@ The default global options are:
7782

7883
You can change the options when install:
7984

85+
- Vue3
86+
87+
```js
88+
import VueRoughNotation from 'vue-rough-notation';
89+
90+
app.use(VueRoughNotation, options);
91+
```
92+
93+
- Vue2
94+
8095
```js
8196
import VueRoughNotation from 'vue-rough-notation';
8297

@@ -88,10 +103,7 @@ Vue.use(VueRoughNotation, options);
88103
### Usage
89104

90105
```html
91-
<RoughNotation
92-
:is-show="isShow"
93-
type="underline"
94-
>
106+
<RoughNotation :is-show="isShow" type="underline">
95107
<span>Rough Notation is awesome</span>
96108
</RoughNotation>
97109
```

0 commit comments

Comments
 (0)