diff --git a/src/components/hTable/hTable.ts b/src/components/hTable/hTable.ts
index 5738664..8902d36 100644
--- a/src/components/hTable/hTable.ts
+++ b/src/components/hTable/hTable.ts
@@ -286,24 +286,39 @@ export interface ConditionalModel {
}
/** 搜索条件 */
-export interface SearchConditions {
+export class SearchConditions {
+ /**
+ *
+ */
+ constructor() {
+ this.show = true;
+ this.showPage = true;
+ this.PageIndex = 0;
+ this.PageSize = 20;
+ this.OrderBy = "Id";
+ this.OrderByType = 1;
+ this.defaultConditions = [];
+ this.Conditions = [];
+ }
/** 是否显示搜索 */
- show: boolean;
+ show?: boolean;
+ /** 显示分页器 */
+ showPage?:boolean;
/** 当前页码 */
- PageIndex: number;
+ PageIndex?: number;
/** 每页大小 */
- PageSize: number;
+ PageSize?: number;
/** 排序字段 */
- OrderBy: string;
+ OrderBy?: string;
/**排序顺序
* @tips 0:升序 1:降序
* @默认 = 1
*/
OrderByType?: 0 | 1;
/** 默认查询条件 */
- defaultConditions: ConditionalModel[];
+ defaultConditions?: ConditionalModel[];
/** 查询条件 */
- Conditions: any[];
+ Conditions?: any[];
}
/** 表格配置 */
@@ -345,6 +360,9 @@ export function intTableData(tValue: TableConfig): TableConfig {
if (!tValue.pageData) tValue.pageData = { total: 0 };
if (tValue.operationTop === undefined) tValue.operationTop = true;
+ //分页查询配置
+ tValue.search= { ...new SearchConditions(), ...tValue.search };
+
// 处理 column 的属性
for (const key in tValue.column) {
tValue.column[key] = { ...new TableColumn(), ...tValue.column[key] };
diff --git a/src/components/hTable/index.vue b/src/components/hTable/index.vue
index a09887f..2cde35e 100644
--- a/src/components/hTable/index.vue
+++ b/src/components/hTable/index.vue
@@ -429,39 +429,6 @@ function fetchPagedData() {