Skip to content

Commit 5dc404e

Browse files
committed
feat: initialized event
1 parent 004c896 commit 5dc404e

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ Vue.component('vue-simplemde', VueSimplemde)
6060
| configs | Object | {} | [SimpleMDE's config](#configuration) |
6161
| previewRender | Function | - | configs.previewRender |
6262

63+
## Events
64+
65+
| property | describe | arguments |
66+
| ----| ----- | ---- |
67+
| input | Triggered when the Input value changes | value |
68+
| blur | Triggered when the Input loses focus | value |
69+
| initialized | Triggered when initialization is complete | simplemde |
70+
6371
## Methods
6472

6573
``` js

src/index.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ export default {
9393
9494
// 绑定事件
9595
this.bindingEvents();
96+
97+
// 初始化完成
98+
this.$nextTick(() => {
99+
this.$emit('initialized', this.simplemde);
100+
});
96101
},
97102
bindingEvents() {
98103
this.simplemde.codemirror.on('change', () => {

0 commit comments

Comments
 (0)