fix(嵌入式): 修复同一图表多次嵌入参数发送时相互影响问题

This commit is contained in:
wangjiahao 2024-10-21 18:32:46 +08:00
parent 51dfb8de76
commit 858630111e

View File

@ -36,8 +36,14 @@ const embeddedParams = embeddedParamsDiv?.chartId ? embeddedParamsDiv : embedded
// targetSourceId ID
const winMsgHandle = event => {
const msgInfo = event.data
// targetSourceId
if (msgInfo && msgInfo.type === 'attachParams' && msgInfo.targetSourceId === state.chartId + '') {
if (
msgInfo &&
msgInfo.type === 'attachParams' &&
msgInfo.targetSourceId === state.chartId + '' &&
(!msgInfo.suffixId || msgInfo.suffixId === state.suffixId)
) {
const attachParams = msgInfo.params
state.initState = false
dvMainStore.addOuterParamsFilter(attachParams, state.canvasDataPreview, 'outer')