明梦爽
2022-01-19 b80d0c5dd5ca242427a07f4891e8a0dc354889b3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<template>
  <div>
    <quill-editor ref="text" v-model="content" class="myQuillEditor" :options="editorOption" />
    <el-button type="primary" @click="submit">提交</el-button>
  </div>
</template>
<script>
import { quillEditor } from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
 
export default {
  components:{ quillEditor },
  data () {
    return {
      content: '',
      editorOption: {} ,
    }
  },
  methods: {
    submit () {
      console.log(this.$refs.text.value)
    }
  }
}
</script>
<style lang="less" scoped>
// .myQuillEditor{
//   height: 400px;
// }
 
</style>