diff --git a/client/src/app.less b/client/src/app.less index a341e02..bdcd0a9 100644 --- a/client/src/app.less +++ b/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; diff --git a/client/src/sections/wuyuanbiaoba/components/TemplateList.jsx b/client/src/sections/wuyuanbiaoba/components/TemplateList.jsx index 6f2e6ab..7693b21 100644 --- a/client/src/sections/wuyuanbiaoba/components/TemplateList.jsx +++ b/client/src/sections/wuyuanbiaoba/components/TemplateList.jsx @@ -74,19 +74,29 @@ const TemplateList = ({ ]; return ( -
- +
+
+
+ {tempListData.length < 3 && (