mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
ts: add vue-router custom RouteMeta types
This commit is contained in:
parent
49cfe93a67
commit
144b276ff6
2 changed files with 15 additions and 8 deletions
11
app/overrides.d.ts
vendored
11
app/overrides.d.ts
vendored
|
@ -1,6 +1,17 @@
|
|||
import 'vue-router'
|
||||
|
||||
declare module 'vuex' {
|
||||
export * from 'vuex/types/index.d.ts'
|
||||
export * from 'vuex/types/helpers.d.ts'
|
||||
export * from 'vuex/types/logger.d.ts'
|
||||
export * from 'vuex/types/vue.d.ts'
|
||||
}
|
||||
|
||||
declare module 'vue-router' {
|
||||
interface RouteMeta {
|
||||
noAuth?: boolean
|
||||
routerParams?: string[]
|
||||
args: { trad?: string; param?: string }
|
||||
breadcrumb?: string[]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +1,14 @@
|
|||
/**
|
||||
* routes module.
|
||||
* @module router/routes
|
||||
*/
|
||||
|
||||
// Simple views are normally imported and will be included into the main webpack entry.
|
||||
// Others will be chunked by webpack so they can be lazy loaded.
|
||||
// Webpack chunk syntax is:
|
||||
// Others will be chunked so they can be lazy loaded:
|
||||
// `() => import('@/views/:ViewComponent.vue')`
|
||||
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
import HomeView from '@/views/HomeView.vue'
|
||||
import LoginView from '@/views/LoginView.vue'
|
||||
import ToolList from '@/views/tool/ToolList.vue'
|
||||
|
||||
const routes = [
|
||||
const routes: RouteRecordRaw[] = [
|
||||
{
|
||||
name: 'home',
|
||||
path: '/',
|
||||
|
|
Loading…
Reference in a new issue