Merge pull request #13479 from dataease/pr@dev-v2@fix_console
fix: 修复部分控制台报错
This commit is contained in:
commit
9f8bf957ad
@ -8,7 +8,7 @@ export const useMoveLine = (type: Sidebar) => {
|
||||
const width = ref(wsCache.get(type) || 280)
|
||||
|
||||
const getCoordinates = () => {
|
||||
document.querySelector('.sidebar-move-line').className = 'sidebar-move-line dragging'
|
||||
document.querySelector('.sidebar-move-line')?.className = 'sidebar-move-line dragging'
|
||||
document.addEventListener('mousemove', setCoordinates)
|
||||
document.addEventListener('mouseup', cancelEvent)
|
||||
document.querySelector('body').style['user-select'] = 'none'
|
||||
@ -26,7 +26,7 @@ export const useMoveLine = (type: Sidebar) => {
|
||||
}
|
||||
|
||||
const cancelEvent = () => {
|
||||
document.querySelector('.sidebar-move-line').className = 'sidebar-move-line'
|
||||
document.querySelector('.sidebar-move-line')?.className = 'sidebar-move-line'
|
||||
document.querySelector('body').style['user-select'] = 'auto'
|
||||
wsCache.set(type, width.value)
|
||||
document.removeEventListener('mousemove', setCoordinates)
|
||||
|
||||
@ -252,7 +252,7 @@ defineExpose({
|
||||
<el-container
|
||||
class="preview-area"
|
||||
:class="{ 'no-data': !hasTreeData }"
|
||||
v-loading="requestStore.loadingMap[permissionStore.currentPath]"
|
||||
v-loading="requestStore.loadingMap && requestStore.loadingMap[permissionStore.currentPath]"
|
||||
>
|
||||
<div
|
||||
@click="slideOpenChange"
|
||||
|
||||
@ -251,6 +251,7 @@ listenGlobalKeyDown()
|
||||
|
||||
const initScroll = () => {
|
||||
nextTick(() => {
|
||||
if (canvasCenterRef.value) {
|
||||
const { width, height } = canvasStyleData.value
|
||||
const mainWidth = canvasCenterRef.value.clientWidth
|
||||
mainHeight.value = canvasCenterRef.value.clientHeight
|
||||
@ -258,6 +259,7 @@ const initScroll = () => {
|
||||
const scrollY = (1.5 * height - mainHeight.value) / 2 + 20
|
||||
// 设置画布初始滚动条位置
|
||||
canvasOut.value.scrollTo(scrollX, scrollY)
|
||||
}
|
||||
})
|
||||
}
|
||||
const doUseCache = flag => {
|
||||
@ -477,7 +479,7 @@ eventBus.on('tabSort', tabSort)
|
||||
<div class="custom-dv-divider" />
|
||||
<el-container
|
||||
v-if="loadFinish"
|
||||
v-loading="requestStore.loadingMap[permissionStore.currentPath]"
|
||||
v-loading="requestStore.loadingMap && requestStore.loadingMap[permissionStore.currentPath]"
|
||||
element-loading-background="rgba(0, 0, 0, 0)"
|
||||
class="dv-layout-container"
|
||||
:class="{ 'preview-layout-container': previewStatus }"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user