guy 7 years ago
parent
commit
0bcd43f35e
  1. 4
      bi/core.js
  2. 4
      docs/core.js
  3. 4
      src/core/func/function.js

4
bi/core.js

@ -16822,7 +16822,7 @@ BI.extend(BI.DOM, {
},
isColor: function (color) {
return this.isRGBColor(color) || this.isHexColor(color);
return color && (this.isRGBColor(color) || this.isHexColor(color));
},
isRGBColor: function (color) {
@ -16853,7 +16853,7 @@ BI.extend(BI.DOM, {
//获取对比颜色
getContrastColor: function (color) {
if (!color) {
if (!color || !this.isColor(color)) {
return "";
}
if (this.isDarkColor(color)) {

4
docs/core.js

@ -22840,7 +22840,7 @@ BI.extend(BI.DOM, {
},
isColor: function (color) {
return this.isRGBColor(color) || this.isHexColor(color);
return color && (this.isRGBColor(color) || this.isHexColor(color));
},
isRGBColor: function (color) {
@ -22871,7 +22871,7 @@ BI.extend(BI.DOM, {
//获取对比颜色
getContrastColor: function (color) {
if (!color) {
if (!color || !this.isColor(color)) {
return "";
}
if (this.isDarkColor(color)) {

4
src/core/func/function.js

@ -104,7 +104,7 @@ BI.extend(BI.DOM, {
},
isColor: function (color) {
return this.isRGBColor(color) || this.isHexColor(color);
return color && (this.isRGBColor(color) || this.isHexColor(color));
},
isRGBColor: function (color) {
@ -135,7 +135,7 @@ BI.extend(BI.DOM, {
//获取对比颜色
getContrastColor: function (color) {
if (!color) {
if (!color || !this.isColor(color)) {
return "";
}
if (this.isDarkColor(color)) {

Loading…
Cancel
Save