12345678910111213141516171819202122 |
- import { h, computed, withDirectives } from 'vue'
- import { formInputViewProps } from '../../form-input-props'
- import textareaDirective from '../../../directives/textarea'
- export default {
- props: formInputViewProps,
- inheritAttrs: false,
- setup (props) {
- const fontWeight = computed(() => {
- return props.config.fontWeight ?? 'normal'
- })
- const fontSize = computed(() => {
- return props.config.fontSize + 'px' ?? '12px'
- })
- const textAlign = computed(() => {
- return props.config.textAlign ?? 'left'
- })
- return () => withDirectives(
- h('div', { style: { fontWeight: fontWeight.value, fontSize: fontSize.value, textAlign: textAlign.value } }),
- [[textareaDirective, props.modelValue]]
- )
- }
- }
|