销售话术页面

This commit is contained in:
砂糖
2025-07-24 17:44:00 +08:00
parent 6847c99995
commit 7c17e5d0c7
6 changed files with 468 additions and 3 deletions

View File

@@ -0,0 +1,55 @@
<template>
<div id="vditor" style="min-height: 192px;"></div>
</template>
<script>
import Vditor from 'vditor'
import 'vditor/dist/index.css'
export default {
name: 'VditorEditor',
props: {
value: {
type: String,
default: ''
}
},
data() {
return {
vditor: null
}
},
mounted() {
this.vditor = new Vditor('vditor', {
value: this.value,
height: 360,
toolbarConfig: {
pin: true,
},
cache: {
enable: false,
},
after: () => {
this.vditor.setValue(this.value || '')
},
input: (val) => {
this.$emit('input', val)
}
})
},
watch: {
value(val) {
if (this.vditor && val !== this.vditor.getValue()) {
this.vditor.setValue(val || '')
}
}
}
}
</script>
<style scoped>
#vditor {
border: 1px solid #e4e7ed;
border-radius: 4px;
}
</style>