|
@@ -52,13 +52,21 @@ const drawIcon = async (url: string, name: string, item: any) => {
|
|
|
size.width = (maxSize / svgContent.height) * svgContent.width;
|
|
|
}
|
|
|
|
|
|
+ const color = {
|
|
|
+ fill: svgContent.paths[0]?.fill,
|
|
|
+ stroke: svgContent.paths[0]?.stroke,
|
|
|
+ };
|
|
|
+ if (!color.fill && !color.stroke) {
|
|
|
+ color.stroke = "#000000";
|
|
|
+ }
|
|
|
+
|
|
|
props.draw.enterDrawShape(
|
|
|
"icon",
|
|
|
{
|
|
|
url,
|
|
|
...size,
|
|
|
name,
|
|
|
- fill: "#000000",
|
|
|
+ ...color,
|
|
|
...(item.parse || {}),
|
|
|
},
|
|
|
true
|