单表示例,加入字段排序和默认排序例子

pull/170/head^2
zhangdaiscott 2022-10-10 11:23:54 +08:00
parent 5b806bc70d
commit 91bb10a861
2 changed files with 8 additions and 0 deletions

View File

@ -8,6 +8,7 @@ export const columns: BasicColumn[] = [
dataIndex: 'name',
width: 70,
align: 'left',
sorter: true
},
{
title: '关键词',
@ -23,6 +24,7 @@ export const columns: BasicColumn[] = [
title: '工资',
dataIndex: 'salaryMoney',
width: 40,
sorter: true
},
{
title: '奖金',
@ -32,6 +34,7 @@ export const columns: BasicColumn[] = [
{
title: '性别',
dataIndex: 'sex',
sorter: true,
customRender: ({ record }) => {
return render.renderDict(record.sex, 'sex');
// let v = record.sex ? (record.sex == '1' ? '男' : '女') : '';

View File

@ -119,6 +119,11 @@
style: { textAlign: 'left' },
},
},
//
defSort: {
column: 'sex,salaryMoney',
order: 'desc',
},
striped: true,
useSearchForm: true,
showTableSetting: true,