Giter Club home page Giter Club logo

Comments (12)

javaLuo avatar javaLuo commented on June 9, 2024

没问题

from react-admin.

macroswang avatar macroswang commented on June 9, 2024

麻烦问问在哪儿做修改哟?

from react-admin.

javaLuo avatar javaLuo commented on June 9, 2024

现在还不能,得重新做的
有一个src/components/Bread组件
得把它改成支持Tab的形式

from react-admin.

macroswang avatar macroswang commented on June 9, 2024

好的。感谢

from react-admin.

javaLuo avatar javaLuo commented on June 9, 2024

hi,我更新了一下:
src/layouts/BasicLayout.tsx中,
打开第28行注释 和 第134~138行注释,并注释第132行普通面包屑导航, 就会变成Tab导航了:

import BreadTab from "@/components/BreadTab"; // Tab方式的导航

<BreadTab
     menus={props.userinfo.menus}
     location={props.location}
     history={props.history}
/>

from react-admin.

macroswang avatar macroswang commented on June 9, 2024

嗯嗯。我也做了一个,还是非常感谢,不过我觉得你的这个路由不合理呀

from react-admin.

javaLuo avatar javaLuo commented on June 9, 2024

哪里不合理呀..
可能我路由的匹配写得比较简单,一些复杂的情况没考虑

from react-admin.

macroswang avatar macroswang commented on June 9, 2024

主要是我切换tab的时候,每次都要重启加载数据,这样感觉会影响使用

from react-admin.

macroswang avatar macroswang commented on June 9, 2024

我发现如果不让在切换tab的时候不重新加载数据的话,改动还比较大!

from react-admin.

javaLuo avatar javaLuo commented on June 9, 2024

对啊,切换tab只是切换了路由
我懂你说的那种就得把页面放在Tab页里。
可以用这个缓存需要被缓存的页面:https://github.com/CJY0208/react-router-cache-route/blob/master/README_CN.md
我之前弄过,后来不记得为什么没了,有空我在弄一下吧。

from react-admin.

macroswang avatar macroswang commented on June 9, 2024

感谢感谢。你太给力了。。

from react-admin.

javaLuo avatar javaLuo commented on June 9, 2024

嘿,我加了react-router-cache-route
详见src/layouts/BasicLayout.tsx中的CacheRoute,

from react-admin.

Related Issues (19)

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.