forked from b2894lxlx/tuanwei-admin
e210a9b4b7
- 新增 utils/manuscript-content.ts:格式判定、bytemd 转 HTML、纯文本转段落 - 编辑弹窗打开时把 markdown / 纯文本转成富文本,否则 wangEditor 会把 # 和 ** 当成正文, 保存一次就把原稿改坏 - 保存统一写 contentFormat: 'html' - 列表加「正文格式」列,非 HTML 的行显式标出来
42 lines
826 B
TypeScript
42 lines
826 B
TypeScript
import type { PageParam } from "@/api";
|
|
import { ReviewList } from "@/api/gxmu/reviewList/model";
|
|
|
|
/**
|
|
* 稿件
|
|
*/
|
|
export interface Manuscript {
|
|
//
|
|
id?: number;
|
|
//
|
|
title?: string;
|
|
// 正文(HTML,历史上可能是 markdown / 纯文本)
|
|
content?: string;
|
|
// 正文格式:html / markdown / text
|
|
contentFormat?: string;
|
|
//
|
|
cover?: string;
|
|
// 是否删除, 0否, 1是
|
|
deleted?: number;
|
|
// 租户id
|
|
tenantId?: number;
|
|
// 创建时间
|
|
createTime?: string;
|
|
// 修改时间
|
|
updateTime?: string;
|
|
//
|
|
userId?: number;
|
|
//
|
|
sortNumber?: number;
|
|
// 待审核
|
|
status?: string;
|
|
reviewList?: ReviewList[];
|
|
}
|
|
|
|
/**
|
|
* 稿件搜索条件
|
|
*/
|
|
export interface ManuscriptParam extends PageParam {
|
|
id?: number;
|
|
keywords?: string;
|
|
}
|