Skip to content

Commit

Permalink
自动检测window.addEventListener是否存在,控制is_ie;
Browse files Browse the repository at this point in the history
 添加配置文件说明
  • Loading branch information
sayll committed Dec 3, 2016
1 parent ae5fc27 commit e612f79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -15,9 +15,9 @@ avalon2的分页插件
```
使用[兼容性极好的3.2.1](http://fontawesome.io/3.2.1/icons/)




## 配置说明
* index.js 中**is_ie** 为IE8开启监听,查看location变化,从而支持浏览器后退功能;
* index.js 中**is_more** 为支持单页应用,具体使用可参考源码片段;

http://caibaojian.com/fontawesome/get-started.html
http://stackoverflow.com/questions/9809351/ie8-css-font-face-fonts-only-working-for-before-content-on-over-and-sometimes
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -46,7 +46,7 @@ avalon.component('ms-pager', {
* 是否开启低版本兼容模式
* 开启,将无法开启浏览器回退功能
* */
is_ie : false,
is_ie : !!window.addEventListener,
/**
* 配置复杂型单页
* 默认为false
Expand All @@ -55,7 +55,7 @@ avalon.component('ms-pager', {
* 如#/game?page=2
* 表示单页应用进入子页面game页,当前页为2
* */
is_more : true,
is_more : false,
hash : '',
getHref : function (a) {
if (this.is_more) {
Expand Down

0 comments on commit e612f79

Please sign in to comment.