Browse Source

注册页面,控制只在待选择区域出现滚动条,不包括筛选区域

dengdx 2 months ago
parent
commit
3cabb0110b

+ 4 - 15
src/pages/patient/components/register.available.list.tsx

@@ -1,5 +1,5 @@
 import React, { useState } from 'react';
-import { Card } from 'antd';
+import { Flex } from 'antd';
 import ProtocolSelectionList from './register.protocol.list';
 import RegisterViewList from './register.available.view.list';
 import RegisterAvailableFilterBar from './RegisterAvailableFilterBar';
@@ -15,15 +15,7 @@ const RegisterAvailableList: React.FC = () => {
   const [enabled, setEnabled] = useState<string | undefined>(undefined);
 
   return (
-    <Card
-      style={{ height: '100%', display: 'flex', flexDirection: 'column' }}
-      bodyStyle={{
-        flex: 1,
-        display: 'flex',
-        flexDirection: 'column',
-        padding: 0,
-      }}
-    >
+    <Flex vertical className="h-full">
       {/* 过滤区域 */}
       <RegisterAvailableFilterBar
         selected={selected}
@@ -35,17 +27,14 @@ const RegisterAvailableList: React.FC = () => {
         setEnabled={setEnabled}
       />
       {/* 列表区域 */}
-      <div
-        style={{ flex: 1, overflow: 'auto', padding: 16 }}
-        className="border border-red-300 h-full overflow-auto"
-      >
+      <div className="border border-red-300 overflow-auto h-full">
         {selected.selected === 'protocol' ? (
           <ProtocolSelectionList />
         ) : (
           <RegisterViewList />
         )}
       </div>
-    </Card>
+    </Flex>
   );
 };
 

+ 1 - 1
src/pages/patient/components/register.protocol.list.tsx

@@ -29,7 +29,7 @@ const ProtocolSelectionList: React.FC = () => {
   );
 
   return (
-    <Row>
+    <Row className="h-full overflow-auto flex-1">
       {protocols.map((item) => (
         <ProcedureCard
           key={item.procedure_id}