fix: 修复新建时切换Tab删除资源有异常提示问题

This commit is contained in:
wangjiahao 2023-10-25 09:55:25 +08:00
parent 7ae7424b6e
commit 9c9c8110b3
2 changed files with 8 additions and 4 deletions

View File

@ -18,8 +18,10 @@ import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()
const eventCheck = e => {
if (e.key === 'panel-weight' && !compareStorage(e.oldValue, e.newValue)) {
const { resourceId } = window.DataEaseBi || router.currentRoute.value.query
check(wsCache.get('panel-weight'), resourceId)
const { resourceId, opt } = window.DataEaseBi || router.currentRoute.value.query
if (!(opt && opt === 'create')) {
check(wsCache.get('panel-weight'), resourceId)
}
}
}
const dvMainStore = dvMainStoreWithOut()

View File

@ -29,8 +29,10 @@ import { center } from '@antv/g2plot/lib/plots/sankey/sankey'
const { wsCache } = useCache()
const eventCheck = e => {
if (e.key === 'screen-weight' && !compareStorage(e.oldValue, e.newValue)) {
const { dvId } = window.DataEaseBi || router.currentRoute.value.query
check(wsCache.get('screen-weight'), dvId)
const { dvId, opt } = window.DataEaseBi || router.currentRoute.value.query
if (!(opt && opt === 'create')) {
check(wsCache.get('screen-weight'), dvId)
}
}
}
const mainCanvasCoreRef = ref(null)