优化公用函数

This commit is contained in:
Harvey Zack committed 2018-10-24 22:02:03 +08:00
1 parent a47d93355b
commit a738f97764
8 files changed
+52 -44

No files matched your search

+2 -2
View File
@@ -52,8 +52,8 @@ export default class Thumbnails {
}
showThumbnails(event) {
const { $progress } = this.art.refs;
const { width: posWidth } = this.getPosFromEvent(event);
const { refs: { $progress }, controls } = this.art;
const { width: posWidth } = controls.progress.getPosFromEvent(event);
const { url, height, width, number, column } = this.art.option.thumbnails;
const perWidth = $progress.clientWidth / number;
const perIndex = Math.ceil(posWidth / perWidth);