update Table

update Table
This commit is contained in:
梁灏 2016-11-29 08:43:47 +08:00
parent 642299b9b8
commit 99f80db0be
4 changed files with 66 additions and 12 deletions

View file

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