Skip to content

Commit 6064c2b

Browse files
committed
[core] RTL support #80
added rtl support to tabs component with mdIsRtl prop
1 parent 0f96730 commit 6064c2b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/MdTabs/MdTabs.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@
6363
},
6464
mdSyncRoute: Boolean,
6565
mdDynamicHeight: Boolean,
66-
mdActiveTab: [String, Number]
66+
mdActiveTab: [String, Number],
67+
mdIsRtl: { type: Boolean, default: false }
6768
},
6869
data: () => ({
6970
resizeObserver: null,
@@ -214,9 +215,8 @@
214215
this.contentStyles = {
215216
height: tabElement ? `${tabElement.offsetHeight}px` : 0
216217
}
217-
218218
this.containerStyles = {
219-
transform: `translate3D(${-this.activeTabIndex * 100}%, 0, 0)`
219+
transform: `translate3D(${this.mdIsRtl ? (this.activeTabIndex) * 100 : (-this.activeTabIndex) * 100}%, 0, 0)`
220220
}
221221
}
222222
},

0 commit comments

Comments
 (0)