mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 11:32:57 +08:00
fix(数据大屏): 修复Windows系统edge浏览器连续加入图标等svg组件造成页面卡顿问题
This commit is contained in:
parent
47da647af7
commit
bfa094cc8c
@ -100,6 +100,8 @@ let createType = null
|
|||||||
let isDragging = false // 标记是否在拖动
|
let isDragging = false // 标记是否在拖动
|
||||||
let startX, startY, scrollLeft, scrollTop
|
let startX, startY, scrollLeft, scrollTop
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
sideShow: true,
|
||||||
|
countTime: 0,
|
||||||
datasetTree: [],
|
datasetTree: [],
|
||||||
scaleHistory: null,
|
scaleHistory: null,
|
||||||
canvasId: 'canvas-main',
|
canvasId: 'canvas-main',
|
||||||
@ -168,6 +170,7 @@ const contentStyle = computed(() => {
|
|||||||
|
|
||||||
// 通过实时监听的方式直接添加组件
|
// 通过实时监听的方式直接添加组件
|
||||||
const handleNew = newComponentInfo => {
|
const handleNew = newComponentInfo => {
|
||||||
|
state.countTime++
|
||||||
const { componentName, innerType, staticMap } = newComponentInfo
|
const { componentName, innerType, staticMap } = newComponentInfo
|
||||||
if (componentName) {
|
if (componentName) {
|
||||||
const { width, height, scale } = canvasStyleData.value
|
const { width, height, scale } = canvasStyleData.value
|
||||||
@ -191,6 +194,13 @@ const handleNew = newComponentInfo => {
|
|||||||
dvMainStore.addComponent({ component: component, index: undefined })
|
dvMainStore.addComponent({ component: component, index: undefined })
|
||||||
adaptCurThemeCommonStyle(component)
|
adaptCurThemeCommonStyle(component)
|
||||||
snapshotStore.recordSnapshotCache('renderChart', component.id)
|
snapshotStore.recordSnapshotCache('renderChart', component.id)
|
||||||
|
if (state.countTime > 10) {
|
||||||
|
state.sideShow = false
|
||||||
|
nextTick(() => {
|
||||||
|
state.countTime = 0
|
||||||
|
state.sideShow = true
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -579,7 +589,7 @@ eventBus.on('tabSort', tabSort)
|
|||||||
</main>
|
</main>
|
||||||
<!-- 右侧侧组件列表 -->
|
<!-- 右侧侧组件列表 -->
|
||||||
<div style="width: auto; height: 100%" ref="leftSidebarRef">
|
<div style="width: auto; height: 100%" ref="leftSidebarRef">
|
||||||
<template v-if="!batchOptStatus">
|
<template v-if="!batchOptStatus && state.sideShow">
|
||||||
<dv-sidebar
|
<dv-sidebar
|
||||||
v-if="otherEditorShow"
|
v-if="otherEditorShow"
|
||||||
:title="curComponent['name']"
|
:title="curComponent['name']"
|
||||||
|
Loading…
Reference in New Issue
Block a user