fix: 解决计划任务列表备份账号显示问题 (#4187)

Refs #4096
This commit is contained in:
ssongliu 2024-03-14 18:24:07 +08:00 committed by GitHub
parent 0f9b0d5d82
commit 17020ffe9f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -105,32 +105,35 @@
</el-table-column>
<el-table-column :min-width="80" :label="$t('setting.backupAccount')" prop="defaultDownload">
<template #default="{ row }">
<div v-for="(item, index) of row.backupAccounts?.split(',')" :key="index">
<div v-if="row.accountExpand || (!row.accountExpand && index < 3)">
<span v-if="row.backupAccounts">
<span>
{{ $t('setting.' + item) }}
<span v-if="!hasBackup(row.type)">-</span>
<div v-else>
<div v-for="(item, index) of row.backupAccounts?.split(',')" :key="index">
<div v-if="row.accountExpand || (!row.accountExpand && index < 3)">
<span v-if="row.backupAccounts">
<span>
{{ $t('setting.' + item) }}
</span>
<el-icon
size="12"
v-if="item === row.defaultDownload"
class="relative top-px left-1"
>
<Star />
</el-icon>
</span>
<el-icon
size="12"
v-if="item === row.defaultDownload"
class="relative top-px left-1"
>
<Star />
</el-icon>
</span>
<span v-else>-</span>
<span v-else>-</span>
</div>
</div>
<div v-if="!row.accountExpand && row.backupAccounts?.split(',').length > 3">
<el-button type="primary" link @click="row.accountExpand = true">
{{ $t('commons.button.expand') }}...
</el-button>
</div>
<div v-if="row.accountExpand && row.backupAccounts?.split(',').length > 3">
<el-button type="primary" link @click="row.accountExpand = false">
{{ $t('commons.button.collapse') }}
</el-button>
</div>
</div>
<div v-if="!row.accountExpand && row.backupAccounts?.split(',').length > 3">
<el-button type="primary" link @click="row.accountExpand = true">
{{ $t('commons.button.expand') }}...
</el-button>
</div>
<div v-if="row.accountExpand && row.backupAccounts?.split(',').length > 3">
<el-button type="primary" link @click="row.accountExpand = false">
{{ $t('commons.button.collapse') }}
</el-button>
</div>
</template>
</el-table-column>