修复退出应用不关闭浏览器,和删除主播的调用优化
This commit is contained in:
@@ -120,10 +120,10 @@
|
|||||||
<!-- 主播列表 -->
|
<!-- 主播列表 -->
|
||||||
<div class="flex-1 overflow-auto p-4">
|
<div class="flex-1 overflow-auto p-4">
|
||||||
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3">
|
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3">
|
||||||
<div v-for="host in filteredHosts" :key="host.anchorId" @click="toggleSelect(host.anchorId)"
|
<div v-for="host in filteredHosts" :key="host.id" @click="toggleSelect(host.id)"
|
||||||
:class="[
|
:class="[
|
||||||
'p-3 rounded-lg border cursor-pointer transition-all',
|
'p-3 rounded-lg border cursor-pointer transition-all',
|
||||||
selected.has(host.anchorId) ? 'border-blue-500 bg-blue-50 shadow' : 'border-gray-200 hover:border-gray-300 hover:shadow-sm'
|
selected.has(host.id) ? 'border-blue-500 bg-blue-50 shadow' : 'border-gray-200 hover:border-gray-300 hover:shadow-sm'
|
||||||
]">
|
]">
|
||||||
<div class="flex items-center justify-between mb-1">
|
<div class="flex items-center justify-between mb-1">
|
||||||
<span class="font-medium text-sm truncate flex-1" :title="host.anchorId">
|
<span class="font-medium text-sm truncate flex-1" :title="host.anchorId">
|
||||||
@@ -532,7 +532,7 @@ const toggleSelect = (id) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const selectAll = () => {
|
const selectAll = () => {
|
||||||
selected.value = new Set(filteredHosts.value.map(h => h.anchorId))
|
selected.value = new Set(filteredHosts.value.map(h => h.id))
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectNone = () => {
|
const selectNone = () => {
|
||||||
@@ -550,7 +550,7 @@ const invertSelect = () => {
|
|||||||
const deleteSelected = async () => {
|
const deleteSelected = async () => {
|
||||||
if (!selected.value.size) return
|
if (!selected.value.size) return
|
||||||
if (!confirm(`确认删除选中的 ${selected.value.size} 项吗?`)) return
|
if (!confirm(`确认删除选中的 ${selected.value.size} 项吗?`)) return
|
||||||
|
console.log(selected.value)
|
||||||
if (isElectron()) {
|
if (isElectron()) {
|
||||||
try {
|
try {
|
||||||
const ids = Array.from(selected.value)
|
const ids = Array.from(selected.value)
|
||||||
|
|||||||
Reference in New Issue
Block a user