| | |
| | | }, |
| | | }, |
| | | { |
| | | name: 'dropdownClassName', |
| | | name: 'popupClassName', |
| | | label: '下拉菜单的 className 属性', |
| | | component: 'Input', |
| | | componentProps: { |
| | |
| | | |
| | | function deleteProps(list: Omit<IBaseFormAttrs, 'tag'>[], key: string) { |
| | | list.forEach((element, index) => { |
| | | if (element.name == key) { |
| | | if (element.name === key) { |
| | | list.splice(index, 1); |
| | | } |
| | | }); |
| | |
| | | |
| | | //在所有的选项中查找需要配置项 |
| | | const findCompoentProps = (props, name) => { |
| | | const idx = props.findIndex((value: BaseFormAttrs, _index) => { |
| | | return value.name == name; |
| | | const idx = props.findIndex((value: BaseFormAttrs) => { |
| | | return value.name === name; |
| | | }); |
| | | if (idx) { |
| | | if (props[idx].componentProps) { |
| | | return props[idx].componentProps; |
| | | } |
| | | if (props[idx] && props[idx].componentProps) { |
| | | return props[idx].componentProps; |
| | | } |
| | | }; |
| | | |