umi
苗有趣
这个作者很懒,什么都没留下…
展开
-
dva中数据与props更新时机
dva中数据与props更新时机 //第一种写法【存在问题】 const demo (props)=>{ const tagPage = props.match.params.tagPage;// 直接从props中拿去路由上的参数 const { detail } = model// 从dva中取数据 useEffect(() => { console.log("tagPage",detail) //接口请求 }, [tagPage]); }原创 2021-04-28 11:04:58 · 452 阅读 · 1 评论 -
umi-手动路由配置
手动路由配置 在配置路由参数的过程中,对应的component文件要写children参数,否则只会匹配一级路由,子路由内容不展示 { path: '/topic-insight', title: '战役指数', component: '@/pages/topic-insight/rank/index', routes: [ { path: '/topic-insight/rank/index',原创 2021-03-23 20:35:30 · 597 阅读 · 1 评论