|
@@ -500,6 +500,7 @@ export const caclShapeRealSize = (layer,shape)=>{
|
|
//将rgba转为hex+透明度的格式
|
|
//将rgba转为hex+透明度的格式
|
|
//rgba(91,155,213,0.44) -> {color: "#5b9bd5",transparency: 56}
|
|
//rgba(91,155,213,0.44) -> {color: "#5b9bd5",transparency: 56}
|
|
const parseRgbaColor = (color) => {
|
|
const parseRgbaColor = (color) => {
|
|
|
|
+ if(!color) color='rgba(51, 51, 51, 1)'
|
|
const arr = color.match(/(\d(\.\d+)?)+/g) || [];
|
|
const arr = color.match(/(\d(\.\d+)?)+/g) || [];
|
|
const res = arr.map((s) => parseInt(s, 10));
|
|
const res = arr.map((s) => parseInt(s, 10));
|
|
return {
|
|
return {
|