|
|
@@ -1,23 +1,56 @@
|
|
|
-
|
|
|
-// 列表定义
|
|
|
+/**
|
|
|
+ * 页面模板:
|
|
|
+ * 列表定义
|
|
|
+ */
|
|
|
|
|
|
import type { HomeCommonCategoryBlockProps } from "../../common/CommonContent";
|
|
|
import type { CommonListPageProps } from "../../common/CommonListPage.vue";
|
|
|
import { CommonCategoryDynamicDataSerializedApi, type IHomeCommonCategoryDropdownDynamicData, type IHomeCommonCategoryDynamicData } from "../CommonCategoryDynamicData";
|
|
|
|
|
|
+/**
|
|
|
+ * 页面模板:列表定义
|
|
|
+ */
|
|
|
export interface IHomeCommonCategoryListDefine {
|
|
|
+ /**
|
|
|
+ * 列表类型
|
|
|
+ */
|
|
|
type: 'CommonList',
|
|
|
+ /**
|
|
|
+ * 列表属性定义
|
|
|
+ */
|
|
|
props: Omit<CommonListPageProps, 'load'|'tabs'> & {
|
|
|
+ /**
|
|
|
+ * 列表选项卡定义
|
|
|
+ */
|
|
|
tabs?: (IHomeCommonCategoryListTabDefine & {
|
|
|
text: string,
|
|
|
width?: number,
|
|
|
visible?: boolean,
|
|
|
detailsPage?: string,
|
|
|
})[],
|
|
|
+ /**
|
|
|
+ * 列表选项卡数据解决方法
|
|
|
+ */
|
|
|
dataSolve?: IHomeCommonCategoryListTabListDataSolve[],
|
|
|
+ /**
|
|
|
+ * 列表选项卡数据
|
|
|
+ */
|
|
|
data?: IHomeCommonCategoryDynamicData,
|
|
|
},
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 列表选项卡数据处理方法
|
|
|
+ * * none: 不处理
|
|
|
+ * * ich: 显示传承相关数据
|
|
|
+ * * common: 显示通用数据
|
|
|
+ * * date: 显示日期数据
|
|
|
+ */
|
|
|
+export type IHomeCommonCategoryListTabListDataSolve = 'none'|'ich'|'common'|'date';
|
|
|
+
|
|
|
+/**
|
|
|
+ * 列表选项卡下拉选择定义
|
|
|
+ */
|
|
|
export interface IHomeCommonCategoryListTabListDropdownDefine {
|
|
|
key: string,
|
|
|
text: string,
|
|
|
@@ -26,38 +59,121 @@ export interface IHomeCommonCategoryListTabListDropdownDefine {
|
|
|
addAll?: string,
|
|
|
data: IHomeCommonCategoryDropdownDynamicData,
|
|
|
}
|
|
|
-export type IHomeCommonCategoryListTabListDataSolve = 'none'|'ich'|'common'|'date';
|
|
|
+
|
|
|
+/**
|
|
|
+ * TAB定义 - 类型:列表
|
|
|
+ */
|
|
|
export interface IHomeCommonCategoryListTabListDefine {
|
|
|
type: 'list',
|
|
|
+ /**
|
|
|
+ * 列表选项卡数据
|
|
|
+ */
|
|
|
data: IHomeCommonCategoryDynamicData,
|
|
|
+ /**
|
|
|
+ * 列表选项卡下拉选择定义
|
|
|
+ */
|
|
|
dropdownDefines?: IHomeCommonCategoryListTabListDropdownDefine[],
|
|
|
+ /**
|
|
|
+ * 列表数据解决方法
|
|
|
+ */
|
|
|
dataSolve?: IHomeCommonCategoryListTabListDataSolve[],
|
|
|
}
|
|
|
+/**
|
|
|
+ * TAB定义 - 类型:跳转
|
|
|
+ */
|
|
|
export interface IHomeCommonCategoryListTabJumpDefine {
|
|
|
type: 'jump',
|
|
|
+ /**
|
|
|
+ * 跳转URL
|
|
|
+ */
|
|
|
url: string,
|
|
|
+ /**
|
|
|
+ * 跳转参数
|
|
|
+ */
|
|
|
params?: Record<string, any>,
|
|
|
}
|
|
|
+/**
|
|
|
+ * TAB定义 - 类型:嵌套子分类
|
|
|
+ */
|
|
|
export interface IHomeCommonCategoryListTabNestCategoryDefine {
|
|
|
type: 'nestCategory',
|
|
|
+ /**
|
|
|
+ * 嵌套子分类项定义
|
|
|
+ */
|
|
|
categorys: IHomeCommonCategoryListTabNestCategoryItemDefine[],
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * TAB定义 - 类型:嵌套子分类 - 子分类项定义
|
|
|
+ */
|
|
|
export interface IHomeCommonCategoryListTabNestCategoryItemDefine {
|
|
|
+ /**
|
|
|
+ * 是否可见
|
|
|
+ * @default true
|
|
|
+ */
|
|
|
visible?: boolean,
|
|
|
+ /**
|
|
|
+ * 子分类项文本
|
|
|
+ */
|
|
|
text: string,
|
|
|
+ /**
|
|
|
+ * 是否显示标题
|
|
|
+ * @default true
|
|
|
+ */
|
|
|
showTitle?: boolean,
|
|
|
+ /**
|
|
|
+ * 是否显示更多
|
|
|
+ * @default false
|
|
|
+ */
|
|
|
showMore?: boolean,
|
|
|
+ /**
|
|
|
+ * 更多文本
|
|
|
+ */
|
|
|
moreText?: string,
|
|
|
+ /**
|
|
|
+ * 子分类项的小列表显示类型
|
|
|
+ * @type CategoryDefine['type']
|
|
|
+ */
|
|
|
type: string,
|
|
|
+ /**
|
|
|
+ * 子分类项的更多列表显示类型
|
|
|
+ * 'image-large-2'|'image-large'|'article-common'|'article-character'|'simple-text'
|
|
|
+ */
|
|
|
itemType?: string,
|
|
|
+ /**
|
|
|
+ * 子分类项数据
|
|
|
+ */
|
|
|
data: IHomeCommonCategoryDynamicData,
|
|
|
+ /**
|
|
|
+ * 更多页面定义
|
|
|
+ */
|
|
|
morePage?: string|[string, Record<string, any>],
|
|
|
+ /**
|
|
|
+ * 详情页面定义
|
|
|
+ */
|
|
|
detailsPage?: string,
|
|
|
+ /**
|
|
|
+ * 子分类项数量
|
|
|
+ * @default 4
|
|
|
+ */
|
|
|
count?: number,
|
|
|
+ /**
|
|
|
+ * 子分类项数据解决方法
|
|
|
+ */
|
|
|
dataSolve?: IHomeCommonCategoryListTabListDataSolve[],
|
|
|
+ /**
|
|
|
+ * 子分类项参数
|
|
|
+ */
|
|
|
params?: Record<string, any>,
|
|
|
+ /**
|
|
|
+ * 子分类项如果是预设块,定义块的属性
|
|
|
+ */
|
|
|
blockProps?: any;
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * TAB定义 - 类型:列表、跳转、嵌套子分类
|
|
|
+ */
|
|
|
export type IHomeCommonCategoryListTabDefine = IHomeCommonCategoryListTabListDefine
|
|
|
| IHomeCommonCategoryListTabJumpDefine
|
|
|
| IHomeCommonCategoryListTabNestCategoryDefine;
|