| | |
| | | }) |
| | | } |
| | | |
| | | if (type === 'card') { |
| | | opentypes.push({ |
| | | value: 'form', |
| | | text: '表单' |
| | | }) |
| | | } |
| | | |
| | | if (!card.control && card.controlField) { |
| | | card.control = 'disabled' |
| | | } |
| | |
| | | initVal: card.funcType || '', |
| | | required: true, |
| | | options: funTypes |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'formType', |
| | | label: '表单类型', |
| | | initVal: card.formType || 'switch', |
| | | required: true, |
| | | options: [{ |
| | | value: 'switch', |
| | | text: '开关' |
| | | }, { |
| | | value: 'radio', |
| | | text: '勾选框' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | initVal: card.controlVal || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'splitLine', |
| | | key: 'title', |
| | | label: '表单', |
| | | initVal: '' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'field', |
| | | label: Formdict['model.form.field'], |
| | | initVal: card.field || '', |
| | | required: true, |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'size', |
| | | label: '开关尺寸', |
| | | initVal: card.size || 'default', |
| | | options: [{ |
| | | value: 'default', |
| | | text: '大' |
| | | }, { |
| | | value: 'small', |
| | | text: '小' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'openVal', |
| | | label: '开启值', |
| | | initVal: card.openVal || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'closeVal', |
| | | label: '关闭值', |
| | | initVal: card.closeVal || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'openText', |
| | | label: '开启提示', |
| | | initVal: card.openText || '', |
| | | required: false, |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'closeText', |
| | | label: '关闭提示', |
| | | initVal: card.closeText || '', |
| | | required: false, |
| | | }, |
| | | ] |
| | | |
| | | return forms |