marketingGoal.tsx 891 B

1234567891011121314151617181920212223242526
  1. import React from "react"
  2. import style from './index.less'
  3. import { CheckCircleFilled } from "@ant-design/icons"
  4. /**
  5. * 营销目的
  6. * @param param0
  7. * @returns
  8. */
  9. const MarketingGoal: React.FC<PULLIN.FormItemDataProps> = ({ data, value, onChange, id }) => {
  10. return <div className={style.marketingGoal} id={id}>
  11. <div className={style.marketingGoal_row}>
  12. {data.map(item => <div key={item.value} onClick={() => onChange?.(item.value)} className={`${style.marketingGoal_col} ${value === item.value ? style.marketingGoal_active : ''}`}>
  13. {value === item.value ? <>
  14. <img src={item.iconSelected} />
  15. <div><CheckCircleFilled /></div>
  16. </> : <img src={item.icon} />}
  17. <span>{item.label}</span>
  18. </div>)}
  19. </div>
  20. </div>
  21. }
  22. export default React.memo(MarketingGoal)