import { computed } from 'vue'
import { formInputProps } from '../../form-input-props'
import { useFormView } from '../../../hooks/form-input'
export default {
  props: formInputProps,
  setup (props) {
    const { securityConfig } = useFormView(props)
    const viewValue = computed(() => {
      return props.modelValue.map(item => item[securityConfig.value.primaryKey]).join(securityConfig.value.splitKey)
    })
    return () => <div>{viewValue.value}</div>
  }
}
