feat: add confirmation dialog before syncing documents

--bug=1062555 --user=刘瑞斌 【知识库】Web知识库文档列表,批量同步文档时,没有弹出提示框 https://www.tapd.cn/62980211/s/1783580
v3.2
CaptainB 2025-10-11 13:51:11 +08:00
parent abf57a9458
commit 8fb6b3bbbd
1 changed files with 12 additions and 4 deletions

View File

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