-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(projects): fix:tab切换路由fullpath #78
Conversation
支持tab页切换路由参数保留 ISSUES CLOSED: soybeanjs#64
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/honghuangdc/soybean-admin/2PevLxNTeMvP7PiJ34hvKcxTPsWE |
@@ -9,6 +9,7 @@ export function getTabRouteByVueRoute(route: RouteRecordNormalized | RouteLocati | |||
name: route.name, | |||
path: route.path, | |||
meta: route.meta, | |||
fullPath: (<RouteLocationNormalizedLoaded>route).fullPath, |
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.
这里不要类型断言,参数route的类型需要重新定义
@@ -13,17 +13,9 @@ declare module 'vue' { | |||
IconAntDesignCloseOutlined: typeof import('~icons/ant-design/close-outlined')['default'] |
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.
components.d.ts这个文件不要修改
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.
不知道为啥变调了,提交的时候没注意...
const { routerPush } = useRouterPush(false); | ||
|
||
const isActive = this.activeTab === path; | ||
const isActive = this.activeTab === route.path; |
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.
这里会不会有个问题,如果是同一个页面,但是params或者query参数不一致,页面是如何显示在Tab上的
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.
应该是以fullpath为主,有参数和没参数的各起一个tab?
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.
这个还得用页面测试一下
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.
常用的业务场景就是查看一个表格的某行的详情信息,可以开不同的详情页面
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.
好的,我继续改一下。
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.
常用的业务场景就是查看一个表格的某行的详情信息,可以开不同的详情页面
那这里的设计是每个不一样的参数都起一个tab呢,还是同一个path就起一个tab
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.
不一样的参数不同tab
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.
我这两天会添加这个功能
支持tab页切换路由参数保留
ISSUES CLOSED: #64