Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

分页组件在 IE11 下面(没有测试ie6~10), 在 avalon.vmodels没有缓存 #784

Open
pollux2015 opened this issue Nov 9, 2015 · 2 comments

Comments

@pollux2015
Copy link

通过 mmstate 切换视图的时候(来回多切换几次后), $ctrl.$onRendered 给 pager 组建重新赋值发现 avalon.vmodels里面有时候并没有这个pager组件的 id. 在 ie11下面不知道怎么回事.
1
78
3

@yuhaoju
Copy link
Contributor

yuhaoju commented Nov 10, 2015

在mmstate里面,这种组件声明时不能指定vm名字,只能像下面这样定义:

<div ms-widget=\"pager $ opts\"></div>

组件的vm在组件的onInit回调里面获取:

opts: {
    onInit: function(vm){
        pagerVM = vm
    },
    currentPage: 1,
    totalItems: 100
}

最后在$onRendered里面获取这个pagerVM再进行操作

@pollux2015
Copy link
Author

感激,原来是这样, 已经解决了, 我在内网测试这个 vm 获取的到, 但是换到外网去的的时候就得不到了在 IE, 后来设置了 延迟就解决了..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants