index.vue 673 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <div>
  3. <WangEditor style="width: 100%; height: 60%" :content="content" @editorContent="getEditorContent"></WangEditor>
  4. </div>
  5. </template>
  6. <script>
  7. import WangEditor from '@/components/wangEditor/index.vue';
  8. export default {
  9. name: 'index',
  10. components: { WangEditor },
  11. props: {
  12. content: '',
  13. },
  14. watch: {
  15. content: {
  16. handler(val) {
  17. // this.contents = val
  18. // this.$emit('getContent', val);
  19. },
  20. deep: true,
  21. },
  22. },
  23. data() {
  24. return {
  25. contents: '',
  26. };
  27. },
  28. methods: {
  29. getEditorContent(data) {
  30. this.contents = data;
  31. },
  32. },
  33. created() {},
  34. };
  35. </script>
  36. <style scoped></style>