UNPKG

@form-create/tdesign

Version:

tdesign动态表单|form-create is a form generation component that can generate dynamic rendering, data collection, verification and submission functions through JSON. Supports 5 UI frameworks, and supports the generation of any Vue components. Built-in 20 kinds

18 lines (14 loc) 348 B
import toArray from '@form-create/utils/lib/toarray'; import checkbox from './checkbox'; const name = 'select'; export default { ...checkbox, name, toFormValue(value, ctx) { if (ctx.prop.props.multiple && !Array.isArray(value)) { return toArray(value) } else { return value; } } }