mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
fix(vue): switching between tabs preserves query string (#24297)
resolves #23699
This commit is contained in:
@ -113,9 +113,10 @@ export const IonTabBar = defineComponent({
|
||||
* land on /tabs/tab1/child instead of /tabs/tab1.
|
||||
*/
|
||||
if (activeTab !== prevActiveTab || (prevHref !== currentRoute.pathname)) {
|
||||
const search = (currentRoute.search !== undefined) ? `?${currentRoute.search}` : '';
|
||||
tabs[activeTab] = {
|
||||
...tabs[activeTab],
|
||||
currentHref: currentRoute.pathname + (currentRoute.search || '')
|
||||
currentHref: currentRoute.pathname + search
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user