[improvement] TabbarItem: add slot-scope to avoid check by index (#347)
* [improvement] TabbarItem: add slot-scope to avoid check by index * [fix] TabbarItem: fix slot-scope on <template> to support vue v2.1.0+
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div class="van-tabbar-item" :class="{ 'van-tabbar-item--active': active }" @click="onClick">
|
||||
<div class="van-tabbar-item__icon" :class="{ 'van-tabbar-item__icon-dot': dot }">
|
||||
<slot name="icon">
|
||||
<slot name="icon" :active="active">
|
||||
<van-icon v-if="icon" :name="icon" />
|
||||
</slot>
|
||||
<div v-if="info" class="van-tabbar-item__info">{{ info }}</div>
|
||||
</div>
|
||||
<div class="van-tabbar-item__text">
|
||||
<slot></slot>
|
||||
<slot :active="active"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user