|
|
@@ -48,9 +48,11 @@ function applyTitle(theme) {
|
|
|
let title = document.getElementsByClassName('rc-title')[0];
|
|
|
let styles = theme.title;
|
|
|
|
|
|
- if(title) {
|
|
|
+ if(title && title.offsetHeight > 0) {
|
|
|
for(let styleKey in styles) {
|
|
|
- title.style[styleKey] = styles[styleKey];
|
|
|
+ if(!title.style[styleKey]) {
|
|
|
+ title.style[styleKey] = styles[styleKey];
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -61,7 +63,9 @@ function applyLayout(theme) {
|
|
|
|
|
|
if(layout) {
|
|
|
for(let styleKey in styles) {
|
|
|
- layout.style[styleKey] = styles[styleKey];
|
|
|
+ if(!layout.style[styleKey]) {
|
|
|
+ layout.style[styleKey] = styles[styleKey];
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -78,13 +82,16 @@ function applyItems(theme) {
|
|
|
let item = items[i];
|
|
|
|
|
|
for(let styleKey in styles) {
|
|
|
- item.style[styleKey] = styles[styleKey];
|
|
|
+ if(!item.style[styleKey]) {
|
|
|
+ item.style[styleKey] = styles[styleKey];
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
function applyTable(theme) {
|
|
|
+ // table有换屏逻辑,这里不能处理
|
|
|
return;
|
|
|
}
|
|
|
|