Merge pull request #7493 from dataease/pr@dev@refactor_request

refactor: 优化从编辑画布界面返回时,清理缓存数据,防止不必要加载
This commit is contained in:
王嘉豪 2024-01-02 15:03:14 +08:00 committed by GitHub
commit 47bb8c2d10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -372,6 +372,7 @@ export default {
//
this.$store.commit('initCanvasBase')
this.$store.commit('setInEditorStatus', false)
this.$store.commit('setComponentData', [])
this.$emit('close-left-panel')
removePanelCache(this.panelInfo.id)
this.$nextTick(() => {

View File

@ -105,7 +105,7 @@ service.interceptors.response.use(response => {
return response.data
}, error => {
const config = error.response && error.response.config || error.config
const headers = error.response && error.response.headers || error.response || config.headers
const headers = error.response && error.response.headers || error.response || config && config.headers
config.loading && tryHideLoading(store.getters.currentPath)
let msg = ''