From 469e8191df56e73e8411b4af3850df885dc0d10c Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 13 Nov 2018 21:47:46 +0800 Subject: [PATCH] [bugfix] Tab: line width can be zero (#2081) --- packages/tabs/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tabs/index.vue b/packages/tabs/index.vue index 40c42a604..f3a92ba88 100644 --- a/packages/tabs/index.vue +++ b/packages/tabs/index.vue @@ -256,7 +256,7 @@ export default create({ } const tab = this.$refs.tabs[this.curActive]; - const width = this.lineWidth || (tab.offsetWidth / 2); + const width = this.isDef(this.lineWidth) ? this.lineWidth : (tab.offsetWidth / 2); const left = tab.offsetLeft + (tab.offsetWidth - width) / 2; this.lineStyle = {