feat: bili播放优化

This commit is contained in:
algerkong
2025-09-20 16:40:45 +08:00
parent 93022691e2
commit 67370b9072
16 changed files with 590 additions and 182 deletions
@@ -19,8 +19,12 @@
</template>
<script setup lang="ts">
import { useI18n } from 'vue-i18n';
import type { IBilibiliSearchResult } from '@/types/bilibili';
const { t } = useI18n();
const props = defineProps<{
item: IBilibiliSearchResult;
}>();
@@ -39,7 +43,7 @@ const handleClick = () => {
const formatNumber = (num?: number) => {
if (!num) return '0';
if (num >= 10000) {
return `${(num / 10000).toFixed(1)}`;
return `${(num / 10000).toFixed(1)}${t('bilibili.player.num')}`;
}
return num.toString();
};