[improvement] IndexBar: add default highlight color and more less vars

This commit is contained in:
陈嘉涵
2019-05-30 16:04:10 +08:00
parent 37ed9bd9ba
commit d67cec269f
7 changed files with 19 additions and 8 deletions
+1
View File
@@ -26,6 +26,7 @@ export default sfc({
if (this.sticky) {
return {
top: `${this.top}px`,
color: this.parent.highlightColor,
zIndex: `${this.parent.zIndex}`
};
}
+5 -4
View File
@@ -2,18 +2,19 @@
.van-index-anchor {
padding: @index-anchor-padding;
color: @index-anchor-text-color;
font-weight: @index-anchor-font-weight;
font-size: @index-anchor-font-size;
line-height: @index-anchor-line-height;
background-color: transparent;
transition: background-color .2s;
background-color: @index-anchor-background-color;
transition: color @index-anchor-transition-duration,
background-color @index-anchor-transition-duration;
&--sticky {
position: fixed;
top: 0;
right: 0;
left: 0;
z-index: 1;
background-color: #fff;
background-color: @index-anchor-sticky-background-color;
}
}