chore: 添加导航链接类型定义信息
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
"exclude": [],
|
"exclude": [],
|
||||||
"include": [
|
"include": [
|
||||||
"package.json",
|
"package.json",
|
||||||
|
"public/nav-links.js",
|
||||||
"src/**/*.js",
|
"src/**/*.js",
|
||||||
"src/**/*.vue",
|
"src/**/*.vue",
|
||||||
"types/env.d.ts",
|
"types/env.d.ts",
|
||||||
|
24
types/web.d.ts
vendored
24
types/web.d.ts
vendored
@@ -9,8 +9,32 @@ import type {
|
|||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
|
||||||
|
/** 导航链接项 */
|
||||||
|
interface NavLinkItem {
|
||||||
|
/** 链接分类标题 / 链接项标题 */
|
||||||
|
title: string;
|
||||||
|
/** 子链接列表 */
|
||||||
|
children?: NavLinkItem[];
|
||||||
|
/** 链接项更新日期 */
|
||||||
|
date?: string,
|
||||||
|
/** 链接项简介 */
|
||||||
|
desc?: string;
|
||||||
|
/** 链接分类图标 class */
|
||||||
|
icon?: string;
|
||||||
|
/** 链接是否已失效 */
|
||||||
|
isInvalid?: boolean;
|
||||||
|
/** 是否只显示详情,不跳转 */
|
||||||
|
showOnly?: boolean;
|
||||||
|
/** 链接项 URL */
|
||||||
|
url?: string;
|
||||||
|
};
|
||||||
|
|
||||||
// window
|
// window
|
||||||
interface Window {
|
interface Window {
|
||||||
|
|
||||||
|
/** 导航链接列表 */
|
||||||
|
NAV_LINK_LIST: NavLinkItem[];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Vue
|
// Vue
|
||||||
|
Reference in New Issue
Block a user