index.tsx
1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import React, { memo } from 'react';
import { Space } from 'antd';
import { QxSearchForm, QxTable, QxToolbar } from '@/src/components/view-render';
import { useRequest } from 'ahooks';
import { getData } from './services';
import data from './data.json';
import styles from './styles.less';
const prefixCls = 'app-view';
const AppView: React.FC<AppViewProps> = (props) => {
const { search, list, bar } = data;
const { data: tableData = {} as any, run, loading } = useRequest(getData);
const changeFullscreen = () => {};
return (
<div className={styles[prefixCls]}>
<Space direction="vertical" size={20}>
<QxSearchForm {...search} onSearch={() => run()} />
<QxToolbar
isFullscreen
changeFullscreen={changeFullscreen}
buttons={bar.buttons}
/>
<QxTable
loading={loading}
columns={list.columns}
dataSource={tableData.list}
/>
</Space>
</div>
);
};
interface AppViewProps {}
export default memo(AppView);