yansenlei / VJsoneditor

:large_blue_diamond: vue use jsoneditor
https://yansenlei.github.io/VJsoneditor/
Apache License 2.0
182 stars 45 forks source link

Operation document lacks successful callback method 'this.$emit("input", json)' #7

Closed Percy6 closed 4 years ago

Percy6 commented 5 years ago

Events on yarnpkg only have an Error callback; but I see a 'this.$emit("input", json)' in your source code; but this method should also appear in Events. So that users can use it better.

yansenlei commented 5 years ago

@Percy6

Hi, Are you hoping for the success callback? Watch your data changes can be met:

// comp.vue
<v-jsoneidtor v-model="data"></v-jsoneditor>
...
{
    watch: {
        data () {
            // do something...
        }
    }
}