Uncaught SecurityError: Failed to read a named property 'href' from 'Location': Blocked a frame with origin "http://localhost:9529" from accessing a cross-origin frame.
at ./src/main.js (main.js:127:23)
at __webpack_require__ ((索引):99:30)
at 0 (templateLabelConfig.vue:1:1)
at __webpack_require__ ((索引):99:30)
at checkDeferredModules ((索引):65:23)
at Array.webpackJsonpCallback [as push] ((索引):52:19)
at app.1736758244600.js:1:57
解决方案:
//主页面 向 iframe传递事件//主页面
var frame = document.getElementById('iframeId');frame.contentWindow.postMessage(object,'*');
//iframe页面iframe: window.addEventListener('message',function(event){ //此处执行事件})
//iframe向主页面传递事件
//iframe页面window.parent.postMessage(object,'*');//主页面window.addEventListener('message',,function(event){ //此处执行事件})