refactor: replace lodash with lodash-es

This commit is contained in:
Aqr-K
2025-02-24 19:49:10 +08:00
parent 721d4f7685
commit 5618d87e58
10 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
import { DiscoverSource } from '@/api/types'
import MediaCardListView from '@/views/discover/MediaCardListView.vue'
import FormRender from '@/components/render/FormRender.vue'
import { cloneDeep, isNull } from 'lodash'
import { cloneDeep } from 'lodash-es'
// 输入参数
const props = defineProps<{
+1 -1
View File
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { debounce } from 'lodash'
import { debounce } from 'lodash-es'
import { useToast } from 'vue-toast-notification'
import api from '@/api'
import type { TransferHistory } from '@/api/types'
+2 -2
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import _ from 'lodash'
import { cloneDeepWith } from 'lodash-es'
import type { Context } from '@/api/types'
import TorrentCard from '@/components/cards/TorrentCard.vue'
@@ -259,7 +259,7 @@ function filterData() {
)
})
if (matchData.length > 0) {
const firstData = _.cloneDeepWith(matchData[0]) as SearchTorrent
const firstData = cloneDeepWith(matchData[0]) as SearchTorrent
if (matchData.length > 1) firstData.more = matchData.slice(1)
// 显示前20个,4行左右。