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 { &__icon {
display: block; display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box; box-sizing: border-box;
width: 1em; width: 1em;
height: 1em; height: 1em;

View File

@ -24,7 +24,7 @@ VantComponent({
} }
}, },
mounted: function() { mounted() {
this.updateStyle(); this.updateStyle();
}, },
@ -34,11 +34,12 @@ VantComponent({
this.jumpLink(); this.jumpLink();
}, },
updateStyle() { updateStyle() {
const parent = this.parent; const { parent } = this;
const { children = [] } = parent; const { children = [] } = parent;
const index = children.indexOf(this); const index = children.indexOf(this);
const length = children.length; const { length } = children;
let isFirst = false, isLast = false; let isFirst = false;
let isLast = false;
if (index === 0) { if (index === 0) {
isFirst = true; isFirst = true;
} }