mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 修复搜索后滚动加载问题(#1590)
This commit is contained in:
parent
889900fbab
commit
fd0f3e2b5a
|
|
@ -12,7 +12,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { ref, computed, watch } from 'vue'
|
||||
|
||||
defineOptions({ name: 'InfiniteScroll' })
|
||||
const props = defineProps({
|
||||
|
|
@ -47,6 +47,15 @@ const props = defineProps({
|
|||
const emit = defineEmits(['update:current_page', 'load'])
|
||||
const current = ref(props.current_page)
|
||||
|
||||
watch(
|
||||
() => props.current_page,
|
||||
(val) => {
|
||||
if (val === 1) {
|
||||
current.value = 1
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
const noMore = computed(
|
||||
() =>
|
||||
props.size > 0 && props.size === props.total && props.total > props.page_size && !props.loading
|
||||
|
|
|
|||
|
|
@ -223,9 +223,9 @@ function searchHandle() {
|
|||
if (user.userInfo) {
|
||||
localStorage.setItem(user.userInfo.id + 'application', selectUserId.value)
|
||||
}
|
||||
paginationConfig.total = 0
|
||||
paginationConfig.current_page = 1
|
||||
applicationList.value = []
|
||||
paginationConfig.current_page = 1
|
||||
paginationConfig.total = 0
|
||||
getList()
|
||||
}
|
||||
function getAccessToken(id: string) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue