| | |
| | | |
| | | if (adapters.includes('wxmini')) { |
| | | config = this.getMiniStyle(config) |
| | | |
| | | if (config.statusBarbgColor && !config.statusBarHexColor && /^rgba/ig.test(config.statusBarbgColor)) { |
| | | let hexify = (color) => { |
| | | let values = color.replace(/rgba?\(/, '').replace(/\)/, '').replace(/[\s+]/g, '').split(',') |
| | | let a = parseFloat(values[3] || 1) |
| | | let r = Math.floor(a * parseInt(values[0]) + (1 - a) * 255) |
| | | let g = Math.floor(a * parseInt(values[1]) + (1 - a) * 255) |
| | | let b = Math.floor(a * parseInt(values[2]) + (1 - a) * 255) |
| | | |
| | | return '#' + ('0' + r.toString(16)).slice(-2) + ('0' + g.toString(16)).slice(-2) + ('0' + b.toString(16)).slice(-2) |
| | | } |
| | | config.statusBarHexColor = hexify(config.statusBarbgColor) |
| | | } |
| | | } |
| | | |
| | | let subMenus = this.getSubMenus() |