fix: prevent loading state from triggering multiple requests in ParagraphList

--bug=1062188 --user=刘瑞斌 【知识库】上传文档时,分段完成后编辑分段内容,编辑没有生效,控制台报错 https://www.tapd.cn/62980211/s/1780667
v3.2
CaptainB 2025-09-28 18:41:44 +08:00
parent 942842e3a8
commit 54aa6218e0
1 changed files with 5 additions and 3 deletions

View File

@ -91,16 +91,18 @@ const paragraph_list = computed(() => {
}) })
const next = () => { const next = () => {
if (loading.value) return
loading.value = true loading.value = true
setTimeout(() => { setTimeout(() => {
current_page.value += 1
loading.value = false loading.value = false
}, 100) // UI }, 100)
} }
const editHandle = (item: any, cIndex: number) => { const editHandle = (item: any, cIndex: number) => {
// //
currentCIndex.value = cIndex + page_size.value * (current_page.value - 1) currentCIndex.value = cIndex
// currentCIndex.value = cIndex + page_size.value * (current_page.value - 1)
// console.log('Edit index:', cIndex, page_size.value, current_page.value, currentCIndex.value)
EditParagraphDialogRef.value.open(item) EditParagraphDialogRef.value.open(item)
} }