<iframe ref="iframe"></iframe>
替换src的时候不能直接替换,得覆盖之前src
set(src) {
this.$refs.iframe.contentWindow.location.replace(src)
}
博客指出在处理iframe时,替换src不能直接替换,而要覆盖之前的src,还给出详情参考链接https://www.jianshu.com/p/d88148184b79 。
<iframe ref="iframe"></iframe>
替换src的时候不能直接替换,得覆盖之前src
set(src) {
this.$refs.iframe.contentWindow.location.replace(src)
}
1013

被折叠的 条评论
为什么被折叠?