d2-crud doc 基本表格
Former-commit-id: acf80443284f668a8f9fa3fdbcbb32161168cd6e [formerly acf80443284f668a8f9fa3fdbcbb32161168cd6e [formerly acf80443284f668a8f9fa3fdbcbb32161168cd6e [formerly acf80443284f668a8f9fa3fdbcbb32161168cd6e [formerly 6c6dda19796960d898f505804108986aa7114185 [formerly 608b16426fa9dfd7d39068c35d060164b2f27baf]]]]] Former-commit-id: 3da8dc3d3681adb92d6bd21b0e982f40bfdb17a0 Former-commit-id: 996adfebb0359eaf4f286a4cb03ee855347dd0d4 Former-commit-id: 7404f9647294dd8fa7c1efbda0d7fc8ab7bf5cae [formerly e98e5d3ddeaf2216c9b4e3e8bf83f7a31bedf25a] Former-commit-id: b592545fe6a45c6a79eed8badf612275e54cdc31 Former-commit-id: 285a183c0bed15c2fae96247f19e9e3ec854b037 Former-commit-id: 496e9e1362e1c407c0593826ca604c35f74866ba Former-commit-id: b3225c89b32a7a44fcbc29c0c43c7cc82c0286bd Former-commit-id: 9514dc2c0ea2ffda7bd324e05e71a1c54516d200
This commit is contained in:
@@ -4,6 +4,6 @@ export default {
|
|||||||
icon: 'table',
|
icon: 'table',
|
||||||
children: (pre => [
|
children: (pre => [
|
||||||
{ path: `${pre}index`, title: 'D2 CRUD 首页', icon: 'home' },
|
{ path: `${pre}index`, title: 'D2 CRUD 首页', icon: 'home' },
|
||||||
{ path: `${pre}demo1`, title: '示例1' }
|
{ path: `${pre}demo1`, title: '基本表格' }
|
||||||
])('/demo/d2-crud/')
|
])('/demo/d2-crud/')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,58 @@
|
|||||||
<template>
|
<template>
|
||||||
<d2-container>
|
<d2-container>
|
||||||
<template slot="header">header</template>
|
<template slot="header">基本表格</template>
|
||||||
main
|
<d2-crud
|
||||||
|
:columns="columns"
|
||||||
|
:data="data"
|
||||||
|
>
|
||||||
|
</d2-crud>
|
||||||
<template slot="footer">
|
<template slot="footer">
|
||||||
<d2-link-btn title="D2 CRUD" link="https://github.com/d2-projects"/>
|
<d2-link-btn title="D2 CRUD" link="https://github.com/d2-projects/d2-crud"/>
|
||||||
</template>
|
</template>
|
||||||
</d2-container>
|
</d2-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '日期',
|
||||||
|
key: 'date'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '姓名',
|
||||||
|
key: 'name'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '地址',
|
||||||
|
key: 'address'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
date: '2016-05-02',
|
||||||
|
name: '王小虎',
|
||||||
|
address: '上海市普陀区金沙江路 1518 弄'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-04',
|
||||||
|
name: '王小虎',
|
||||||
|
address: '上海市普陀区金沙江路 1517 弄'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-01',
|
||||||
|
name: '王小虎',
|
||||||
|
address: '上海市普陀区金沙江路 1519 弄'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-03',
|
||||||
|
name: '王小虎',
|
||||||
|
address: '上海市普陀区金沙江路 1516 弄'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
bd272213cf5328eff3aabfe6d4aea9c30c5833e3
|
6c0089557b3f47ce1383b439360cea062285b4b9
|
||||||
Reference in New Issue
Block a user