diff --git a/packages/checkbox/index.less b/packages/checkbox/index.less index 89d2c97d..319af050 100644 --- a/packages/checkbox/index.less +++ b/packages/checkbox/index.less @@ -16,7 +16,9 @@ } &__icon { - display: block; + display: flex; + align-items: center; + justify-content: center; box-sizing: border-box; width: 1em; height: 1em; diff --git a/packages/goods-action-button/index.ts b/packages/goods-action-button/index.ts index b59ed951..889abcaa 100644 --- a/packages/goods-action-button/index.ts +++ b/packages/goods-action-button/index.ts @@ -24,7 +24,7 @@ VantComponent({ } }, - mounted: function() { + mounted() { this.updateStyle(); }, @@ -34,12 +34,13 @@ VantComponent({ this.jumpLink(); }, updateStyle() { - const parent = this.parent; + const { parent } = this; const { children = [] } = parent; const index = children.indexOf(this); - const length = children.length; - let isFirst = false, isLast = false; - if ( index === 0 ) { + const { length } = children; + let isFirst = false; + let isLast = false; + if (index === 0) { isFirst = true; } if (index === length - 1) {