oak-general-business/es/components/passport/wechatPublic/index.js

20 lines
939 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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>);
}