feat: 优化仪表盘页面loading

This commit is contained in:
wangjiahao 2021-06-04 12:33:08 +08:00
parent 3fd5e678d6
commit fccd7d8f29
2 changed files with 4 additions and 3 deletions

View File

@ -18,7 +18,6 @@ export function showTemplateList(data) {
return request({
url: '/template/templateList',
data: data,
loading: true,
method: 'post'
})
}
@ -26,7 +25,6 @@ export function showTemplateList(data) {
export function findOne(id) {
return request({
url: '/template/findOne/' + id,
loading: true,
method: 'get'
})
}

View File

@ -1,5 +1,5 @@
<template>
<el-row v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
<el-row v-loading="loading">
<el-row v-if="editPanel.optType==='new' && editPanel.panelInfo.nodeType==='panel'">
<el-col :span="18" style="height: 40px">
<el-radio v-model="inputType" label="self"> {{ $t('panel.custom') }}</el-radio>
@ -46,6 +46,7 @@ export default {
},
data() {
return {
loading: false,
inputType: 'self',
fieldName: 'name',
tableRadio: null,
@ -92,8 +93,10 @@ export default {
level: '-1',
withChildren: true
}
this.loading = true
showTemplateList(request).then(res => {
this.templateList = res.data
this.loading = false
})
},
handleExceed(file) {