[Improvement] Rebuild test system (#1051)

This commit is contained in:
neverland
2018-05-12 14:04:32 +08:00
committed by GitHub
parent 360f2f40b1
commit a55eda8891
185 changed files with 4989 additions and 7950 deletions

View File

@@ -128,10 +128,12 @@ export default create({
// initialize swipe position
initialize() {
clearTimeout(this.timer);
const rect = this.$el.getBoundingClientRect();
if (this.$el) {
const rect = this.$el.getBoundingClientRect();
this.width = rect.width;
this.height = rect.height;
}
this.swiping = true;
this.width = rect.width;
this.height = rect.height;
this.active = this.initialSwipe;
this.offset = this.count > 1 ? -this.size * this.active : 0;
this.swipes.forEach(swipe => {