我有很多模块的几个不同的文件。其中一些共享相同的操作名称
有一些页面对不同模块使用 2 个或更多 mapActions 在我的页面上是这样的:
methods: {
...mapActions({
documents: ['setDocumentImage'],
documentAddress: ['setDocumentImage'],
selfie: ['setDocumentImage']
}),
}
Run Code Online (Sandbox Code Playgroud)
我的所有模块都有一个操作setDocumentImage
但问题是我必须像这样调用它们:this.setDocumentImage(file)
有没有一种方法可以为我的页面可以区分的每个 mapAction 创建别名?或者我该如何修复它?
在iOS 8上,上面的代码工作正常,但在iOS 7上没有,有人知道如何修复它吗?
- (void)scrollViewDidScroll:(UIScrollView *)scrollView{
// headerFixed is an UIView inside of a headerView, i wanna it to be fixed on Y:0
headerFixed.transform = CGAffineTransformMakeTranslation(0, MIN(scrollView.contentOffset.y, 0));
}
Run Code Online (Sandbox Code Playgroud)
在iOS 8上:https: //www.youtube.com/watch?v = -428J20xbzM&feature = youtu
在iOS 7(BUG):https://www.youtube.com/watch?v = Dd_jh0zs1f0 & feature = youtu.be