1.0.3 • Published 5 years ago

vue-nprogress-pjax v1.0.3

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

PJAX adapter with NProgress for Vue

This Vue plugin was forked from riverskies/vue-pjax-adapter.

Ogigin Author Infomation

Riverskies Development Limited is a small software development company based in Surrey, UK.

##当前版本信息 更多请查看changelog.md:

  • 1.0.3
    • 修复如果href是锚点或者是click事件,则不再使用pjax
  • 中间版本说明,请查看changelog
  • 1.0.1
    • 当前版本仅在原项目基础上增加了NProgress,仅添加两行代码,不影响原有使用

###其他说明

  • 如果你是基于laravel使用,当前插件应该是没有任何问题
  • 如果你是基于Yii2使用,请在Yii::$app->response输出前,增加header头,设置x-pjax-url为当前URL
    • 如果你基于Yii2 + blade,请在main模板加载app.js前,进行判断
      @if(!Yii::$app->request->headers->get('x-pjax'))
          <script src="....app.js"></script>
      @endif
      因为当前插件在使用时,仅去除html,head,body,等标签,<script src="app.js">,还是会引入(虽然不会重复加载),但在DEV模式下会报Warning,提示
      Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as <script>, as they will not be parsed
      因此需要加上判断
1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago