合并代码
This commit is contained in:
@ -4,15 +4,18 @@ import { useIntl } from 'umi';
|
||||
import BaseInfoTab from './component/BaseInfoTab';
|
||||
import QualificationTab from './component/QualificationTab';
|
||||
import InvoiceTab from './component/InvoiceTab';
|
||||
import OtherAttachmentsTab from './component/OtherAttachmentsTab';
|
||||
import AttachmentsTab from './component/AttachmentsTab';
|
||||
import ContactsInfoTab from './component/ContactsInfoTab';
|
||||
import BankInfoTab from './component/BankInfoTab';
|
||||
|
||||
|
||||
interface CompanyInfoProps {
|
||||
viewType?: boolean;
|
||||
}
|
||||
|
||||
const { TabPane } = Tabs;
|
||||
|
||||
const CompanyInfo: React.FC = () => {
|
||||
const CompanyInfo: React.FC<CompanyInfoProps> = (props) => {
|
||||
const { viewType = false } = props;
|
||||
const intl = useIntl();
|
||||
// 切换tab
|
||||
const [subTab, setSubTab] = useState<string>('base');
|
||||
@ -20,19 +23,19 @@ const CompanyInfo: React.FC = () => {
|
||||
return (
|
||||
<Tabs activeKey={subTab} onChange={setSubTab}>
|
||||
<TabPane tab={intl.formatMessage({ id: 'page.workbench.base' })} key="base">
|
||||
<BaseInfoTab />
|
||||
<BaseInfoTab viewType={viewType} />
|
||||
</TabPane>
|
||||
<TabPane tab={intl.formatMessage({ id: 'page.workbench.qualification' })} key="qualification">
|
||||
<QualificationTab />
|
||||
<QualificationTab viewType={viewType} />
|
||||
</TabPane>
|
||||
<TabPane tab={intl.formatMessage({ id: 'page.workbench.invoice' })} key="invoice">
|
||||
<InvoiceTab />
|
||||
<InvoiceTab viewType={viewType} />
|
||||
</TabPane>
|
||||
<TabPane tab={intl.formatMessage({ id: 'page.workbench.bank' })} key="bank">
|
||||
<BankInfoTab />
|
||||
<BankInfoTab viewType={viewType} />
|
||||
</TabPane>
|
||||
<TabPane tab={intl.formatMessage({ id: 'page.workbench.attachments' })} key="attachments">
|
||||
<OtherAttachmentsTab />
|
||||
<AttachmentsTab viewType={viewType} />
|
||||
</TabPane>
|
||||
<TabPane tab={intl.formatMessage({ id: 'page.workbench.contacts' })} key="contacts">
|
||||
<ContactsInfoTab />
|
||||
|
Reference in New Issue
Block a user