From 9a61e46d96536f3299e57f7259ae1c9972256ec6 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 30 九月 2025 09:42:09 +0800
Subject: [PATCH] 1. 隐藏未完成的账户匹配页面 2. 根据第三方新的接口文档修改接口url地址
---
src/components/table/FYTable.vue | 48 ++++++++++++++++++++++++------------------------
1 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/src/components/table/FYTable.vue b/src/components/table/FYTable.vue
index b759ee0..2590983 100644
--- a/src/components/table/FYTable.vue
+++ b/src/components/table/FYTable.vue
@@ -1,10 +1,10 @@
<template>
<el-row ref="searchRef">
<FYSearchBar @search="onSearch">
- <template #options>
+ <template #options v-if="$slots.options">
<slot name="options"></slot>
</template>
- <template #buttons>
+ <template #buttons v-if="$slots.buttons">
<slot name="buttons"></slot>
</template>
</FYSearchBar>
@@ -69,6 +69,7 @@
* 浣跨敤鏃堕渶瑕佸湪<slot #options>涓坊鍔犺嚜瀹氫箟鏌ヨ閫夐」锛屽湪<slot #table-column>涓坊鍔犺嚜瀹氫箟琛ㄦ牸鍒楋紝鍚屾椂瀹炵幇瑙﹀彂鍑芥暟search
*/
export default {
+ inject: ['contentMaxHeight'],
props: {
rowClassName: undefined,
cellClassName: Function || String,
@@ -88,6 +89,15 @@
totalCount: {
type: Number,
default: 0
+ },
+ defaultPageSize: {
+ type: Number,
+ default: 20
+ },
+ // 棰濆鐨勯珮搴︼紝鐢ㄤ簬璁$畻琛ㄦ牸楂樺害
+ extraHeight: {
+ type: Number,
+ default: 0
}
},
data() {
@@ -96,7 +106,7 @@
tableData: [],
total: 0,
currentPage: 1,
- pageSize: 20,
+ pageSize: this.defaultPageSize,
loading: false,
fontSize: 'default'
};
@@ -130,26 +140,16 @@
if (nValue != oValue) {
this.total = nValue;
}
- }
- },
- computed: {
- cTableHeight() {
- if (this.$refs.searchRef) {
- const h1 = this.$refs.searchRef.$el.offsetHeight;
- const h2 = this.$refs.paginationRef
- ? this.$refs.paginationRef.$el.offsetHeight
- : 0;
- const h3 = this.$refs.expandRef.$el.offsetHeight;
- const h4 = this.$refs.expand2Ref.offsetHeight;
-
- const h = h1 + h2 + h3 + h4;
- // return `calc(100vh - ${h1}px - ${h2}px - var(--el-main-padding) * 2 - var(--el-header-height))`;
- return `calc(100vh - ${h}px - 60px - var(--el-main-padding) * 2)`;
- } else {
- return '500';
+ },
+ extraHeight: {
+ handler(nValue, oValue) {
+ if (nValue != oValue) {
+ this.tableHeight = this.calcTableHeight();
+ }
}
}
},
+ computed: {},
methods: {
/**
* 琛ㄦ牸鏁版嵁鏌ヨ锛屼紶閫掍袱缁勫弬鏁帮紝鍒嗛〉淇℃伅鍜屽洖璋冨嚱鏁�
@@ -186,9 +186,9 @@
const h3 = this.$refs.expandRef.$el.offsetHeight;
const h4 = this.$refs.expand2Ref.offsetHeight;
- const h = h1 + h2 + h3 + h4;
- // return `calc(100vh - ${h1}px - ${h2}px - var(--el-main-padding) * 2 - var(--el-header-height))`;
- return `calc(100vh - ${h}px - 60px - var(--el-main-padding) * 2)`;
+ const h = h1 + h2 + h3 + h4 + this.extraHeight;
+ return this.contentMaxHeight.value - h + 'px';
+ // return `calc(100vh - ${h}px - 60px - var(--el-main-padding) * 2)`;
},
tableRowClassName({ row }) {
if (this.rowClassName) {
@@ -220,7 +220,7 @@
mounted() {
this.tableHeight = this.calcTableHeight();
this.onSearch();
- },
+ }
};
</script>
--
Gitblit v1.9.3