12345678910111213141516171819202122 |
- <template>
- <div class="basic-editor-view" :style="{...inputStyle, width }" v-textarea="html"></div>
- </template>
- <script>
- import { computed } from 'vue'
- import textareaDirectives from '@cip/components/directives/textarea'
- import { formInputViewProps, useFormView } from '@cip/components/helper/form-input'
- import './index.less'
- export default {
- props: formInputViewProps,
- directives: {
- [textareaDirectives.name]: textareaDirectives
- },
- setup (props) {
- const { width, inputStyle } = useFormView(props)
- const html = computed(() => props.modelValue)
- return { html, width, inputStyle }
- }
- }
- </script>
|