index.jsx 714 B

12345678910111213141516171819
  1. import { computed, defineComponent } from 'vue'
  2. import { formInputViewProps } from '../../form-input-props'
  3. export default defineComponent({
  4. props: formInputViewProps,
  5. setup (props) {
  6. const fontWeight = computed(() => {
  7. return props.config.fontWeight ?? 'normal'
  8. })
  9. const fontSize = computed(() => {
  10. return props.config.fontSize + 'px' ?? '14px'
  11. })
  12. const textAlign = computed(() => {
  13. return props.config.textAlign ?? 'left'
  14. })
  15. return () => (
  16. <div id={props.fieldKey} style={{ ...(props.config.inputStyle || {}), fontWeight: fontWeight.value, fontSize: fontSize.value, textAlign: textAlign.value, width: '100%' }}>{props.config.staticInfo}</div>
  17. )
  18. }
  19. })