| | |
| | | this.$refs.desktop.validateSn() |
| | | } |
| | | if (e.data.msg === 'changeColor') { |
| | | /* this.$store.state.desktop.minDocks.forEach(item=>{ |
| | | console.log(window.location.host); |
| | | console.log(item.url); |
| | | // window.postMessage(e.data.color,`${window.location.host}${item.url}`) |
| | | // window.postMessage(e.data.color,"http://localhost:8080/view/vindicate/") |
| | | |
| | | }) */ |
| | | |
| | | const iframeArr = document.querySelectorAll("iframe") |
| | | console.log(iframeArr); |
| | | iframeArr.forEach(item=>{ |
| | | console.log(item); |
| | | item.contentWindow.postMessage({msg:'changeColor',color:e.data.color},"*") |
| | | }) |
| | | } |
| | | }); |
| | |
| | | height: 30px;
|
| | | border-radius:50% ;
|
| | | background-color: #fff;
|
| | | padding: 3px;
|
| | | padding: 4px;
|
| | | .color-option-content {
|
| | | width: 100%;
|
| | | height: 100%;
|
| | |
| | | this.getLeftPer() |
| | | console.log(99999); |
| | | window.addEventListener("message",(e)=>{ |
| | | console.log(e); |
| | | console.log(999); |
| | | if(e.data.msg === 'changeColor') { |
| | | document.documentElement.style.setProperty('--colorCard',`${e.data.color}`) |
| | | } |
| | | }) |
| | | }, |
| | | methods: { |