import React, { useState } from 'react'; import { Tabs } from 'antd'; import ApplicationDetail from '../detail'; import ConfigUpsert from '../../config/application'; import StyleUpsert from '../../config/style/platform'; import TemplateList from '../../messageTypeTemplate/list'; import Styles from './web.pc.module.less'; import WechatMenu from '../../wechatMenu'; import UserWechatPublicTag from '../../userWechatPublicTag'; import WechatPublicTag from '../..//wechatPublicTag/list'; import WechatPublicAutoReply from '../../wechatPublicAutoReply'; export default function Render(props) { const { id, config, oakFullpath, name, style, type } = props.data; const { t, update } = props.methods; const [tabKey, setTabKey] = useState('detail'); const items = [ { label:
{t('detail')}
, key: 'detail', children: (), }, { label:
{t('config')}
, key: 'config', children: (), }, { label:
{t('style')}
, key: 'style', children: (), }, ]; if (type === 'wechatPublic') { items.push({ label:
{t('menu')}
, key: 'menu', children: (), }, { label:
{t('autoReply')}
, key: 'autoReply', children: (), }, { label:
{t('tag')}
, key: 'tag', children: (), }, { label:
{t('user')}
, key: 'user', children: (), }, { label:
{t('template')}
, key: 'template', children: (), }); } else if (type === 'wechatMp') { items.push({ label:
{t('template')}
, key: 'template', children: (), }); } if (id) { return ( { setTabKey(key); }} items={items} style={{ minHeight: 520 }}/>); } }