feat: add confirmation dialog before syncing documents

--bug=1062555 --user=刘瑞斌 【知识库】Web知识库文档列表,批量同步文档时,没有弹出提示框 https://www.tapd.cn/62980211/s/1783580
This commit is contained in:
CaptainB 2025-10-11 13:51:11 +08:00
parent abf57a9458
commit 8fb6b3bbbd

View File

@ -978,11 +978,19 @@ function syncMulDocument() {
arr.push(v.id)
}
})
loadSharedApi({ type: 'document', systemType: apiType.value })
.putMulSyncDocument(id, arr, loading)
MsgConfirm(t('views.document.sync.confirmTitle'), t('views.document.sync.confirmMessage1'), {
confirmButtonText: t('views.document.sync.label'),
confirmButtonClass: 'danger',
})
.then(() => {
MsgSuccess(t('views.document.sync.successMessage'))
getList()
loadSharedApi({type: 'document', systemType: apiType.value})
.putMulSyncDocument(id, arr, loading)
.then(() => {
MsgSuccess(t('views.document.sync.successMessage'))
getList()
})
})
.catch(() => {
})
}