forked from github/dataease
Merge pull request #10279 from dataease/pr@dev-v2@feat_datav-copy3
refactor(数据大屏): 修改大屏预览加载逻辑
This commit is contained in:
commit
1f89574c42
@ -95,7 +95,7 @@ watch(
|
||||
const init = () => {
|
||||
dvMainStore.initCurMultiplexingComponents()
|
||||
curMultiplexTargetComponentsInfo.value = []
|
||||
componentData.value.forEach(item => {
|
||||
componentData.value?.forEach(item => {
|
||||
curMultiplexTargetComponentsInfo.value.push({
|
||||
id: item.id,
|
||||
label: item.label,
|
||||
|
@ -80,11 +80,13 @@ const loadCanvasData = (dvId, weight?) => {
|
||||
state.canvasViewInfoPreview = canvasViewInfoPreview
|
||||
state.dvInfo = dvInfo
|
||||
state.curPreviewGap = curPreviewGap
|
||||
dvMainStore.updateCurDvInfo(dvInfo)
|
||||
dataInitState.value = true
|
||||
nextTick(() => {
|
||||
dvPreview.value?.restore()
|
||||
})
|
||||
if (props.showPosition === 'preview') {
|
||||
dvMainStore.updateCurDvInfo(dvInfo)
|
||||
nextTick(() => {
|
||||
dvPreview.value?.restore()
|
||||
})
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
@ -151,7 +153,9 @@ defineExpose({
|
||||
})
|
||||
|
||||
onBeforeMount(() => {
|
||||
dvMainStore.canvasDataInit()
|
||||
if (props.showPosition === 'preview') {
|
||||
dvMainStore.canvasDataInit()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user