fix(checkbox): set a 12px icon size style bug (#2105)

This commit is contained in:
Jake 2019-09-27 17:08:51 +08:00 committed by neverland
parent 1a3332d36c
commit 602fbfb7b4
2 changed files with 9 additions and 6 deletions

View File

@ -16,7 +16,9 @@
}
&__icon {
display: block;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
width: 1em;
height: 1em;

View File

@ -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) {