Merge pull request #6322 from yangdan8/2.0_tabs-content添加自定义class和style
2.0 tabs的content添加自定义class和style
This commit is contained in:
commit
b4955039da
1 changed files with 15 additions and 1 deletions
|
@ -100,6 +100,13 @@
|
||||||
name: {
|
name: {
|
||||||
type: String
|
type: String
|
||||||
},
|
},
|
||||||
|
custContentClass: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
custContentStyle: {
|
||||||
|
type: Object,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
@ -133,7 +140,8 @@
|
||||||
`${prefixCls}-content`,
|
`${prefixCls}-content`,
|
||||||
{
|
{
|
||||||
[`${prefixCls}-content-animated`]: this.animated
|
[`${prefixCls}-content-animated`]: this.animated
|
||||||
}
|
},
|
||||||
|
this.custContentClass
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
barClasses () {
|
barClasses () {
|
||||||
|
@ -154,6 +162,12 @@
|
||||||
transform: `translateX(${p}) translateZ(0px)`
|
transform: `translateX(${p}) translateZ(0px)`
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
const { custContentStyle } = this;
|
||||||
|
if (custContentStyle) {
|
||||||
|
for (const key in custContentStyle){
|
||||||
|
style[key] = custContentStyle[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
return style;
|
return style;
|
||||||
},
|
},
|
||||||
barStyle () {
|
barStyle () {
|
||||||
|
|
Loading…
Add table
Reference in a new issue