Skip to content

Commit

Permalink
尝试优化banlist
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaojianli committed Nov 18, 2024
1 parent 25c3a93 commit b091f16
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions webui/src/views/banlist/components/banList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
<a-list
ref="banlist"
:virtual-list-props="{
height: virtualListHeight
height: virtualListHeight,
fixedSize: true,
buffer: 10
}"
:scrollbar="false"
:scrollbar="true"
:data="list"
@reach-bottom="loadMore"
>
Expand Down Expand Up @@ -44,15 +46,15 @@
</template>

<script setup lang="ts">
import { useRequest } from 'vue-request'
import { computed, onMounted, ref, watch } from 'vue'
import type { BanList } from '@/api/model/banlist'
import { getBanList } from '@/service/banList'
import { useAutoUpdatePlugin } from '@/stores/autoUpdate'
import { useEndpointStore } from '@/stores/endpoint'
import { getBanList } from '@/service/banList'
import type { BanList } from '@/api/model/banlist'
import { useI18n } from 'vue-i18n'
import { useResponsiveState } from '@arco-design/web-vue/es/grid/hook/use-responsive-state'
import { useWindowSize } from '@vueuse/core'
import { computed, onMounted, ref, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import { useRequest } from 'vue-request'
import banListItem from './banListItem.vue'
const { height } = useWindowSize()
Expand Down Expand Up @@ -136,12 +138,7 @@ const loadMore = async () => {
}
data.value = data.value.concat(newData)
}
setTimeout(
() => {
loadingMore.value = false
},
bottom.value ? 1000 : 0
)
loadingMore.value = false
}
watch(
Expand Down

0 comments on commit b091f16

Please sign in to comment.