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
39
40
41
42
| import { ButtonEnum, ITableConfig } from "@/components/table";
|
| const tableConfig: ITableConfig = {
| buildInButtons: [
| {
| buttonKey: ButtonEnum.selectExcelExport,
| dataSource: "api/{{ModelClassName}}/SelectExportExcel",
| },
| {
| buttonKey: ButtonEnum.queryExcelExport,
| dataSource: "api/{{ModelClassName}}/QueryExportExcel",
| },
| ],
| columns: [
| {% for field in ModelFields %}
| {% if field.DbColumnName contains 'Image' or field.DbColumnName contains 'image' or field.DbColumnName contains 'thumbnail' or field.DbColumnName contains 'Thumbnail' %}
| {
| title: "{{field.ColumnDescription}}",
| key: "{{field.DbColumnName}}",
| dataIndex: "{{field.DbColumnName}}",
| slots: { customRender: "{{field.DbColumnName}}" },
| width: "5%",
| },{% else %}
| {
| title: "{{field.ColumnDescription}}",
| key: "{{field.DbColumnName}}",
| dataIndex: "{{field.DbColumnName}}",
| },
| {% endif %}
| {% endfor %}
| {
| title: "操作",
| dataIndex: "action",
| key: "action",
| align: "center",
| width: "18%",
| slots: { customRender: "action" },
| },
| ],
| };
|
| export default tableConfig;
|
|