zhontai 2 lat temu
rodzic
commit
2b656e8650
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/components/svgIcon/index.vue

+ 1 - 1
src/components/svgIcon/index.vue

@@ -57,7 +57,7 @@ const setIconImgOutStyle = computed(() => {
 const setIconSvgInsStyle = computed(() => {
   const filterStyle: string[] = []
   const compatibles: string[] = ['-webkit', '-ms', '-o', '-moz']
-  const color = props.color ? props.color : 'currentColor'
+  const color = props.color === '' || props.color ? props.color : 'currentColor'
   compatibles.forEach((j) => filterStyle.push(`${j}-filter: drop-shadow(${color} ${props.size}px 0);`))
   return `width: ${props.size}px;height: ${props.size}px;` + (color ? `position: relative;left: -${props.size}px;${filterStyle.join('')}` : '')
 })