Skip to content

Commit

Permalink
chore: update usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ygj6 committed Nov 20, 2021
1 parent 72d7f43 commit 44d2e5e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
2 changes: 1 addition & 1 deletion doc/cn/use.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
var editor = require('./editor.vue');
createApp({
render: () => h(editor)
}).use(sMd).mount('#main');
}).mount('#main');
```
`index.html`:
```html
Expand Down
21 changes: 7 additions & 14 deletions doc/en/use.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,12 @@
```javascript
// Global Registration
// import with ES6
import Vue from 'vue'
import { createApp } from 'vue'
import App from './app.vue';
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'

// use
Vue.use(mavonEditor)
new Vue({
'el': '#main',
data() {
return { value: '' }
}
})
createApp(App).use(mavonEditor).mount('#app')
```
`index.html`
```html
Expand Down Expand Up @@ -69,12 +63,11 @@
`index.js`:
```javascript
// The same below
import Vue from 'vue';
import { createApp, h } from 'vue'
var editor = require('./editor.vue');
new Vue({
el: '#main',
render: h => h(editor)
});
createApp({
render: () => h(editor)
}).mount('#main');
```
`index.html`:
```html
Expand Down
4 changes: 2 additions & 2 deletions src/dev/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
*/

import { createApp, h } from 'vue';
import editor from './app.vue';
var sMd = require('../index.js');
import editor from './editor.vue';
import sMd from '../index'

createApp({
render: () => h(editor)
Expand Down

0 comments on commit 44d2e5e

Please sign in to comment.