fix: correct index calculation in deleteHandle function in ParagraphList.vue

--bug=1058707 --user=刘瑞斌 【知识库】上传附件里的文档,在分段预览页面删除分段没有反应 https://www.tapd.cn/62980211/s/1730574
This commit is contained in:
CaptainB 2025-07-14 17:22:23 +08:00
parent fdc9f9eb0b
commit ce7afda73c

View File

@ -126,8 +126,6 @@ const updateContent = (data: any) => {
} }
const deleteHandle = (item: any, cIndex: number) => { const deleteHandle = (item: any, cIndex: number) => {
//
const actualIndex = cIndex + (page_size.value * (current_page.value - 1));
MsgConfirm( MsgConfirm(
`${t('views.paragraph.delete.confirmTitle')}${item.title || '-'} ?`, `${t('views.paragraph.delete.confirmTitle')}${item.title || '-'} ?`,
@ -139,7 +137,7 @@ const deleteHandle = (item: any, cIndex: number) => {
) )
.then(() => { .then(() => {
const new_value = [...props.modelValue] const new_value = [...props.modelValue]
new_value.splice(actualIndex, 1) new_value.splice(cIndex, 1)
emit('update:modelValue', new_value) emit('update:modelValue', new_value)
// //