mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-24 23:49:14 +08:00
feat(TabbarItem): optimize dot prop (#4431)
This commit is contained in:
parent
9e085c4c04
commit
80f6b04b9a
@ -51,9 +51,9 @@ export default createComponent({
|
||||
|
||||
return (
|
||||
<div class={bem({ active })} style={{ color }} onClick={this.onClick}>
|
||||
<div class={bem('icon', { dot: this.dot })}>
|
||||
<div class={bem('icon')}>
|
||||
{slots('icon', { active }) || (icon && <Icon name={icon} />)}
|
||||
<Info info={this.info} />
|
||||
<Info dot={this.dot} info={this.info} />
|
||||
</div>
|
||||
<div class={bem('text')}>{slots('default', { active })}</div>
|
||||
</div>
|
||||
|
@ -20,19 +20,6 @@
|
||||
min-width: 1em;
|
||||
}
|
||||
|
||||
&--dot {
|
||||
&::after {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: -8px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background-color: @red;
|
||||
border-radius: 100%;
|
||||
content: ' ';
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
height: @tabbar-item-icon-size;
|
||||
|
@ -84,9 +84,9 @@ exports[`renders demo correctly 1`] = `
|
||||
<div class="van-tabbar-item__text">标签</div>
|
||||
</div>
|
||||
<div class="van-tabbar-item">
|
||||
<div class="van-tabbar-item__icon van-tabbar-item__icon--dot"><i class="van-icon van-icon-search">
|
||||
<div class="van-tabbar-item__icon"><i class="van-icon van-icon-search">
|
||||
<!----></i>
|
||||
<!---->
|
||||
<div class="van-info van-info--dot"></div>
|
||||
</div>
|
||||
<div class="van-tabbar-item__text">
|
||||
标签
|
||||
|
Loading…
x
Reference in New Issue
Block a user