view.vue 509 B

123456789101112131415161718192021
  1. <template>
  2. <div class="basic-editor-view" v-textarea="html"></div>
  3. </template>
  4. <script>
  5. import { computed } from 'vue'
  6. import { formInputViewProps } from '../../form-input-props'
  7. import textareaDirectives from '../../../directives/textarea'
  8. import './index.less'
  9. export default {
  10. props: formInputViewProps,
  11. directives: {
  12. [textareaDirectives.name]: textareaDirectives
  13. },
  14. setup (props) {
  15. const html = computed(() => props.modelValue)
  16. return { html }
  17. }
  18. }
  19. </script>