12345678910111213141516171819202122232425262728 |
- import React, { useState } from 'react'
- import { Card, Button, Tabs } from 'antd';
- import './index.less'
- import Ad from './ad';
- import Creative from './creative';
- import Targeting from './targeting';
- const { TabPane } = Tabs;
- const tabsConfig = [
- // { key: '1', tab: '计划模板',jsx:<Campaign/> },
- { key: '1', tab: '广告模板',jsx:<Ad/>},
- { key: '2', tab: '创意模板' ,jsx:<Creative/>},
- { key: '3', tab: '定向模板' ,jsx:<Targeting/>},
- ]
- function LocalAd() {
- const [activeKey, setActiveKey] = useState('1')
- return <Card>
- <Tabs activeKey={activeKey} type="card" onChange={(activeKey) => { setActiveKey(activeKey) }} >
- {
- tabsConfig?.map(item => {
- return <TabPane tab={item.tab} key={item.key} >
- {item.jsx}
- </TabPane>
- })
- }
- </Tabs>
- </Card>
- }
- export default LocalAd
|