解决支付宝iOS不能修改标题

  1. 引入文件 antbridge.min.js (文档说明)
  2. 文件地址 https://a.alipayobjects.com/g/component/antbridge/1.1.4/antbridge.min.js
    解决支付宝iOS不能修改标题 document.title
  3. 设置标题:
    router.beforeEach((to, from, next) => {
    if (to.meta.title) {
    document.title = to.meta.title;
    const userAgent = window.navigator.userAgent.toLowerCase();
    if (/AlipayClient/i.test(userAgent) && ant) {
    ant.setTitle(to.meta.title);
    }
    }
    next();
    });

解决支付宝iOS不能修改标题 document.title

作者: Gump8

相关文章:

  • 2022-01-17
  • 2022-12-23
  • 2021-10-09
  • 2021-05-25
  • 2021-08-13
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-14
  • 2021-07-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案