Git Product home page Git Product logo

Comments (3)

glmapper avatar glmapper commented on August 30, 2024

前端使用的是路由方式是 browserHistory ,原地刷新会导致 404 的问题, 官方文档的解决方案是 : https://pro.ant.design/docs/deploy-cn#%E4%BD%BF%E7%94%A8-spring-boot .
总结一下,有两种方式:

  1. 使用 hash 模式来做路由
  2. 添加一个 Controller 来处理

但是文档中没有给出方法 2 的具体代码, 比较好奇有没有什么优雅的方式来实现这个功能, 不知道蚂蚁内部的最佳实践是什么样的?

感谢关注 SOFADashboard !你可以直接针对这个问题进行 PR

from sofa-dashboard.

OrezzerO avatar OrezzerO commented on August 30, 2024

我不知道怎么做才来提问的 😃 ,打算用 'hash' 模式的话那很简单, 可 Ant design pro 的文档上说强烈建议使用 browserHistory 模式, 我又没有一种很优雅的方式实现这个功能, 这就让我很纠结了.

from sofa-dashboard.

glmapper avatar glmapper commented on August 30, 2024

我不知道怎么做才来提问的 😃 ,打算用 'hash' 模式的话那很简单, 可 Ant design pro 的文档上说强烈建议使用 browserHistory 模式, 我又没有一种很优雅的方式实现这个功能, 这就让我很纠结了.

OK,这个问题我尽快 FIX 掉,欢迎关注~

from sofa-dashboard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.