diff --git a/src/pages/Article/index.tsx b/src/pages/Article/index.tsx index 0a8b96c..8cb27df 100644 --- a/src/pages/Article/index.tsx +++ b/src/pages/Article/index.tsx @@ -9,7 +9,7 @@ import { getTagListAPI } from '@/api/Tag' import { delArticleDataAPI, getArticleListAPI } from '@/api/Article'; import type { Tag as ArticleTag } from '@/types/app/tag'; import type { Cate } from '@/types/app/cate'; -import type { Article, FilterArticle, FilterForm } from '@/types/app/article'; +import type { Article, Config, FilterArticle, FilterForm } from '@/types/app/article'; import { useWebStore } from '@/stores'; @@ -104,6 +104,18 @@ const ArticlePage = () => { render: (data: string) => {data}, sorter: (a: Article, b: Article) => a.comment! - b.comment! }, + { + title: '状态', + dataIndex: 'config', + key: 'config', + align: 'center', + render: (config: Config) => ( + config.status === "default" && 正常 || + config.status === "no_home" && 不在首页显示 || + config.status === "hide" && 隐藏 || + config.password.trim().length && 文章加密 + ), + }, { title: '发布时间', dataIndex: 'createTime', diff --git a/src/types/app/article.d.ts b/src/types/app/article.d.ts index 312d307..a2af72c 100644 --- a/src/types/app/article.d.ts +++ b/src/types/app/article.d.ts @@ -1,12 +1,11 @@ import { Cate } from "./cate" import { Tag } from "./tag" -export type Status = "show" | "no_home" | "hide" +export type Status = "default" | "no_home" | "hide" export interface Config { id?: number, articleId?: number, - top: number, status: Status, password:string }