Explorar o código

ppt发布时 color会存在null情况

jwyu hai 1 ano
pai
achega
f0f1bcf755
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/views/ppt_manage/newVersion/utils/untils.js

+ 1 - 0
src/views/ppt_manage/newVersion/utils/untils.js

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