瀏覽代碼

fix: 单位详情弹窗客户表格数据量大滚动加载

outaozhen 4 年之前
父節點
當前提交
63767dfce6
共有 1 個文件被更改,包括 22 次插入4 次删除
  1. 22 4
      src/pages/Customer/Company/components/CompanyDetail/TabList.jsx

+ 22 - 4
src/pages/Customer/Company/components/CompanyDetail/TabList.jsx

@@ -121,6 +121,9 @@ const CompanyTabList = ({
       title: '优先级',
       dataIndex: 'priority',
       width: '15%',
+      headerCellStyle: {
+        backgroundColor: 'var(--color-bg-2)'
+      },
       sorter: (a, b) => a.priority - b.priority,
       render: (text, record) => (
         <Dropdown
@@ -143,7 +146,10 @@ const CompanyTabList = ({
       title: '所有部门',
       dataIndex: 'department',
       onFilter: true,
-      width: '20%',
+      width: '18%',
+      headerCellStyle: {
+        backgroundColor: 'var(--color-bg-2)'
+      },
       filters: Array.from(
         new Set(client.client?.map(item => item.department)).map(item => ({
           text: item,
@@ -155,6 +161,9 @@ const CompanyTabList = ({
       title: '姓名',
       dataIndex: 'clientName',
       width: '15%',
+      headerCellStyle: {
+        backgroundColor: 'var(--color-bg-2)'
+      },
       render: (clientName, record) => (
         <div className="text-primary hover:text-[#967bbd] line-clamp-1">
           <span onClick={() => showDrawer(record.id)} className="cursor-pointer ">
@@ -167,18 +176,27 @@ const CompanyTabList = ({
       title: '昵称',
       dataIndex: 'niceName',
       width: '15%',
+      headerCellStyle: {
+        backgroundColor: 'var(--color-bg-2)'
+      },
       ellipsis: true
     },
     {
       title: '手机',
       dataIndex: 'telephone',
       // width: '20%',
+      headerCellStyle: {
+        backgroundColor: 'var(--color-bg-2)'
+      },
       ellipsis: true
     },
     {
       title: 'QQ',
       dataIndex: 'qq',
       // width: '20%',
+      headerCellStyle: {
+        backgroundColor: 'var(--color-bg-2)'
+      },
       ellipsis: true
     }
   ]
@@ -351,11 +369,11 @@ const CompanyTabList = ({
       <div className="pl-15px">
         <Tabs>
           <TabPane tab={<span>客户{renderBadge(client.total, true)}</span>} key="1">
-            <div className={['sheet-right-panel', styles.tableCont].join('')} ref={tRef}>
+            <div className={['sheet-right-panel', styles.tableCont].join(' ')} ref={tRef}>
               <Table
                 virtualized
-                scroll={{ y: 500 }}
-                border
+                scroll={{ y: clientHeight }}
+                border={false}
                 columns={columns}
                 data={client.client}
                 pagination={false}