20 lines
939 B
JavaScript
20 lines
939 B
JavaScript
import React from "react";
|
||
import { Switch, Tag } from 'antd';
|
||
import Styles from './web.module.less';
|
||
export default function wechatPublic(props) {
|
||
const { passport, t, changeEnabled, } = props;
|
||
const { id, type, enabled, stateColor } = passport;
|
||
return (<div className={Styles.item}>
|
||
<div className={Styles.title}>
|
||
<Tag color={stateColor}>{t(`passport:v.type.${type}`)}</Tag>
|
||
{/* <Tooltip title={(publicAppIds && publicAppIds.length > 0) ? '' : '如需启用公众号登录,请先前往应用管理,创建是服务号的公众号application,并完成基础配置'}> */}
|
||
<Switch
|
||
// disabled={!(publicAppIds && publicAppIds.length > 0)}
|
||
checkedChildren="开启" unCheckedChildren="关闭" checked={enabled} onChange={(checked) => {
|
||
changeEnabled(checked);
|
||
}}/>
|
||
{/* </Tooltip> */}
|
||
</div>
|
||
</div>);
|
||
}
|