first commit
This commit is contained in:
27
resources/admin/types/Permission.ts
Normal file
27
resources/admin/types/Permission.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
export interface Permission {
|
||||
id: number
|
||||
|
||||
parent_id: number
|
||||
|
||||
title: string
|
||||
|
||||
type: number
|
||||
|
||||
icon: string
|
||||
|
||||
component: string
|
||||
|
||||
module: string
|
||||
|
||||
permission_mark: string
|
||||
|
||||
route: string
|
||||
|
||||
redirect: string
|
||||
|
||||
keepAlive: boolean
|
||||
|
||||
hidden: boolean
|
||||
|
||||
is_inner: boolean
|
||||
}
|
1
resources/admin/types/Role.ts
Normal file
1
resources/admin/types/Role.ts
Normal file
@@ -0,0 +1 @@
|
||||
export {}
|
22
resources/admin/types/User.ts
Normal file
22
resources/admin/types/User.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
// login user type
|
||||
|
||||
import { Permission } from './permission'
|
||||
|
||||
export interface User {
|
||||
id: number,
|
||||
|
||||
nickname: string,
|
||||
|
||||
avatar: string,
|
||||
|
||||
email: string,
|
||||
|
||||
status: number,
|
||||
|
||||
remember_token: string,
|
||||
|
||||
roles?: string[],
|
||||
|
||||
permissions?: Permission[]
|
||||
}
|
33
resources/admin/types/menu.ts
Normal file
33
resources/admin/types/menu.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { Component } from 'vue'
|
||||
import { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
export interface Meta {
|
||||
title: string
|
||||
|
||||
icon: string
|
||||
|
||||
roles?: string[]
|
||||
|
||||
cache?: boolean
|
||||
|
||||
hidden: boolean
|
||||
|
||||
keepalive?: boolean
|
||||
|
||||
is_inner?: boolean
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
export interface Menu extends Omit<RouteRecordRaw, 'meta'> {
|
||||
path: string
|
||||
|
||||
name: string
|
||||
|
||||
meta?: Meta
|
||||
|
||||
redirect?: string
|
||||
|
||||
component?: Component
|
||||
|
||||
children?: Menu[]
|
||||
}
|
7
resources/admin/types/responseData.ts
Normal file
7
resources/admin/types/responseData.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export default interface ResponseData{
|
||||
code: number;
|
||||
|
||||
message: string;
|
||||
|
||||
data: any
|
||||
}
|
15
resources/admin/types/router.ts
Normal file
15
resources/admin/types/router.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
export interface RouterMeta {
|
||||
icon: string,
|
||||
title: string,
|
||||
roles: string[]
|
||||
}
|
||||
|
||||
export interface RouterRecord {
|
||||
name: string;
|
||||
meta: RouterMeta;
|
||||
component?: string;
|
||||
children?: RouterRecord[];
|
||||
fullPath?: string;
|
||||
redirect: string
|
||||
}
|
Reference in New Issue
Block a user