小编sim*_*shi的帖子

ANTD:如何更改分页选择框中的文本

如何更改 ant design 分页选择内的文本?文档里没有解决办法

我需要将“页面”一词更改为其他内容: 在此输入图像描述

html javascript css reactjs antd

2
推荐指数
1
解决办法
2023
查看次数

如何防止iis默认未找到页面并显示自定义reactjs未找到页面

所以我有一个部署在 IIS 上的 React 应用程序,我正在使用 React 路由器,我的路由和它们的顺序都很好,一切都在开发模式下本地工作正常,

我的routes.js 文件返回这样的路由:

<Router history={history}>
    <Switch>
      {/* there are some other routes that are removed from here */}
      {/* token is the jwt token for user */}
      {!token && <Route path="/Home" component={HomePage} />}

      <Route path="/" exact>
        {!!token ? <Redirect to="/Dashboard" /> : <Redirect to="/Home" />}
      </Route>
      <Route path="*" exact component={FourOFour} />
    </Switch>
  </Router>
Run Code Online (Sandbox Code Playgroud)

我的“未找到页面”有一个 jsx 文件,它返回组件FourOFour

正如我所说,包括未找到页面在内的所有内容在我的计算机上的开发模式下都显示完全正常。但是当我在 IIS 上部署 React 应用程序时,我的自定义未找到页面不会显示,而是显示 IIS 的默认 404 页面,如何让 ISS 停止扰乱我的路由?

PS:我知道这是服务器的工作来处理 404 等错误,这是默认行为,我也尝试了一些我在网上找到的建议,但其中一些建议毁了一切,有些则不清楚是什么发生,

所以我希望得到 IIS …

iis configuration reactjs react-router react-router-dom

1
推荐指数
1
解决办法
2027
查看次数