mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-30 21:00:43 +08:00
优化 MediaCard 和 SearchSiteDialog 组件,移除全选功能并调整已选择站点的逻辑
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { Site, Plugin, Subscribe } from '@/api/types'
|
||||
import { PropType } from 'vue'
|
||||
import { popScopeId, PropType } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
sites: {
|
||||
@@ -23,6 +23,12 @@ const siteFilter = ref('')
|
||||
// 已选择站点
|
||||
const selectedSites = ref<any[]>(props.selected || [])
|
||||
|
||||
watchEffect(() => {
|
||||
if (!selectedSites.value && props.selected){
|
||||
selectedSites.value = props.selected
|
||||
}
|
||||
})
|
||||
|
||||
// 全选/全不选按钮文字
|
||||
const checkAllText = computed(() => {
|
||||
return selectedSites.value.length < props.sites?.length ? '选择全部' : '取消全选'
|
||||
|
||||
Reference in New Issue
Block a user