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

icon: {} 设置svg路径不能显示 #3

Closed
hxzpily2 opened this issue Nov 2, 2017 · 3 comments
Closed

icon: {} 设置svg路径不能显示 #3

hxzpily2 opened this issue Nov 2, 2017 · 3 comments

Comments

@hxzpily2
Copy link

hxzpily2 commented Nov 2, 2017

我想设置自定义的图标
但是
这种方法并没有显示出来,图标全都丢失了
icon: {
small: './icon/screen-small.svg',
full: './icon/screen-full.svg'
}

插入svg 内容的方法可行
icon: {
small: `


。。。。。。

@yandeqiang
Copy link
Contributor

路径设置, 目前只支持位图操作的。 你设置的这种方式, 应该把 svg 贴进去,而不是设置路径。
这么做的考虑是, 为了方便操作 svg 的颜色。如果是一张图的话, 就不容易操作了。
如果你非要使用这种方式的话, 可以设置 bitmap 为 true ,然后自己用 css background 设置路径就好了。

@huanshijie
Copy link

@yandeqiang 怎么把svg贴进去?

icon: {
    pause: <svg>...</svg>,
    plan: <svg>...</svg>,
}

这样?我在react中引入的时候好像不生效

@yandeqiang
Copy link
Contributor

字符串引入

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

3 participants