vue-markdown/App.vue

53 lines
1.1 KiB
Vue
Raw Normal View History

<template>
<div>
<Markdown
v-model="val"
@on-ready="onReady"
@on-copy="onCopy"
2019-12-13 18:21:59 +08:00
@on-upload-image="onUpladImage"
@on-save="onSave"
@on-error="onError"
:height="500"
/>
</div>
</template>
<script>
// import Markdown from './dist/simple';
2019-11-08 17:57:24 +08:00
// import Markdown from 'vue-meditor';
import Markdown from './src/pro';
2019-12-13 17:32:17 +08:00
// import Markdown from './src/simple';
export default {
components: {
Markdown
},
data: function () {
return {
val: null
}
},
methods: {
onReady(data) {
console.log(data)
},
onCopy(text) {
console.log(text);
},
2019-12-13 18:21:59 +08:00
onUpladImage(file) {
console.log(file)
},
onSave(data) {
console.log(data);
},
onError(err) {
console.log(err)
}
}
}
</script>
<style lang="less">
</style>