| | |
| | | } |
| | | } else { |
| | | btn.style = item.style || {} |
| | | if (btn.class !== item.class || btn.show !== item.show || !btn.style.color || item.focus) { |
| | | if (btn.show === 'icon') { |
| | | btn.style.color = color[btn.class] |
| | | btn.style.backgroundColor = 'transparent' |
| | | } else if (btn.class === 'default') { |
| | | btn.style.color = 'rgba(0, 0, 0, 0.65)' |
| | | btn.style.backgroundColor = '#fff' |
| | | btn.style.borderColor = '#d9d9d9' |
| | | } else if (btn.class.indexOf('border') > -1) { |
| | | let _c = btn.class.replace('border-', '') |
| | | btn.style.color = color[_c] |
| | | btn.style.backgroundColor = '#fff' |
| | | btn.style.borderColor = color[_c] |
| | | } else if (btn.class === 'gray') { |
| | | btn.style.color = 'rgba(0, 0, 0, 0.65)' |
| | | btn.style.backgroundColor = color[btn.class] |
| | | btn.style.borderColor = color[btn.class] |
| | | } else { |
| | | btn.style.color = '#ffffff' |
| | | btn.style.backgroundColor = color[btn.class] |
| | | btn.style.borderColor = color[btn.class] |
| | | if (btn.class) { |
| | | if (btn.class !== item.class || btn.show !== item.show || !btn.style.color || item.focus) { |
| | | if (btn.show === 'icon') { |
| | | btn.style.color = color[btn.class] |
| | | btn.style.backgroundColor = 'transparent' |
| | | } else if (btn.class === 'default') { |
| | | btn.style.color = 'rgba(0, 0, 0, 0.65)' |
| | | btn.style.backgroundColor = '#fff' |
| | | btn.style.borderColor = '#d9d9d9' |
| | | } else if (btn.class.indexOf('border') > -1) { |
| | | let _c = btn.class.replace('border-', '') |
| | | btn.style.color = color[_c] |
| | | btn.style.backgroundColor = '#fff' |
| | | btn.style.borderColor = color[_c] |
| | | } else if (btn.class === 'gray') { |
| | | btn.style.color = 'rgba(0, 0, 0, 0.65)' |
| | | btn.style.backgroundColor = color[btn.class] |
| | | btn.style.borderColor = color[btn.class] |
| | | } else { |
| | | btn.style.color = '#ffffff' |
| | | btn.style.backgroundColor = color[btn.class] |
| | | btn.style.borderColor = color[btn.class] |
| | | } |
| | | } |
| | | } |
| | | } |