@fe-free/core 1.2.3 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,89 +0,0 @@
1
- ---
2
- group: 'core'
3
- toc: content
4
- ---
5
-
6
- # Table
7
-
8
- 对 ProTable 做扩展以满足实际使用情况
9
-
10
- - 默认搜索关闭,需要再打开 `search: true`
11
- - 有搜索的时候才显示搜索区域
12
-
13
- ## 场景
14
-
15
- ### 常规
16
-
17
- ```tsx
18
- import { Table } from '@fe-free/core';
19
- import { fakeData } from '../crud/demo/data';
20
-
21
- function fakeRequest() {
22
- return Promise.resolve({
23
- data: fakeData,
24
- success: true,
25
- total: fakeData.length,
26
- });
27
- }
28
-
29
- const Demo = () => {
30
- const columns = [
31
- {
32
- title: 'id',
33
- dataIndex: 'id',
34
- search: true,
35
- },
36
- {
37
- title: '名字(省略)',
38
- dataIndex: 'name',
39
- search: true,
40
- ellipsis: true,
41
- },
42
- {
43
- title: 'city',
44
- dataIndex: 'city',
45
- },
46
- {
47
- title: 'area',
48
- dataIndex: 'area',
49
- },
50
- ];
51
-
52
- return <Table rowKey="id" columns={columns} request={fakeRequest} />;
53
- };
54
-
55
- export default Demo;
56
- ```
57
-
58
- ### 没有搜索
59
-
60
- ```tsx
61
- import { Table } from '@fe-free/core';
62
-
63
- const Demo = () => {
64
- const columns = [
65
- {
66
- title: 'id',
67
- dataIndex: 'id',
68
- },
69
- {
70
- title: '名字(省略)',
71
- dataIndex: 'name',
72
-
73
- ellipsis: true,
74
- },
75
- {
76
- title: 'city',
77
- dataIndex: 'city',
78
- },
79
- {
80
- title: 'area',
81
- dataIndex: 'area',
82
- },
83
- ];
84
-
85
- return <Table columns={columns} rowKey="id" />;
86
- };
87
-
88
- export default Demo;
89
- ```