|
@@ -2,7 +2,7 @@
|
|
|
/* eslint-disable no-param-reassign */
|
|
/* eslint-disable no-param-reassign */
|
|
|
import PermSelect from '@/pages/Customer/Company/components/PermSelect'
|
|
import PermSelect from '@/pages/Customer/Company/components/PermSelect'
|
|
|
import { TABLE_COLUMNS_MAP, ColumnStateEnum } from '@/utils/cache/cacheEnum'
|
|
import { TABLE_COLUMNS_MAP, ColumnStateEnum } from '@/utils/cache/cacheEnum'
|
|
|
-import { isBoolean, isNullOrUnDef } from '@/utils/is'
|
|
|
|
|
|
|
+import { isBoolean, isDef, isMobile, isNullOrUnDef, isObject } from '@/utils/is'
|
|
|
import type { ColumnsState } from '@ant-design/pro-table'
|
|
import type { ColumnsState } from '@ant-design/pro-table'
|
|
|
import ProTable from '@ant-design/pro-table'
|
|
import ProTable from '@ant-design/pro-table'
|
|
|
import { useModel } from 'umi'
|
|
import { useModel } from 'umi'
|
|
@@ -135,6 +135,15 @@ const BasicTable: {
|
|
|
resetProps.headerTitle = headerTitle
|
|
resetProps.headerTitle = headerTitle
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 判断是否是手机
|
|
|
|
|
+ if (isMobile()) {
|
|
|
|
|
+ if (isDef(resetProps.pagination)) {
|
|
|
|
|
+ resetProps.pagination = { simple: true }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (isObject(resetProps.pagination)) {
|
|
|
|
|
+ resetProps.pagination = { ...resetProps.pagination, size: 'small' }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
const handleOnColumnsChange = (map: Record<string, ColumnsState>) => {
|
|
const handleOnColumnsChange = (map: Record<string, ColumnsState>) => {
|
|
|
setState({ ...state, columnsStateMap: map })
|
|
setState({ ...state, columnsStateMap: map })
|
|
|
const authColumnsStateMap = getAuthCache(TABLE_COLUMNS_MAP)
|
|
const authColumnsStateMap = getAuthCache(TABLE_COLUMNS_MAP)
|