mirror of
https://github.com/ZiuChen/ClipboardManager.git
synced 2025-06-10 16:54:28 +08:00
feat: 调整懒加载每次添加的条数GAP
This commit is contained in:
parent
069675f7c3
commit
2f90c19132
@ -24,7 +24,7 @@ import ClipFullData from '../cpns/ClipFullData.vue'
|
|||||||
import ClipSearch from '../cpns/ClipSearch.vue'
|
import ClipSearch from '../cpns/ClipSearch.vue'
|
||||||
import ClipSwitch from '../cpns/ClipSwitch.vue'
|
import ClipSwitch from '../cpns/ClipSwitch.vue'
|
||||||
|
|
||||||
const GAP = 10 // 懒加载 每次添加的条数
|
const GAP = 15 // 懒加载 每次添加的条数
|
||||||
const offset = ref(0) // 懒加载 偏移量
|
const offset = ref(0) // 懒加载 偏移量
|
||||||
const filterText = ref('') // 搜索框绑定值
|
const filterText = ref('') // 搜索框绑定值
|
||||||
const list = ref([]) // 全部数据
|
const list = ref([]) // 全部数据
|
||||||
@ -108,7 +108,10 @@ onMounted(() => {
|
|||||||
}, 500)
|
}, 500)
|
||||||
|
|
||||||
// 监听搜索框
|
// 监听搜索框
|
||||||
watch(filterText, (val) => updateShowList(activeTab.value))
|
watch(filterText, (val) => {
|
||||||
|
console.log(val)
|
||||||
|
updateShowList(activeTab.value)
|
||||||
|
})
|
||||||
|
|
||||||
// 列表懒加载
|
// 列表懒加载
|
||||||
document.addEventListener('scroll', (e) => {
|
document.addEventListener('scroll', (e) => {
|
||||||
@ -145,6 +148,7 @@ onMounted(() => {
|
|||||||
} else if (isSearch) {
|
} else if (isSearch) {
|
||||||
document.querySelector('input').focus()
|
document.querySelector('input').focus()
|
||||||
} else if (isExit) {
|
} else if (isExit) {
|
||||||
|
console.log('isExit')
|
||||||
filterText.value = ''
|
filterText.value = ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user