Skip to content

Commit

Permalink
fix: 筛选出现的bug #28
Browse files Browse the repository at this point in the history
  • Loading branch information
thofx committed Aug 31, 2023
1 parent 6fc3228 commit 2351ec7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"@iconify/vue": "4.1.1",
"@intlify/unplugin-vue-i18n": "^0.10.0",
"@tailwindcss/aspect-ratio": "^0.4.2",
"@types/lodash": "^4.14.197",
"@types/node": "^20.1.4",
"@types/webfontloader": "^1.6.34",
"@typescript-eslint/eslint-plugin": "^5.59.5",
Expand Down Expand Up @@ -96,4 +97,4 @@
"resolutions": {
"postcss": "8"
}
}
}
5 changes: 3 additions & 2 deletions src/views/discover/TorrentCardListView.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts" setup>
import { ref } from 'vue'
import _ from 'lodash'
import api from '@/api'
import type { Context } from '@/api/types'
import TorrentCard from '@/components/cards/TorrentCard.vue'
Expand Down Expand Up @@ -111,7 +112,7 @@ watchEffect(() => {
)
})
if (matchData.length > 0) {
const firstData = matchData[0] as SearchTorrent
const firstData = _.cloneDeepWith(matchData[0]) as SearchTorrent
if (matchData.length > 1)
firstData.more = matchData.slice(1)
Expand Down Expand Up @@ -312,7 +313,7 @@ onMounted(initData)
<span>{{ progressText }}</span>
</div>
<div v-if="dataList.length > 0" class="grid gap-3 grid-torrent-card items-start">
<TorrentCard v-for="data in dataList" :key="`${data.torrent_info.title}_${data.torrent_info.site}`" :torrent="data" :more="data.more" />
<TorrentCard v-for="data in dataList" :key="`${data.torrent_info.title}_${data.torrent_info.site_name}_${data.torrent_info.page_url}`" :torrent="data" :more="data.more" />
</div>
<NoDataFound
v-if="dataList.length === 0 && isRefreshed"
Expand Down

0 comments on commit 2351ec7

Please sign in to comment.