Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IconPark图标 颜色问题 #18

Open
yaoing opened this issue Jun 19, 2022 · 0 comments
Open

IconPark图标 颜色问题 #18

yaoing opened this issue Jun 19, 2022 · 0 comments

Comments

@yaoing
Copy link

yaoing commented Jun 19, 2022

您好, 最近在使用字节提供的IconPark图标, 也支持js的导入方式. 但是导入图标后, 发现color和colors参数只能改变填充颜色, 无法修改图标的描边颜色(一直都是黑色的),

image

以下是图标对应的xml代码:

svgXml = '''
          <svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg">
            <path
              fill-opacity=".01"
              fill="''' + getColor(0, color, colors, '#fff') + '''"
              d="M0 0h48v48H0z"
            />
            <path
              stroke-linejoin="round"
              stroke-width="4"
              stroke="currentColor"
              d="M10 6a2 2 0 0 1 2-2h28a2 2 0 0 1 2 2v36a2 2 0 0 1-2 2H12a2 2 0 0 1-2-2V6Z"
              data-follow-stroke="currentColor"
              fill="''' + getColor(1, color, colors, '#333333') + '''"
            />
            <path
              stroke-linejoin="round"
              stroke-linecap="round"
              stroke-width="4"
              stroke="currentColor"
              d="M34 6v36M6 14h8M6 24h8M6 34h8M27 4h12M27 44h12"
              data-follow-stroke="currentColor"
              fill="''' + getColor(2, color, colors, '#333333') + '''"
            />
          </svg>
        ''';
        break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant