From 242ab8c8b53c22e7aa60cc27c969cac872b06a3d Mon Sep 17 00:00:00 2001 From: yangd Date: Mon, 30 Sep 2019 12:45:21 +0800 Subject: [PATCH] =?UTF-8?q?tabs=E6=B7=BB=E5=8A=A0custContentClass=E5=92=8C?= =?UTF-8?q?custContentStyle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/tabs/tabs.vue | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/components/tabs/tabs.vue b/src/components/tabs/tabs.vue index ed816aa1..160beae0 100644 --- a/src/components/tabs/tabs.vue +++ b/src/components/tabs/tabs.vue @@ -100,6 +100,14 @@ name: { type: String }, + custContentClass: { + type: String, + default: '' + }, + custContentStyle: { + type: Object, + default: {} + } }, data () { return { @@ -133,7 +141,8 @@ `${prefixCls}-content`, { [`${prefixCls}-content-animated`]: this.animated - } + }, + this.custContentClass ]; }, barClasses () { @@ -154,6 +163,10 @@ transform: `translateX(${p}) translateZ(0px)` }; } + const { custContentStyle } = this; + for (const key in custContentStyle){ + style[key] = custContentStyle[key]; + } return style; }, barStyle () {