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

<iframe v-if"iframeShow" id"paymentIframe" name"paymentIframe"style"width:100%; he

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

发布者:admin,转转请注明出处:http://www.yc00.com/web/1737922906a3997725.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信