Commit f67445e5692cb2ee5ca6703eee163347d1bf68ce
1 parent
d7cb02da
fix: data board list page add scroll bar
Showing
1 changed file
with
10 additions
and
3 deletions
@@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
30 | const dataBoardList = ref<DataBoardRecord[]>([]); | 30 | const dataBoardList = ref<DataBoardRecord[]>([]); |
31 | //分页相关 | 31 | //分页相关 |
32 | const page = ref(1); | 32 | const page = ref(1); |
33 | - const pageSize = ref(36); | 33 | + const pageSize = ref(10); |
34 | const total = ref(0); | 34 | const total = ref(0); |
35 | const paginationProp = ref({ | 35 | const paginationProp = ref({ |
36 | showSizeChanger: false, | 36 | showSizeChanger: false, |
@@ -46,9 +46,11 @@ | @@ -46,9 +46,11 @@ | ||
46 | function pageChange(p, pz) { | 46 | function pageChange(p, pz) { |
47 | page.value = p; | 47 | page.value = p; |
48 | pageSize.value = pz; | 48 | pageSize.value = pz; |
49 | + getDatasource(); | ||
49 | } | 50 | } |
50 | function pageSizeChange(_current, size) { | 51 | function pageSizeChange(_current, size) { |
51 | pageSize.value = size; | 52 | pageSize.value = size; |
53 | + getDatasource(); | ||
52 | } | 54 | } |
53 | 55 | ||
54 | const createShareUrl = (boardId: string, tenantId: string, name: string) => { | 56 | const createShareUrl = (boardId: string, tenantId: string, name: string) => { |
@@ -147,9 +149,14 @@ | @@ -147,9 +149,14 @@ | ||
147 | const listContainerHeight = | 149 | const listContainerHeight = |
148 | clientHeight - rect.top - paginationHeight - listContainerMarginBottom; | 150 | clientHeight - rect.top - paginationHeight - listContainerMarginBottom; |
149 | const listContainerEl = (unref(listEL).$el as HTMLElement).querySelector( | 151 | const listContainerEl = (unref(listEL).$el as HTMLElement).querySelector( |
150 | - '.ant-spin-nested-loading' | 152 | + '.ant-spin-container' |
151 | ) as HTMLElement; | 153 | ) as HTMLElement; |
152 | - listContainerEl && (listContainerEl.style.minHeight = listContainerHeight + 'px'); | 154 | + listContainerEl && |
155 | + // (listContainerEl.style.minHeight = listContainerHeight + 'px') && | ||
156 | + // (listContainerEl.style.maxHeight = listContainerHeight + 'px') && | ||
157 | + (listContainerEl.style.height = listContainerHeight + 'px') && | ||
158 | + (listContainerEl.style.overflowY = 'auto') && | ||
159 | + (listContainerEl.style.overflowX = 'hidden'); | ||
153 | }; | 160 | }; |
154 | 161 | ||
155 | onMounted(() => { | 162 | onMounted(() => { |