update Table

update Table
This commit is contained in:
梁灏 2016-11-29 11:04:48 +08:00
parent 7f1edb6a15
commit adaeca88ba
4 changed files with 65 additions and 16 deletions

View file

@ -63,6 +63,7 @@
value: 'company'
}
],
filterMultiple: false
},
{
title: '标签',
@ -78,8 +79,11 @@
value: 'company'
}
],
filterMethod (value, row) {
return row.tag === value;
},
render (row) {
const type = `${row.tag}` === '家' ? 'green' : 'red';
const type = `${row.tag}` === 'home' ? 'green' : 'red';
return `<tag color="${type}">${row.tag}</tag>`;
}
},
@ -135,28 +139,28 @@
age: 25,
address: '北京市朝阳区',
edit: false,
tag: ''
tag: 'home'
},
{
name: '段模',
age: 21,
address: '北京市海淀区',
edit: false,
tag: '公司'
tag: 'company'
},
{
name: '刘天娇',
age: 27,
address: '北京市东城区',
edit: false,
tag: '公司'
tag: 'company'
},
{
name: '胡国伟',
age: 22,
address: '北京市西城区',
edit: false,
tag: ''
tag: 'home'
}
],
height: 200