import React from 'react' import { View, Text, Input, Image, Picker } from '@tarojs/components' import { Stadium } from '../SelectStadium' import img from '@/config/images'; import './FormBasicInfo.scss' import { FormFieldConfig } from '@/config/formSchema/publishBallFormSchema'; interface FormBasicInfoProps { fee: string location: string gameplay: string selectedStadium: Stadium | null onFeeChange: (value: string) => void onLocationChange: (value: string) => void onGameplayChange: (value: string) => void onStadiumSelect: () => void children: FormFieldConfig[] } const FormBasicInfo: React.FC = ({ fee, location, gameplay, selectedStadium, onFeeChange, onLocationChange, onGameplayChange, onStadiumSelect, children }) => { const renderChildren = () => { return children.map((child: any, index: number) => { return { index === 0 && ( {child.label} onFeeChange(e.detail.value)} /> 元/每人 ) } { index === 1 && ( {child.label} {selectedStadium ? selectedStadium.name : '请选择'} ) } { index === 2 && ( {child.label} {gameplay ? gameplay : '请选择'} ) } }) } return ( {/* 费用 */} {renderChildren()} ) } export default FormBasicInfo