axios封装
axios封装 Former-commit-id: 4dc0646a8509fe9cb6c5218e9dfc864b0af59143 [formerly eaee9b788f359a10ad0b8b199dcdd8c82765855f] [formerly 4dc0646a8509fe9cb6c5218e9dfc864b0af59143 [formerly eaee9b788f359a10ad0b8b199dcdd8c82765855f] [formerly 4dc0646a8509fe9cb6c5218e9dfc864b0af59143 [formerly eaee9b788f359a10ad0b8b199dcdd8c82765855f] [formerly eaee9b788f359a10ad0b8b199dcdd8c82765855f [formerly 0dad01580037e9ada6f7f9201eab7e28bafbadd4 [formerly 97a660059b807afdf8c0c518d4f40be4ce7eceec]]]]] Former-commit-id: 95e753d1626ce41c1465bac635687ce5989877a5 Former-commit-id: 2e567e9e2bb7d07e9cf52dbfe29b140c24c76b48 Former-commit-id: 37e5cef6e554af37fc7d55785552160ff086c03d [formerly 14edcd31bc67642337f8eddf2ec7cbdec23ecc2c] Former-commit-id: 08a71cba6653878d9accae5a7ecfcf1122d3515a Former-commit-id: a1731726720512ae8a5a7fd5973f4c90a62ac448 Former-commit-id: 3838dfd576136f0ac217d9a97d631f9a88191d31 Former-commit-id: fa2416a4c270dce89a33e0486569374c5c7b6a63 Former-commit-id: b03e226c26ea5495e1d7d6a2206b89c8f4e17815
This commit is contained in:
@@ -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
|
||||
})
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { PluginMocksAjax } from '@/api/demo/plugins/mocks/ajax'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
@@ -37,7 +38,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,
|
||||
|
||||
Reference in New Issue
Block a user