pull/9/head
tangjinzhou 2017-11-22 15:45:43 +08:00
parent d1d56eedcd
commit 837d4cadeb
2 changed files with 7 additions and 7 deletions

View File

@ -1,10 +1,9 @@
<script>
import RefMixin from './RefMixin'
import TabBarMixin from './TabBarMixin'
function noop () {
}
export default {
mixins: [RefMixin, TabBarMixin],
mixins: [TabBarMixin],
name: 'TabBar',
props: {
prefixCls: {

View File

@ -17,10 +17,10 @@ export default {
const onClick = () => {
!child.disabled && this.onTabClick(key)
}
const ref = {}
if (activeKey === key) {
ref.ref = this.saveRef('activeTab')
}
// const ref = {}
// if (activeKey === key) {
// ref.ref = this.saveRef('activeTab')
// }
rst.push(
<div
role='tab'
@ -29,6 +29,7 @@ export default {
class={cls}
key={key}
onClick={onClick}
ref={activeKey === key ? 'activeTab' : undefined}
>
{child.tab}
</div>
@ -61,7 +62,7 @@ export default {
role='tablist'
class={cls}
tabIndex='0'
ref={this.saveRef('root')}
ref='root'
onKeydown={onKeyDown}
>
{children}