|
@@ -5,10 +5,12 @@ import { Button, Card, Tag } from 'antd'
|
|
|
import { connect } from 'dva'
|
|
import { connect } from 'dva'
|
|
|
import React, { useEffect, useState } from 'react'
|
|
import React, { useEffect, useState } from 'react'
|
|
|
import SvgIcon from '@/components/SvgIcon'
|
|
import SvgIcon from '@/components/SvgIcon'
|
|
|
|
|
+import useAutoTable from '@/hooks/useAutoTable'
|
|
|
|
|
|
|
|
const Contact = props => {
|
|
const Contact = props => {
|
|
|
|
|
+ const [x, y] = useAutoTable()
|
|
|
// let tag = Array.from(tag);
|
|
// let tag = Array.from(tag);
|
|
|
- const [ visible, setVisible ] = useState(false)
|
|
|
|
|
|
|
+ const [visible, setVisible] = useState(false)
|
|
|
|
|
|
|
|
// 展示drawer
|
|
// 展示drawer
|
|
|
const showDrawer = () => {
|
|
const showDrawer = () => {
|
|
@@ -230,11 +232,11 @@ const Contact = props => {
|
|
|
const {
|
|
const {
|
|
|
contactName: { list }
|
|
contactName: { list }
|
|
|
} = props // 将contact中的pros.list命名为list
|
|
} = props // 将contact中的pros.list命名为list
|
|
|
- const contanctlist = [ ...list ]
|
|
|
|
|
|
|
+ const contanctlist = [...list]
|
|
|
// console.log(props);
|
|
// console.log(props);
|
|
|
// console.log(list)
|
|
// console.log(list)
|
|
|
// console.log(dataSource);
|
|
// console.log(dataSource);
|
|
|
- const [ columnsStateMap, setColumnsStateMap ] = useState({
|
|
|
|
|
|
|
+ const [columnsStateMap, setColumnsStateMap] = useState({
|
|
|
telephone: {
|
|
telephone: {
|
|
|
show: false
|
|
show: false
|
|
|
},
|
|
},
|
|
@@ -284,13 +286,14 @@ const Contact = props => {
|
|
|
options={{
|
|
options={{
|
|
|
search: true
|
|
search: true
|
|
|
}}
|
|
}}
|
|
|
- scroll={{ x: 1500, y: 200 }}
|
|
|
|
|
|
|
+ scroll={{ x, y }}
|
|
|
columnsStateMap={columnsStateMap}
|
|
columnsStateMap={columnsStateMap}
|
|
|
onColumnsStateChange={map => setColumnsStateMap(map)}
|
|
onColumnsStateChange={map => setColumnsStateMap(map)}
|
|
|
headerTitle="联系人"
|
|
headerTitle="联系人"
|
|
|
toolBarRender={() => [
|
|
toolBarRender={() => [
|
|
|
<Button key="button" type="primary">
|
|
<Button key="button" type="primary">
|
|
|
- <SvgIcon type="icon-plus" />联系人
|
|
|
|
|
|
|
+ <SvgIcon type="icon-plus" />
|
|
|
|
|
+ 联系人
|
|
|
</Button>
|
|
</Button>
|
|
|
]}
|
|
]}
|
|
|
/>
|
|
/>
|