tabs添加custContentClass和custContentStyle

This commit is contained in:
yangd 2019-09-30 12:45:21 +08:00
parent d2c548d1c2
commit 242ab8c8b5

View file

@ -100,6 +100,14 @@
name: { name: {
type: String type: String
}, },
custContentClass: {
type: String,
default: ''
},
custContentStyle: {
type: Object,
default: {}
}
}, },
data () { data () {
return { return {
@ -133,7 +141,8 @@
`${prefixCls}-content`, `${prefixCls}-content`,
{ {
[`${prefixCls}-content-animated`]: this.animated [`${prefixCls}-content-animated`]: this.animated
} },
this.custContentClass
]; ];
}, },
barClasses () { barClasses () {
@ -154,6 +163,10 @@
transform: `translateX(${p}) translateZ(0px)` transform: `translateX(${p}) translateZ(0px)`
}; };
} }
const { custContentStyle } = this;
for (const key in custContentStyle){
style[key] = custContentStyle[key];
}
return style; return style;
}, },
barStyle () { barStyle () {