init
This commit is contained in:
59
typescript-version/@layouts/types.ts
Normal file
59
typescript-version/@layouts/types.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
import type { RouteLocationRaw } from 'vue-router'
|
||||
|
||||
export interface AclProperties {
|
||||
action: string
|
||||
subject: string
|
||||
}
|
||||
|
||||
// 👉 Vertical nav section title
|
||||
export interface NavSectionTitle extends Partial<AclProperties> {
|
||||
heading: string
|
||||
}
|
||||
|
||||
// 👉 Vertical nav link
|
||||
declare type ATagTargetAttrValues = '_blank' | '_self' | '_parent' | '_top' | 'framename'
|
||||
declare type ATagRelAttrValues =
|
||||
| 'alternate'
|
||||
| 'author'
|
||||
| 'bookmark'
|
||||
| 'external'
|
||||
| 'help'
|
||||
| 'license'
|
||||
| 'next'
|
||||
| 'nofollow'
|
||||
| 'noopener'
|
||||
| 'noreferrer'
|
||||
| 'prev'
|
||||
| 'search'
|
||||
| 'tag'
|
||||
|
||||
export interface NavLinkProps {
|
||||
to?: RouteLocationRaw | string | null
|
||||
href?: string
|
||||
target?: ATagTargetAttrValues
|
||||
rel?: ATagRelAttrValues
|
||||
}
|
||||
|
||||
export interface NavLink extends NavLinkProps, Partial<AclProperties> {
|
||||
title: string
|
||||
icon?: unknown
|
||||
badgeContent?: string
|
||||
badgeClass?: string
|
||||
disable?: boolean
|
||||
}
|
||||
|
||||
// 👉 Vertical nav group
|
||||
export interface NavGroup extends Partial<AclProperties> {
|
||||
title: string
|
||||
icon?: unknown
|
||||
badgeContent?: string
|
||||
badgeClass?: string
|
||||
children: (NavLink | NavGroup)[]
|
||||
disable?: boolean
|
||||
}
|
||||
|
||||
// 👉 Components ========================
|
||||
export interface ThemeSwitcherTheme {
|
||||
name: string
|
||||
icon: string
|
||||
}
|
||||
Reference in New Issue
Block a user