-
Notifications
You must be signed in to change notification settings - Fork 295
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
fix: multistage-menu #59
Conversation
b027219
to
fcdc9c0
Compare
@@ -1,7 +1,7 @@ | |||
<template> | |||
<router-view> | |||
<template #default> | |||
<router-view v-slot="{ Component, route }"> | |||
<template #default="{ Component: ParentComponent }"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kirazxyun 不确定这样是否可行,但简单测试顶层菜单情况,二级菜单情况可以正常显示(有时会路由变化了,但是组件没更新出来,Workplace, DataAnalysis 这两个,把 keep-alive 注释掉也是这种情况,不知道什么问题了)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kirazxyun 你好,这块要怎么处理?,目前还是有问题的 🧐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hehehai 此处路由多个嵌套那个问题是为了防止页面缓存失效。后续优化打算进行层级扁平。如果是个人项目根据需要进行处理哈。
: ``; | ||
const r = ( | ||
? () => h(compile(`<${element?.meta?.icon}/>`)) | ||
: undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里用了 undefined
,使用空字符串依然会出现占位
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使用 null 会更合理一些
8c3d786
to
f856250
Compare
@hehehai hihi。先感谢PR。一个PR里尽量只做一个功能点的增加或者一个问题的修复。路由多个嵌套那个问题是为了防止页面缓存失效。麻烦进行一下PR拆分哈。 |
@sHow8e 😵 我分开的时候,你们让我合成一个,合成一个,你们让我分开 😳 真难 |
@hehehai 抱歉哈。可能是因为信息不同步。是这样的。因为要做更新日志和issue关联。拆开后会好一点。感谢。有问题可以进入我们飞书群一起交流讨论哈。 |
@sHow8e 好吧,这样处理你看行不行
你觉得呢? |
@hehehai page-layout可以先不用修改。我先确认一下解决方案哈。你可以把menu和tab-bar的修改分开提交就行。3q |
@sHow8e 这里修改 page-layout 的原因就是,当有独立的顶层菜单的问题,路由页面不会展示 |
@hehehai 我晓得了。如果修改的话和页面缓存功能就互斥了。估计要底层处理一下。那你带上吧。后续我再一起处理一下。3q |
f856250
to
b548eaa
Compare
Types of changes
Background and context
Solution
多层菜单的渲染,分为 独立菜单,父级菜单 ,需要先判断菜单类型再进行嵌套
How is the change tested?
Changelog
Checklist:
feature
branch and others should be submitted tomaster
branch)Other information