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 = () => {
|
const init = () => {
|
||||||
dvMainStore.initCurMultiplexingComponents()
|
dvMainStore.initCurMultiplexingComponents()
|
||||||
curMultiplexTargetComponentsInfo.value = []
|
curMultiplexTargetComponentsInfo.value = []
|
||||||
componentData.value.forEach(item => {
|
componentData.value?.forEach(item => {
|
||||||
curMultiplexTargetComponentsInfo.value.push({
|
curMultiplexTargetComponentsInfo.value.push({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
label: item.label,
|
label: item.label,
|
||||||
|
@ -80,12 +80,14 @@ const loadCanvasData = (dvId, weight?) => {
|
|||||||
state.canvasViewInfoPreview = canvasViewInfoPreview
|
state.canvasViewInfoPreview = canvasViewInfoPreview
|
||||||
state.dvInfo = dvInfo
|
state.dvInfo = dvInfo
|
||||||
state.curPreviewGap = curPreviewGap
|
state.curPreviewGap = curPreviewGap
|
||||||
dvMainStore.updateCurDvInfo(dvInfo)
|
|
||||||
dataInitState.value = true
|
dataInitState.value = true
|
||||||
|
if (props.showPosition === 'preview') {
|
||||||
|
dvMainStore.updateCurDvInfo(dvInfo)
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
dvPreview.value?.restore()
|
dvPreview.value?.restore()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,7 +153,9 @@ defineExpose({
|
|||||||
})
|
})
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
|
if (props.showPosition === 'preview') {
|
||||||
dvMainStore.canvasDataInit()
|
dvMainStore.canvasDataInit()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user