This repository was archived by the owner on Nov 30, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 4
4
role =" tablist"
5
5
@MDCTabBar:activated =" onActivated"
6
6
>
7
- <slot />
7
+ <slot v-if =" $slots.default[0].tag.includes('m-tab-scroller')" />
8
+ <!-- todo: it doesn't work with <div class='mdc-tab-scroller'> but only work with our own m-tab-scroller component. This need to be enhanced. -->
9
+ <div
10
+ v-else
11
+ class =" mdc-tab-scroller"
12
+ >
13
+ <div class =" mdc-tab-scroller__scroll-area" >
14
+ <div class =" mdc-tab-scroller__scroll-content" >
15
+ <slot />
16
+ </div >
17
+ </div >
18
+ </div >
8
19
</div >
9
20
</template >
10
21
@@ -53,6 +64,7 @@ export default {
53
64
}
54
65
},
55
66
mounted () {
67
+ console .log (this .$slots .default [0 ].tag )
56
68
this .mdcTabBar = MDCTabBar .attachTo (this .$el )
57
69
this .mdcTabBar .focusOnActivate = this .focusOnActivate
58
70
this .mdcTabBar .useAutomaticActivation = this .useAutomaticActivation
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ import { MDCTabIndicator } from '@material/tab-indicator'
15
15
import { baseComponentMixin , themeClassMixin } from ' ../base'
16
16
17
17
export default {
18
- name: ' TabIndicator' ,
19
18
mixins: [baseComponentMixin, themeClassMixin],
20
19
props: {
21
20
fade: {
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ import { MDCTabScroller } from '@material/tab-scroller'
13
13
import { baseComponentMixin , themeClassMixin } from ' ../base'
14
14
15
15
export default {
16
- name: ' TabScroller' ,
17
16
mixins: [baseComponentMixin, themeClassMixin],
18
17
data () {
19
18
return {
You can’t perform that action at this time.
0 commit comments