mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 01:52:19 +08:00
feat(vue): support for ion-tabs (#17678)
* Add ion-tabs support, QOL fixes * Fix @ionic/core version, rebuild core to include docs * Update router * Add support for IonTabsWillChange and IonTabsDidChange events * Update usage docs * Merge core and user provided click handlers in ion-tab-button * rename file to be consistent
This commit is contained in:

committed by
Mike Hartington

parent
439b10e10d
commit
ee7167512f
@ -3,6 +3,7 @@ import { PluginFunction } from 'vue';
|
||||
import { RouterArgs, VueWindow } from './interfaces';
|
||||
import IonVueRouter from './components/ion-vue-router.vue';
|
||||
import IonVueRouterTransitionless from './components/ion-vue-router-transitionless.vue';
|
||||
import { BackButtonEvent } from '@ionic/core';
|
||||
|
||||
const vueWindow = window as VueWindow;
|
||||
const inBrowser: boolean = typeof window !== 'undefined';
|
||||
@ -37,6 +38,13 @@ export default class Router extends _VueRouter {
|
||||
|
||||
// Extend the existing history object
|
||||
this.extendHistory();
|
||||
|
||||
// Listen to Ionic's back button event
|
||||
document.addEventListener('ionBackButton', (e: Event) => {
|
||||
(e as BackButtonEvent).detail.register(0, () => {
|
||||
this.back();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
extendHistory(): void {
|
||||
|
Reference in New Issue
Block a user