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; min-height: 0;
} }
.target-tabs .ant-tabs-tabpane { .target-tabs .ant-tabs-tabpane:not(.ant-tabs-tabpane-hidden) {
display: flex; display: flex;
flex-direction: column; 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 { ::-webkit-scrollbar {
width: 8px; width: 8px;

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

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

Loading…
Cancel
Save