提交 63060aee 编写于 作者: yubinCloud's avatar yubinCloud

将数据 interface 的定义统一存放于 models 中

上级 c9c8ff8b
/**
* 电子书
*/
export interface Ebook {
id: string;
name: string;
category1Id: string;
category2Id: string;
description: string;
cover: string;
docCount: number;
viewCount: number;
voteCount: number;
}
/**
* 电子书的查询表单类
*/
export interface EbookQueryForm {
name: string;
}
/**
* 电子书分类
*/
export interface Category {
id: string;
name: string;
parent: string;
sort: number;
}
/**
* 电子书分类的查询类
*/
export interface CategoryQueryForm {
name: string;
}
......@@ -93,17 +93,8 @@ import { defineComponent, onMounted, ref, UnwrapRef, reactive } from 'vue';
import axios from 'axios';
import { message } from 'ant-design-vue'
import { Tool } from "@/util/tool";
import { Category, CategoryQueryForm } from "@/models";
interface CategoryQueryForm {
name: string;
}
interface Category {
id: string;
name: string;
parent: string;
sort: number;
}
export default defineComponent({
name: 'AdminCategory',
......
......@@ -89,23 +89,8 @@
import { defineComponent, onMounted, ref, UnwrapRef, reactive } from 'vue';
import axios from 'axios';
import { message } from 'ant-design-vue'
import {Tool} from "@/util/tool";
interface Ebook {
id: string;
name: string;
category1Id: string;
category2Id: string;
description: string;
cover: string;
docCount: number;
viewCount: number;
voteCount: number;
}
interface EbookQueryForm {
name: string;
}
import { Tool } from "@/util/tool";
import { Ebook, EbookQueryForm } from "@/models"
export default defineComponent({
name: 'AdminEbook',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册