Closed tech-xs closed 2 years ago
before-preview-change函数不执行
<template> <Mgr> <v-md-preview ref="md" :text="mdText" :before-preview-change="change"/> </Mgr> </template> <script> import Mgr from '@/components/mgr/Mgr' import {getDocContent} from "@/api/doc/doc"; export default { name: "WebDoc", components: {Mgr}, data() { return { mdText: '' } }, created() { let resource = this.$route.query.resource getDocContent(resource).then(res => { this.mdText = res }) }, methods: { change(text, next) { console.log(this.$refs.md) console.log(text) console.log(next) // next() } } } </script> <style lang="less" scoped> .body { margin-left: 50px; margin-right: 50px; } </style>
preview 组件使用 before-change
before-preview-change函数不执行