Former-commit-id: ce54da6a3adb33c4f5670059c1a0e2cb923d9a00 [formerly ce54da6a3adb33c4f5670059c1a0e2cb923d9a00 [formerly ce54da6a3adb33c4f5670059c1a0e2cb923d9a00 [formerly ce54da6a3adb33c4f5670059c1a0e2cb923d9a00 [formerly 3c44916360da76b49d117befe0f81a641f6315fa [formerly 592148a1be6334389df735529f273d2b937d0427]]]]] Former-commit-id: 22ed44ade276867f0c6e32b537e1227420cf6912 Former-commit-id: 9d8372d8997449efe2b9f74538738f20dd3dfe1b Former-commit-id: 02b17360c6232b1d58f174341d66e59b2d533815 [formerly 70a2be5169086d45ffa196c37019d4c012bc9ba7] Former-commit-id: aaa99cb71780eb2620fb27ff23687d7717766b7a Former-commit-id: 696d6f3c55166babfc3fb7c96b461f94540e7ddd Former-commit-id: bc0a27c60ed1ef06eeb23e163a6126677897636e Former-commit-id: 916f86bb74dc6d6fb85a80f5e755fb1b3b057352 Former-commit-id: 74007628b8fd0aa661e86df4293c72431e5478a8
69 lines
1.4 KiB
JavaScript
69 lines
1.4 KiB
JavaScript
export default `<template>
|
|
<div>
|
|
<d2-crud
|
|
:columns="columns"
|
|
:data="data"/>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data () {
|
|
return {
|
|
columns: [
|
|
{
|
|
title: '日期',
|
|
key: 'date'
|
|
},
|
|
{
|
|
title: '姓名',
|
|
key: 'name'
|
|
},
|
|
{
|
|
title: '地址',
|
|
key: 'address'
|
|
},
|
|
{
|
|
title: '标签',
|
|
key: 'tag',
|
|
filters: [
|
|
{ text: '家', value: '家' },
|
|
{ text: '公司', value: '公司' }
|
|
],
|
|
filterMethod (value, row) {
|
|
return row.tag === value
|
|
},
|
|
filterPlacement: 'bottom-end'
|
|
}
|
|
],
|
|
data: [
|
|
{
|
|
date: '2016-05-02',
|
|
name: '王小虎',
|
|
address: '上海市普陀区金沙江路 1518 弄',
|
|
tag: '家'
|
|
},
|
|
{
|
|
date: '2016-05-04',
|
|
name: '王小虎',
|
|
address: '上海市普陀区金沙江路 1517 弄',
|
|
tag: '公司'
|
|
},
|
|
{
|
|
date: '2016-05-01',
|
|
name: '王小虎',
|
|
address: '上海市普陀区金沙江路 1519 弄',
|
|
tag: '家'
|
|
},
|
|
{
|
|
date: '2016-05-03',
|
|
name: '王小虎',
|
|
address: '上海市普陀区金沙江路 1516 弄',
|
|
tag: '公司'
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
</script>`
|