首页 > 解决方案 > Fancybox 3 ajax 类型自动追加查询字符串 fancybox=true 到实际 url

问题描述

有没有办法避免 Fancybox 3 自动附加查询字符串“fancybox=true”?

谢谢

标签: fancybox-3

解决方案


您可以使用一个选项ajax来自定义您的 ajax 请求,这是默认值:

  ajax: {
    // Object containing settings for ajax request
    settings: {
      // This helps to indicate that request comes from the modal
      // Feel free to change naming
      data: {
        fancybox: true
      }
    }
  }

推荐阅读