Merge branch 'master' of github.com:d2-projects/d2-admin into feature/crud

Former-commit-id: 4333f18cd4accc207948ed7db8d1bae5bd35b91c [formerly 4333f18cd4accc207948ed7db8d1bae5bd35b91c [formerly 4333f18cd4accc207948ed7db8d1bae5bd35b91c [formerly 4333f18cd4accc207948ed7db8d1bae5bd35b91c [formerly bb4b79be576ee5160d735dcf56c146d496149e53 [formerly ada5fc1677ef91fe5fd4d21d31336b45fc50ddd1]]]]]
Former-commit-id: d9aecd89928f7f9d9839577b5e0b25321574bbf0
Former-commit-id: de1611ab5f977f2bee9dc8a198aff9132062317c
Former-commit-id: fc1cfccaf39869393008c829c7d7a0d0fa4f90db [formerly da42dbc190814356a632069f0f4075b487c6b4a5]
Former-commit-id: cc3cf7369050009889a55ac118b0848b32f2b58a
Former-commit-id: c6be98cc475fa30477b38a5d0595acbeb57f662f
Former-commit-id: ca41fcae2f69e240778c0759b4006f4aca81292b
Former-commit-id: 93a813f36b9d008624323ad5d14a90b052f898c0
Former-commit-id: c45ac65f8b8c18dd8f47aa3576b9fe63a22e6db2
This commit is contained in:
孙昊翔
2018-08-27 14:14:55 +08:00
24 changed files with 432 additions and 55 deletions

View File

@@ -17,6 +17,7 @@
</template>
<script>
import { BusinessTable1List } from '@/api/demo/business/table/1'
export default {
// name 值和本页的 $route.name 一致才可以缓存页面
name: 'demo-business-table-1',
@@ -53,7 +54,7 @@ export default {
this.$notify({
title: '开始请求模拟表格数据'
})
this.$axios.post('/api/demo/business/table/1', {
BusinessTable1List({
...form,
page: this.page
})

View File

@@ -1,6 +1,6 @@
<template>
<d2-container>
<template slot="header">异步加载文件</template>
<d2-markdown :url="`${$baseUrl}markdown/demo.md`"/>
<d2-markdown url="markdown/demo.md"/>
</d2-container>
</template>

View File

@@ -23,7 +23,9 @@
</template>
<script>
import { PluginMocksAjax } from '@/api/demo/plugins/mocks/ajax'
export default {
name: 'demo-plugins-mock-ajax',
data () {
return {
table: {
@@ -37,7 +39,7 @@ export default {
},
methods: {
ajax () {
this.$axios.get('/api/demo/plugins/mock/ajax')
PluginMocksAjax()
.then(res => {
this.table.columns = Object.keys(res.list[0]).map(e => ({
label: e,
@@ -45,6 +47,9 @@ export default {
}))
this.table.data = res.list
})
.catch(() => {
// 错误情况
})
}
}
}