登录增加验证码切换

This commit is contained in:
2026-04-06 22:17:50 +08:00
parent f556bdc09a
commit b0751cf45e
3 changed files with 148 additions and 84 deletions

View File

@@ -50,7 +50,7 @@ const visible = computed({
set: (val) => emit('update:modelValue', val)
})
const targetFolderId = ref(null)
const targetFolderId = ref(0)
// 树形配置
const treeProps = {
@@ -64,7 +64,7 @@ const folderTreeData = computed(() => {
// 根节点
const rootNodes = [
{
id: 'root',
id: 0,
name: '根目录',
children: []
}
@@ -90,20 +90,21 @@ const folderTreeData = computed(() => {
})
const handleConfirm = () => {
// targetFolderId = 0 表示根目录null 表示未选择
emit('confirm', targetFolderId.value)
visible.value = false
targetFolderId.value = null
targetFolderId.value = 0
}
const open = () => {
targetFolderId.value = null
targetFolderId.value = 0
visible.value = true
}
// 重置选中状态
watch(visible, (val) => {
if (!val) {
targetFolderId.value = null
targetFolderId.value = 0
}
})

View File

@@ -623,14 +623,8 @@ const handleBatchMove = async () => {
}
const handleConfirmBatchMove = async (targetFolderId) => {
// Handle target folder ID
let finalFolderId = null
if (targetFolderId === 'root' || targetFolderId === '' || targetFolderId === null || targetFolderId === undefined) {
finalFolderId = null
} else {
finalFolderId = targetFolderId
}
// targetFolderId = 0 表示根目录null 表示未选择(此时用 0 作为默认值)
let finalFolderId = (targetFolderId === null || targetFolderId === undefined) ? 0 : targetFolderId
let successCount = 0
let failCount = 0