Files
mes-ui-d2/src/pages/demo/d2-crud/demo24/index.vue
孙昊翔 0971c234f3 更新文档和预览地址
Former-commit-id: 8accc56d033ea04f8b83687573a0380bdc6d7a86 [formerly 65d8940b3050fa4b8d992022d9296dddede1e210] [formerly 8accc56d033ea04f8b83687573a0380bdc6d7a86 [formerly 65d8940b3050fa4b8d992022d9296dddede1e210] [formerly 8accc56d033ea04f8b83687573a0380bdc6d7a86 [formerly 65d8940b3050fa4b8d992022d9296dddede1e210] [formerly 65d8940b3050fa4b8d992022d9296dddede1e210 [formerly f98f85e9eb450eb22b74cdfc0b44458798d9d438 [formerly 2300ecdf85d8b6fa37d66fc1f12d446950ad3d65]]]]]
Former-commit-id: 7cf6c423338385063c8e5b5914a7ddbad5c76d48
Former-commit-id: 0cc6a694894413bfc50539fb4c25f07caeb255fc
Former-commit-id: cc815d04c6b220fa1e85d6f73b9e86cb72e9a42f [formerly ef139066527a850da9caa028d8dba87aaf9dea55]
Former-commit-id: 2406236172076ea39d706c3c15f05e340bb491e4
Former-commit-id: 0b2680b64b8dd5f105a7e557da935983836ecd5c
Former-commit-id: 427bf1fc262730885f6367a43ac02cf305a76d57
Former-commit-id: 387588ebbd58f8605143ccf26928e797056ef480
Former-commit-id: 2539e02b81df9f4997deab40efef1aff7581ff04
2018-09-03 10:50:22 +08:00

77 lines
1.7 KiB
Vue

<template>
<d2-container>
<template slot="header">表格slot</template>
<d2-crud
ref="d2Crud"
:columns="columns"
:data="data">
<el-button slot="headerButton">自定义按钮1</el-button>
<el-button slot="headerButton" type="primary" round>自定义按钮2</el-button>
</d2-crud>
<el-card shadow="never" class="d2-mb">
<d2-markdown :source="doc"/>
</el-card>
<el-card shadow="never" class="d2-mb">
<d2-highlight :code="code"/>
</el-card>
<template slot="footer">
<d2-link-btn title="文档" link="https://d2-projects.github.io/d2-admin-doc/zh/ecosystem-d2-crud/"/>
</template>
</d2-container>
</template>
<script>
import doc from './doc.md'
import code from './code.js'
export default {
data () {
return {
doc,
code,
columns: [
{
title: '日期',
key: 'date',
width: '180'
},
{
title: '姓名',
key: 'name',
width: '180'
},
{
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 弄'
}
]
}
},
mounted () {
console.log(this.$refs.d2Crud.d2Data)
}
}
</script>