outaozhen пре 5 година
родитељ
комит
f6f6ca922b

+ 8 - 2
src/components/PopContent/Contacts/index.jsx

@@ -5,10 +5,16 @@ import ContanctForm from '@/components/PopContent/Contacts/ContanctForm.jsx'
 import ContanctTabList from '@/components/PopContent/Contacts/ContanctTabList.jsx'
 import ContanctLowerList from '@/components/PopContent/Contacts/ContanctLowerList.jsx'
 import { apiContactDetail } from '@/services/contact'
+import useAutoTable from '@/hooks/useAutoTable'
 import consts from '@/consts'
 
 const Popcontent = props => {
-  const { visible, onClose, id = '' } = props
+  const { visible, onClose,collapsed, id = '' } = props
+  const needSubtractHeight = 48 + 48 + 48 + 64 + 24 // 需要被裁掉的高度
+  // const needSubtractWidth = (collapsed ? 208 : 48) + 48 + 48 + 48 // 需要被裁掉的高度
+  const [y] = useAutoTable(collapsed, needSubtractHeight)
+  console.log(y)
+
 
   // 浏览器实际宽度
   const [clientWidth, setClientWidth] = useState(document.body.clientWidth * 0.75)
@@ -39,7 +45,7 @@ const Popcontent = props => {
   }, [visible])
   return (
     <div>
-      <div className="sheet-box">
+      <div className='sheet-box'>
         <Drawer
           title="联系人"
           placement="right"

+ 3 - 0
src/components/PopContent/index.scss

@@ -1,4 +1,7 @@
 // 弹窗左右结构
+.sheet-box {
+  overflow: hidden;
+}
 .sheet-left-panel {
   height: 834px;
   overflow-x: hidden;

+ 1 - 1
src/pages/Customer/Contact/index.jsx

@@ -345,6 +345,6 @@ export default connect(({ district, global, loading }) => ({
   // data: contact.data,
   // total: contact.total,
   districtName: district,
-  collapsed: global.collapsed,
+  // collapsed: global.collapsed,
   getlist: loading.effects['contact/fetch']
 }))(Contact)