liujiangyong 1 week ago
parent
commit
ba215f6b4c
  1. 8
      client/src/app.less
  2. 30
      client/src/sections/wuyuanbiaoba/components/TemplateList.jsx

8
client/src/app.less

@ -24,11 +24,17 @@
min-height: 0;
}
.target-tabs .ant-tabs-tabpane {
.target-tabs .ant-tabs-tabpane:not(.ant-tabs-tabpane-hidden) {
display: flex;
flex-direction: column;
}
// Keep Ant Design's inactive tab panes hidden. The active-pane flex rule above
// must not override this class, otherwise both list panes render vertically.
.target-tabs .ant-tabs-tabpane.ant-tabs-tabpane-hidden {
display: none;
}
// 美化滚动条
::-webkit-scrollbar {
width: 8px;

30
client/src/sections/wuyuanbiaoba/components/TemplateList.jsx

@ -74,19 +74,29 @@ const TemplateList = ({
];
return (
<div style={{ flex: 1, overflow: "auto", padding: "0 16px" }}>
<Table
dataSource={tempListData}
columns={tempColumns}
pagination={false}
size="small"
style={{ height: "100%" }}
showHeader={false}
/>
<div
style={{
flex: 1,
minHeight: 0,
display: "flex",
flexDirection: "column",
padding: "0 16px",
overflow: "hidden",
}}
>
<div style={{ flex: 1, minHeight: 0, overflowY: "auto" }}>
<Table
dataSource={tempListData}
columns={tempColumns}
pagination={false}
size="small"
showHeader={false}
/>
</div>
{tempListData.length < 3 && (
<Button
type="primary"
style={{ marginTop: "16px", width: "100%" }}
style={{ margin: "16px 0", width: "100%", flexShrink: 0 }}
onClick={onAddTemplate}
>
添加新模板

Loading…
Cancel
Save