优化 MediaCard 和 SearchSiteDialog 组件,移除全选功能并调整已选择站点的逻辑

This commit is contained in:
jxxghp
2025-04-04 09:39:04 +08:00
parent c5e62cc8e4
commit 7ae3e402cf
2 changed files with 7 additions and 11 deletions

View File

@@ -88,15 +88,6 @@ const searchMenuShow = ref(false)
// 选择站点对话框
const chooseSiteDialog = ref(false)
// 全选/全不选
function checkAllSitesorNot() {
if (selectedSites.value.length === allSites.value.length) {
selectedSites.value = []
} else {
selectedSites.value = allSites.value.map(item => item.id)
}
}
// 查询所有站点
async function querySites() {
try {
@@ -113,7 +104,6 @@ async function querySites() {
async function querySelectedSites() {
try {
const result: { [key: string]: any } = await api.get('system/setting/IndexerSites')
selectedSites.value = result.data?.value ?? []
} catch (error) {
console.log(error)