Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

icon支持本地图片 #585

Merged
merged 2 commits into from
Jul 22, 2020
Merged

icon支持本地图片 #585

merged 2 commits into from
Jul 22, 2020

Conversation

douxc
Copy link
Contributor

@douxc douxc commented Jul 21, 2020

当前的isUrl判断里只有网络图片才支持,添加一个新的判断,如果icon配置是一个图片也允许直接展示

@chenshuai2144
Copy link
Collaborator

抽一下 isimg好了

@codecov-commenter
Copy link

codecov-commenter commented Jul 21, 2020

Codecov Report

Merging #585 into master will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #585      +/-   ##
==========================================
- Coverage   65.22%   65.20%   -0.03%     
==========================================
  Files          34       34              
  Lines        1090     1092       +2     
  Branches      413      413              
==========================================
+ Hits          711      712       +1     
- Misses        376      377       +1     
  Partials        3        3              
Impacted Files Coverage Δ
src/SiderMenu/BaseMenu.tsx 72.95% <0.00%> (+0.62%) ⬆️
src/utils/utils.ts 37.34% <0.00%> (-0.93%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d3cd549...112d33f. Read the comment docs.

@chenshuai2144 chenshuai2144 merged commit 28fa344 into ant-design:master Jul 22, 2020
@joesdu
Copy link
Contributor

joesdu commented Jul 22, 2020

image
你这个正则没办法判断是否是本地图吧.虽然这两种链接用法没啥问题

@douxc
Copy link
Contributor Author

douxc commented Jul 28, 2020

image
你这个正则没办法判断是否是本地图吧.虽然这两种链接用法没啥问题

这边并不是判断是不是本地图片,只是判断了如果是个链接或者图片,就直接展示,否则会使用icon的方式处理

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants