增加网站管理功能
This commit is contained in:
1 parent
1224735aa8
commit
67e819c629
98 files changed
+8711
-2254
No files matched your search
@@ -53,6 +53,8 @@ export interface QuickLink {
|
||||
|
||||
/** 正文区块:详情页与单页共用同一套渲染器 */
|
||||
export type Block =
|
||||
/** 后端富文本正文(平台「文章管理」录入的 HTML),由 BlockRenderer 原样渲染 */
|
||||
| { type: "html"; html: string }
|
||||
| { type: "heading"; text: string; sub?: string }
|
||||
| { type: "paragraph"; text: string }
|
||||
| { type: "quote"; text: string; author?: string }
|
||||
@@ -69,8 +71,10 @@ export type Block =
|
||||
export interface ContentItem {
|
||||
slug: string;
|
||||
section: SectionKey;
|
||||
/** 分类 slug */
|
||||
/** 分类 slug(接入后端真实数据时为分类ID的字符串形式) */
|
||||
category: string;
|
||||
/** 分类展示名:后端数据直接带回,本地 mock 走 config/sections 查表 */
|
||||
categoryName?: string;
|
||||
title: string;
|
||||
subtitle: string;
|
||||
summary: string;
|
||||
@@ -79,6 +83,11 @@ export interface ContentItem {
|
||||
author?: string;
|
||||
tags?: string[];
|
||||
featured?: boolean;
|
||||
/**
|
||||
* 封面图完整地址。
|
||||
* 兜底链:文章封面 -> 所属分类的图片 -> 空(为空时按 tone 渲染渐变占位封面)
|
||||
*/
|
||||
image?: string;
|
||||
blocks: Block[];
|
||||
}
|
||||
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* 全局组件类型声明
|
||||
*
|
||||
* 与 main.ts 中 app.component(...) 的注册名保持一致,
|
||||
* 让模板里的 <SiteHeader /> / <SiteFooter /> 获得类型提示与跳转。
|
||||
* 新增全局组件时,两处都要补上。
|
||||
*/
|
||||
import type SiteHeader from "@/components/SiteHeader.vue";
|
||||
import type SiteFooter from "@/components/SiteFooter.vue";
|
||||
|
||||
declare module "vue" {
|
||||
export interface GlobalComponents {
|
||||
SiteHeader: typeof SiteHeader;
|
||||
SiteFooter: typeof SiteFooter;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user