单表示例,加入字段排序和默认排序例子
parent
5b806bc70d
commit
91bb10a861
|
@ -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' ? '男' : '女') : '';
|
||||
|
|
|
@ -119,6 +119,11 @@
|
|||
style: { textAlign: 'left' },
|
||||
},
|
||||
},
|
||||
//自定义默认排序
|
||||
defSort: {
|
||||
column: 'sex,salaryMoney',
|
||||
order: 'desc',
|
||||
},
|
||||
striped: true,
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
|
|
Loading…
Reference in New Issue