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.createFromIconfontCN方法会强制添加https: #12316

Closed
1 task
shaokr opened this issue Sep 19, 2018 · 2 comments
Closed
1 task

Icon.createFromIconfontCN方法会强制添加https: #12316

shaokr opened this issue Sep 19, 2018 · 2 comments
Assignees
Labels
good first issue help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request.

Comments

@shaokr
Copy link

shaokr commented Sep 19, 2018

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.9.2

Steps to reproduce

import { Icon } from 'antd';
let scriptUrl = ./icon/iconfont.js;
if (DEV) {
scriptUrl = '//at.alicdn.com/t/font_810467_0vb7rjfqkwzk.js';
}
export default Icon.createFromIconfontCN({
scriptUrl
});

What is expected?

可根据传入的scriptUrl判断自适应http或者https,
这样就可使用下载到本地或者其他cnd中无https服务的 iconfont.cn 项目

What is actually happening?

不管scriptUrl的值传什么都会添加https:

@ant-design-bot
Copy link
Contributor

Translation of this issue:


The ## Icon.createFromIconfontCN method will force the addition of https:

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.9.2

Steps to reproduce

Import { Icon } from 'antd';
Let scriptUrl = ./icon/iconfont.js;
If (DEV) {
  scriptUrl = '//at.alicdn.com/t/font_810467_0vb7rjfqkwzk.js';
}
Export default Icon.createFromIconfontCN({
  scriptUrl
});

What is expected?

Adaptive http or https can be judged based on the passed scriptUrl.
This allows you to use the iconfont.cn project downloaded to your local or other cnd without https service.

What is actually happening?

Add https regardless of the value of scriptUrl:

@afc163 afc163 added the help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. label Sep 19, 2018
@wizard-a
Copy link
Contributor

I want to solve this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request.
Projects
None yet
Development

No branches or pull requests

5 participants