Merge pull request #6322 from yangdan8/2.0_tabs-content添加自定义class和style

2.0 tabs的content添加自定义class和style
This commit is contained in:
debugIsFalse 2019-10-09 10:11:59 +08:00 committed by GitHub
commit b4955039da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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