最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

微信内页跳转 显示“如需浏览,请长按网址复制后使用浏览器访问”怎么解决

运维笔记admin5浏览0评论

<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.就可以实现不用去浏览器中也可以显示。

发布评论

评论列表(0)

  1. 暂无评论