泛微薪资核算iframe表格

custom-新弘农业/V2-薪资核算表格添加序号列
黎永顺 2 years ago
parent 5fddf15870
commit c289b0eb11

@ -1,7 +1,7 @@
import React, { FC, useEffect, useState } from "react"; import React, { FC, useEffect, useState } from "react";
import { exceptStr, paginationFun } from "@/utils/common"; import { exceptStr, paginationFun } from "@/utils/common";
import { defaultPage, ILoading, IPage } from "@/common/types/page"; import { defaultPage, ILoading, IPage } from "@/common/types/page";
import { message, Spin, Table, Typography } from "antd"; import { Button, message, Spin, Table, Typography } from "antd";
import { LockOutlined, UnlockOutlined } from "@ant-design/icons"; import { LockOutlined, UnlockOutlined } from "@ant-design/icons";
import API from "@/api"; import API from "@/api";
import styles from "./index.less"; import styles from "./index.less";
@ -86,7 +86,7 @@ const AntdTable: FC<ITableProps> = (props) => {
title: "操作", title: "操作",
render: (text: string, record: any) => { render: (text: string, record: any) => {
return ( return (
<a <Button type="link" style={{ padding: "0" }}
onClick={() => { onClick={() => {
window.parent.postMessage( window.parent.postMessage(
{ {
@ -98,7 +98,7 @@ const AntdTable: FC<ITableProps> = (props) => {
}} }}
> >
</a> </Button>
); );
} }
}]; }];
@ -278,7 +278,7 @@ const AntdTable: FC<ITableProps> = (props) => {
width: "100px", width: "100px",
fixed: "right", fixed: "right",
render: (text: string, record: any) => { render: (text: string, record: any) => {
return <a onClick={() => { return <Button type="link" style={{ padding: "0" }} onClick={() => {
window.parent.postMessage( window.parent.postMessage(
{ {
type: "PR", type: "PR",
@ -286,7 +286,7 @@ const AntdTable: FC<ITableProps> = (props) => {
}, },
"*" "*"
); );
}}></a>; }}></Button>;
} }
}); });
return tmpColumns; return tmpColumns;

@ -78,8 +78,17 @@
} }
:global { :global {
.ant-btn-link { .ant-btn-link, .ant-dropdown-trigger {
font-size: 12px; font-size: 12px;
color: #333;
}
.ant-btn-link:hover {
color: #00a9ff;
span {
text-decoration: underline;
}
} }
.ant-table-tbody > tr.ant-table-row:hover > td { .ant-table-tbody > tr.ant-table-row:hover > td {
@ -156,6 +165,19 @@
.moreIconWrapper { .moreIconWrapper {
:global { :global {
.ant-btn-link {
font-size: 12px;
color: #333;
}
.ant-btn-link:hover {
color: #00a9ff;
span {
text-decoration: underline;
}
}
.ant-popover-inner { .ant-popover-inner {
min-width: 106px min-width: 106px
} }

@ -70,6 +70,7 @@ const payrollFilesTable: FC = (props) => {
</Button> </Button>
<Dropdown <Dropdown
overlayClassName={styles.moreIconWrapper}
overlay={ overlay={
<Menu> <Menu>
<Menu.Item key="payroll"> <Menu.Item key="payroll">
@ -113,6 +114,7 @@ const payrollFilesTable: FC = (props) => {
</Button> </Button>
<Dropdown <Dropdown
overlayClassName={styles.moreIconWrapper}
overlay={ overlay={
<Menu> <Menu>
<Menu.Item key="payroll"> <Menu.Item key="payroll">

Loading…
Cancel
Save