mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 09:34:19 +08:00
chore(vue-router): add eslint and prettier (#26636)
This commit is contained in:
@ -1,13 +1,14 @@
|
||||
import { App } from 'vue';
|
||||
import type { App } from "vue";
|
||||
import {
|
||||
createRouter as createVueRouter,
|
||||
createWebHistory as createVueWebHistory,
|
||||
createWebHashHistory as createVueWebHashHistory,
|
||||
createMemoryHistory as createVueMemoryHistory
|
||||
} from 'vue-router';
|
||||
import { createIonRouter } from './router';
|
||||
import { createViewStacks } from './viewStacks';
|
||||
import { IonicVueRouterOptions } from './types';
|
||||
createMemoryHistory as createVueMemoryHistory,
|
||||
} from "vue-router";
|
||||
|
||||
import { createIonRouter } from "./router";
|
||||
import type { IonicVueRouterOptions } from "./types";
|
||||
import { createViewStacks } from "./viewStacks";
|
||||
|
||||
export const createRouter = (opts: IonicVueRouterOptions) => {
|
||||
const routerOptions = { ...opts };
|
||||
@ -19,8 +20,8 @@ export const createRouter = (opts: IonicVueRouterOptions) => {
|
||||
|
||||
const oldInstall = router.install.bind(router);
|
||||
router.install = (app: App) => {
|
||||
app.provide('navManager', ionRouter);
|
||||
app.provide('viewStacks', viewStacks);
|
||||
app.provide("navManager", ionRouter);
|
||||
app.provide("viewStacks", viewStacks);
|
||||
|
||||
oldInstall(app);
|
||||
};
|
||||
@ -29,8 +30,10 @@ export const createRouter = (opts: IonicVueRouterOptions) => {
|
||||
router.isReady = () => oldIsReady();
|
||||
|
||||
return router;
|
||||
}
|
||||
};
|
||||
|
||||
export const createWebHistory = (base?: string) => createVueWebHistory(base);
|
||||
export const createWebHashHistory = (base?: string) => createVueWebHashHistory(base);
|
||||
export const createMemoryHistory = (base?: string) => createVueMemoryHistory(base);
|
||||
export const createWebHashHistory = (base?: string) =>
|
||||
createVueWebHashHistory(base);
|
||||
export const createMemoryHistory = (base?: string) =>
|
||||
createVueMemoryHistory(base);
|
||||
|
Reference in New Issue
Block a user