From e7b1d709002e5dac914dc4e545fbf2a2b06f9b2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Fri, 25 Aug 2017 15:57:38 +0800 Subject: [PATCH] fix: code style --- packages/actionsheet/index.vue | 8 +++---- packages/badge-group/index.vue | 30 ++++++++++++------------ packages/cell-swipe/index.vue | 7 +++--- packages/datetime-picker/index.vue | 2 +- packages/field/index.vue | 8 +++---- packages/image-preview/image-preview.vue | 8 +++---- packages/loading/index.vue | 13 ++++------ packages/mixins/popup/index.js | 2 +- packages/mixins/popup/popup-manager.js | 2 +- packages/picker/index.vue | 8 +++---- packages/search/index.vue | 4 ++-- packages/steps/index.vue | 2 +- packages/swipe-item/index.vue | 4 ++-- packages/swipe/index.vue | 14 +++++------ packages/switch/index.vue | 16 +++---------- packages/tabs/index.vue | 4 ++-- packages/tag/index.vue | 4 +--- packages/toast/toast.vue | 8 +++---- 18 files changed, 64 insertions(+), 80 deletions(-) diff --git a/packages/actionsheet/index.vue b/packages/actionsheet/index.vue index 175d00245..04f206ba2 100644 --- a/packages/actionsheet/index.vue +++ b/packages/actionsheet/index.vue @@ -28,8 +28,8 @@ diff --git a/packages/cell-swipe/index.vue b/packages/cell-swipe/index.vue index 7c1b87dde..7ab4ce705 100644 --- a/packages/cell-swipe/index.vue +++ b/packages/cell-swipe/index.vue @@ -51,7 +51,7 @@ export default { wrapperStyle() { return { transform: `translate3d(${this.offset}px, 0, 0)` - } + }; } }, @@ -72,9 +72,8 @@ export default { if (direction > 0 && -offset > rightWidth * 0.4 && rightWidth > 0) { this.swipeMove(-rightWidth); this.resetSwipeStatus(); - } // left - else if (direction < 0 && offset >leftWidth * 0.4 && leftWidth > 0) { + } else if (direction < 0 && offset > leftWidth * 0.4 && leftWidth > 0) { this.swipeMove(leftWidth); this.resetSwipeStatus(); } else { @@ -114,7 +113,7 @@ export default { endDrag() { if (this.swiping) { - this.swipeLeaveTransition(this.offset > 0 ? -1 : 1); + this.swipeLeaveTransition(this.offset > 0 ? -1 : 1); }; } } diff --git a/packages/datetime-picker/index.vue b/packages/datetime-picker/index.vue index 75d521a17..c89cc77ff 100644 --- a/packages/datetime-picker/index.vue +++ b/packages/datetime-picker/index.vue @@ -19,7 +19,7 @@ export default { name: 'van-datetime-picker', components: { - 'van-picker': Picker + [Picker.name]: Picker }, props: { diff --git a/packages/field/index.vue b/packages/field/index.vue index 2f86df5b1..67145aa67 100644 --- a/packages/field/index.vue +++ b/packages/field/index.vue @@ -48,15 +48,15 @@