import React from 'react'; import { Tabs, Button, Alert, Affix, Space, Typography } from 'antd'; import Style from './web.module.less'; import Account from './account/index'; import Cos from './cos/index'; import Map from './map/index'; import Live from './live/index'; import Sms from './sms/index'; import Email from './email/index'; import Basic from './basic/index'; import Security from './security/index'; import Password from './password/index'; export default function Render(props) { const { entity, name, currentConfig, dirty } = props.data; const { resetConfig, updateConfig, setValue, setValues, removeItem, cleanKey, t } = props.methods; const { Account: account, Cos: cos, Map: map, Live: live, Sms: sms, App: app, Emails: emails, Security: security, Password: password, } = currentConfig || {}; return (<> 您正在更新 {entity} 对象 {name} 的配置,请谨慎操作 } type="info" showIcon action={ }/>
setValue(`Account.${path}`, value)} removeItem={(path, index) => removeItem(`Account.${path}`, index)}/>), }, { key: '云存储设置', label: '云存储设置', children: ( setValue(`Cos.${path}`, value)} removeItem={(path, index) => removeItem(`Cos.${path}`, index)}/>), }, { key: '直播设置', label: '直播设置', children: ( setValue(`Live.${path}`, value)}/>), }, { key: '地图设置', label: '地图设置', children: ( setValue(`Map.${path}`, value)} removeItem={(path, index) => removeItem(`Map.${path}`, index)} cleanKey={(path, key) => cleanKey(`Map${path ? `.${path}` : ''}`, key)}/>), }, { key: '短信设置', label: '短信设置', children: ( setValue(`Sms.${path}`, value)} removeItem={(path, index) => removeItem(`Sms.${path}`, index)} cleanKey={(path, key) => cleanKey(`Sms.${path}`, key)}/>), }, { key: '邮箱设置', label: '邮箱设置', children: ( setValue(`Emails.${path}`, value)} removeItem={(path, index) => removeItem(`Emails`, index)} cleanKey={(path, key) => cleanKey(`Emails.${path}`, key)}/>), }, { key: '基础设置', label: '基础设置', children: ( setValue(`App.${path}`, value)}/>), }, { key: '安全设置', label: '安全设置', children: ( setValue(`Security.${path}`, value)} setValues={(value) => { setValues({ Security: value }); }}/>), }, { key: '密码设置', label: '密码设置', children: ( setValue(`Password.${path}`, value)} setValues={(value) => { setValues({ Password: value }); }}/>), }, ]}>
); }