fix
parent
d1d56eedcd
commit
837d4cadeb
|
@ -1,10 +1,9 @@
|
||||||
<script>
|
<script>
|
||||||
import RefMixin from './RefMixin'
|
|
||||||
import TabBarMixin from './TabBarMixin'
|
import TabBarMixin from './TabBarMixin'
|
||||||
function noop () {
|
function noop () {
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
mixins: [RefMixin, TabBarMixin],
|
mixins: [TabBarMixin],
|
||||||
name: 'TabBar',
|
name: 'TabBar',
|
||||||
props: {
|
props: {
|
||||||
prefixCls: {
|
prefixCls: {
|
||||||
|
|
|
@ -17,10 +17,10 @@ export default {
|
||||||
const onClick = () => {
|
const onClick = () => {
|
||||||
!child.disabled && this.onTabClick(key)
|
!child.disabled && this.onTabClick(key)
|
||||||
}
|
}
|
||||||
const ref = {}
|
// const ref = {}
|
||||||
if (activeKey === key) {
|
// if (activeKey === key) {
|
||||||
ref.ref = this.saveRef('activeTab')
|
// ref.ref = this.saveRef('activeTab')
|
||||||
}
|
// }
|
||||||
rst.push(
|
rst.push(
|
||||||
<div
|
<div
|
||||||
role='tab'
|
role='tab'
|
||||||
|
@ -29,6 +29,7 @@ export default {
|
||||||
class={cls}
|
class={cls}
|
||||||
key={key}
|
key={key}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
|
ref={activeKey === key ? 'activeTab' : undefined}
|
||||||
>
|
>
|
||||||
{child.tab}
|
{child.tab}
|
||||||
</div>
|
</div>
|
||||||
|
@ -61,7 +62,7 @@ export default {
|
||||||
role='tablist'
|
role='tablist'
|
||||||
class={cls}
|
class={cls}
|
||||||
tabIndex='0'
|
tabIndex='0'
|
||||||
ref={this.saveRef('root')}
|
ref='root'
|
||||||
onKeydown={onKeyDown}
|
onKeydown={onKeyDown}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|
Loading…
Reference in New Issue