admin管理员组文章数量:1025818
<iframe v-if="iframeShow" id="paymentIframe" name="paymentIframe"
style="width:100%; height:100vh; border:0; display:block;overflow: hidden;"></iframe>
const response = 链接地址;
iframeShow.value = true;
// 确保 DOM 更新已完成,再设置 iframe 的 src
nextTick(() => {
const iframe = document.getElementById('paymentIframe');
if (iframe) {
iframe.src = response;
console.log("Iframe source set to:", response);
} else {
console.error("Iframe element not found.");
}
使用iframe,内嵌一个iframe,搭配v-if.v-else.就可以实现不用去浏览器中也可以显示。
<iframe v-if="iframeShow" id="paymentIframe" name="paymentIframe"
style="width:100%; height:100vh; border:0; display:block;overflow: hidden;"></iframe>
const response = 链接地址;
iframeShow.value = true;
// 确保 DOM 更新已完成,再设置 iframe 的 src
nextTick(() => {
const iframe = document.getElementById('paymentIframe');
if (iframe) {
iframe.src = response;
console.log("Iframe source set to:", response);
} else {
console.error("Iframe element not found.");
}
使用iframe,内嵌一个iframe,搭配v-if.v-else.就可以实现不用去浏览器中也可以显示。
版权声明:本文标题:微信内页跳转 显示“如需浏览,请长按网址复制后使用浏览器访问”怎么解决 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/jiaocheng/1737922906a1521586.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论