Mui v3.7.2 "Uncaught Error: 元素背景颜色必须为RGBA" BUG解决方法
BUG错误信息"Uncaught Error: 元素背景颜色必须为RGBA" /js/mui.js (8089)
解决方法:改mui.js
搜索
var rgbaRegex = /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d*(?:\.\d+)?)\)$/;
var getColor = function(colorStr) {
var matches = colorStr.match(rgbaRegex);
if (matches && matches.length === 5) {
return [
matches,
matches,
matches,
matches
];
}
改为:
var rgbaRegex = /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d*(?:\.\d+)?)\)$/;
var rgbRegex = /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/;
var getColor = function(colorStr) {
var matches = colorStr.match(rgbaRegex);
var matches1 = colorStr.match(rgbRegex);
console.log(matches1);
if (matches && matches.length === 5) {
return [
matches,
matches,
matches,
matches
];
} else if(matches1 && matches1.length === 4) {
return [
matches1,
matches1,
matches1,
1.0
];
}
return [];
};
错误解决
页:
[1]