How vue invokes object values defined in iframe in the parent component

problem description

clipboard.png

these are the values I defined in iframe. How can I call these values in the parent component

the environmental background of the problems and what methods you have tried

at present, it is normal for vue and iframe to pass values to each other through postMessage. I would like to ask whether the parent component can get the value through ref, but not through postMessage. It means that if iframe does not trigger the value, the object value of iframe can be obtained in the parent component.
I hope the boss can take a look at it for me

.
Dec.01,2021

the this of the vue component in iframe is hung on the global (window), and the outer window goes directly to get the global variable of iframe window

.
Menu