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

首页返回功能 bug #34

Open
BadmasterY opened this issue Aug 29, 2020 · 7 comments
Open

首页返回功能 bug #34

BadmasterY opened this issue Aug 29, 2020 · 7 comments

Comments

@BadmasterY
Copy link

BadmasterY commented Aug 29, 2020

@wangyi7099 反馈一个 bug, 点击左上角标题, 请求地址错误。

Error:

点击返回目标地址: https://badmastery.github.io/relearn-webpack/

实际返回地址: https://badmastery.github.io/relearn-webpack/relearn-webpack/

在线地址及配置信息

项目在线地址: https://badmastery.github.io/relearn-webpack/

config.js:

base: '/relearn-webpack/'
@wangyi7099
Copy link
Member

base: '/relearn-webpack' 去掉最后的斜杠

@BadmasterY
Copy link
Author

@wangyi7099 bug 未解决

修改后 config.js:

base: '/relearn-webpack'

文档明确指出, 前后都需要 /

Error:

寻址路径异常:
image

@wangyi7099 wangyi7099 reopened this Aug 29, 2020
@wangyi7099
Copy link
Member

我看官方文档是这么配的,行,我再看看

@wangyi7099
Copy link
Member

你目前用的是哪个版本

@BadmasterY
Copy link
Author

@wangyi7099 0.2.7

image

@wangyi7099
Copy link
Member

wangyi7099 commented Aug 31, 2020

能不能提个pr修复下 感觉应该蛮好改

@BadmasterY
Copy link
Author

BadmasterY commented Aug 31, 2020

@wangyi7099 pr 我就不提了, 懒得一批, 哈哈哈哈哈

Error

问题在 Line: 188:
image

复原

设置 base: /relearn-webpack/, 但未设置 themeConfig.locales, 得到Line: 188, base === '/relearn-webpack/' ✔️

当前请求地址 http://localhost:3000/relearn-webpack/, antdLinkto 解析结果为 /relearn-webpack/relearn-webpack/:
image

解决方案

<Link id="site-logo" to="/">
...

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

2 participants