Commit 7a26031b authored by 李纪文's avatar 李纪文

fix: 组件优化

parent be355bb1
......@@ -50,8 +50,8 @@ const Demo = () => {
<BasicTable
dataSource={dataSource}
columns={columns}
bordered
pagination={{ current: 1, pageSize: 20, size: 'default' }}
bordered={false}
pagination={{ pageSize: 20, size: 'default' }}
/>
)}
{!dataSource.length && <Empty description={'暂无数据'} />}
......
......@@ -9,7 +9,6 @@ const BasicTable = (props) => {
const prefixCls = getPrefixCls('basic-table');
const pagination = typeof props.pagination !== 'undefined' ? props.pagination : {};
const showTotal = (total) => {
debugger;
return `共 ${Math.ceil(
total / (props.pagination ? props.pagination.pageSize || 10 : 10),
)} 页 / 共 ${total} 条记录`;
......
......@@ -125,11 +125,20 @@
border-left: 0;
}
.ant-table-header,
.ant-table-body {
.ant-table.ant-table-bordered .ant-table-header,
.ant-table.ant-table-bordered .ant-table-body {
border-left: 1px solid #dbe7fb;
}
.ant-table-body {
overflow-y: auto !important;
}
.ant-table-cell-scrollbar {
border-left: 0px;
box-shadow: none;
}
.ant-table-summary {
tr td {
position: sticky;
......
......@@ -105,6 +105,7 @@ const Demo = () => {
<h3>无 user, 无“保存修改”按钮</h3>
<PandaQuotaSelect
buttonProps={{}}
// defaultSelect={'all'}
deviceList={deviceList}
quotaListService={getQuotaList}
pointType={pointType}
......
......@@ -44,12 +44,13 @@ const QuotaSelect = ({
maximum,
user,
treeProps,
defaultSelect,
}) => {
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
const prefixCls = getPrefixCls('ec-quota-select');
const [visible, setVisible] = useState(false);
const [targetValue, setTargetValue] = useState('emphasis');
const [targetValue, setTargetValue] = useState(defaultSelect);
const [allQuotaList, setAllQuotaList] = useState([]);
const [quotaList, setQuotaList] = useState([]);
const [groupQuotaList, setGroupQuotaList] = useState([]);
......@@ -463,6 +464,7 @@ QuotaSelect.defaultProps = {
onModalCancel: () => {},
onModalOk: () => {},
onModalClose: () => {},
defaultSelect: 'emphasis',
};
QuotaSelect.propTypes = {
......@@ -485,6 +487,7 @@ QuotaSelect.propTypes = {
onModalCancel: PropTypes.func,
onModalOk: PropTypes.func,
onModalClose: PropTypes.func,
defaultSelect: PropTypes.string,
};
export default QuotaSelect;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment