12345678910111213141516171819202122232425262728293031323334353637
  1. import React, { useState } from 'react';
  2. import { Radio, Card } from 'antd';
  3. import Basic from './Basic';
  4. // import Poster from './Poster';
  5. import Share from '@/components/Share';
  6. import Poster from '@/components/Poster'
  7. const type= 'house'
  8. /**
  9. *
  10. *
  11. * @param {*} props
  12. * @returns
  13. */
  14. const Edit = props => {
  15. const [tab, changeTab] = useState('basic');
  16. const { dynamicId } = props.location.query;
  17. const target = { id:dynamicId, type: 'activity' }
  18. return (
  19. <Card>
  20. <div>
  21. <Radio.Group value={tab} buttonStyle="solid" onChange={e => changeTab(e.target.value)}>
  22. <Radio.Button value="basic">基本信息</Radio.Button>
  23. <Radio.Button value="poster">海报图片</Radio.Button>
  24. <Radio.Button value="share">分享设置</Radio.Button>
  25. </Radio.Group>
  26. </div>
  27. <div>
  28. {tab === 'basic' && <Basic dynamicId={dynamicId} type={type}/>}
  29. {tab === 'poster' && <Poster target={target} />}
  30. {tab === 'share' && <Share target={target} />}
  31. </div>
  32. </Card>
  33. );
  34. };
  35. export default Edit;