no message

Former-commit-id: 5f223b53b51a8d9f894f37a9612c342f19889615
Former-commit-id: 5df5738648a32e0b3392791acec6de00aa16e191
Former-commit-id: 4463c63b487ea246ed4e86156c37c9ca0fd30ce1
This commit is contained in:
liyang
2018-06-05 16:43:16 +08:00
parent b5493ec1c2
commit 2bfcbfca14
11 changed files with 15 additions and 17 deletions

View File

@@ -1,46 +0,0 @@
<template>
<Container type="ghost">
<el-card>
<div slot="header">
<el-button @click="ajax">发送请求</el-button>
</div>
<el-table v-bind="table" style="width: 100%" class="dd-mb">
<el-table-column
v-for="(item, index) in table.columns"
:key="index"
:prop="item.prop"
:label="item.label">
</el-table-column>
</el-table>
<Markdown url="/static/md/插件 - mock拦截ajax.md"></Markdown>
</el-card>
</Container>
</template>
<script>
export default {
data () {
return {
table: {
columns: [],
data: [],
size: 'mini',
stripe: true,
border: true
}
}
},
methods: {
ajax () {
this.$axios.get('/api/ajax-demo')
.then(res => {
this.table.columns = Object.keys(res.list[0]).map(e => ({
label: e,
prop: e
}))
this.table.data = res.list
})
}
}
}
</script>