clear unused imports

This commit is contained in:
Megghy
2023-12-19 10:41:04 +08:00
parent 89911c7ad2
commit 283f3e11f4
46 changed files with 330 additions and 514 deletions

View File

@@ -1,43 +1,43 @@
<!-- eslint-disable vue/no-mutating-props -->
<script setup lang="ts">
import { onMounted, h, computed, nextTick, watch, ref } from 'vue'
import { useAccount } from '@/api/account'
import { DanmakuModel, EventDataTypes, ResponseLiveInfoModel } from '@/api/api-models'
import DanmakuItem from '@/components/DanmakuItem.vue'
import { GetString } from '@/data/DanmakuExport'
import router from '@/router'
import { Info12Filled, Money20Regular, Money24Regular, Search24Filled, Wrench24Filled } from '@vicons/fluent'
import { useDebounceFn, useLocalStorage, useWindowSize } from '@vueuse/core'
import { saveAs } from 'file-saver'
import { List } from 'linqts'
import {
NSkeleton,
NAvatar,
NButton,
NCard,
NDivider,
NCheckbox,
NCheckboxGroup,
NModal,
NButton,
NPopover,
NIcon,
NInput,
NSpace,
NSwitch,
NInputNumber,
NCollapseTransition,
NTag,
NSpin,
NRadioGroup,
NList,
NListItem,
NAvatar,
NTooltip,
NRadioButton,
NCollapse,
NCollapseItem,
NCollapseTransition,
NDivider,
NIcon,
NInput,
NInputNumber,
NList,
NListItem,
NModal,
NPopover,
NRadioButton,
NRadioGroup,
NSkeleton,
NSpace,
NSpin,
NSwitch,
NTag,
NTooltip,
} from 'naive-ui'
import router from '@/router'
import { Search24Filled, Money20Regular, Wrench24Filled, Money24Regular, Info12Filled, Home24Filled } from '@vicons/fluent'
import { saveAs } from 'file-saver'
import { useLocalStorage, useWindowSize, useDebounceFn } from '@vueuse/core'
import { ResponseLiveInfoModel, DanmakuModel, EventDataTypes } from '@/api/api-models'
import { List } from 'linqts'
import { useAccount } from '@/api/account'
import { computed, nextTick, onMounted, ref, watch } from 'vue'
import LiveInfoContainer from './LiveInfoContainer.vue'
import { GetString } from '@/data/DanmakuExport'
import SimpleVirtualList from './SimpleVirtualList.vue'
import DanmakuItem from '@/components/DanmakuItem.vue'
enum RankType {
Danmaku,
@@ -117,7 +117,7 @@ watch(
() => showTools,
(newV, oldV) => {
innerShowTools.value = newV
}
},
)
const danmakuRef = computed(() => {
//不知道为啥不能直接watch
@@ -257,7 +257,7 @@ function Export() {
isExporting.value = true
saveAs(
new Blob([GetString(accountInfo.value, currentLive, onlyExportFilteredDanmakus.value ? danmakus.value : currentDanmakus, exportType.value)], { type: 'text/plain;charset=utf-8' }),
`${Date.now()}_${currentLive.startAt}_${currentLive.title.replace('_', '-')}_${accountInfo.value?.name}.${exportType.value}`
`${Date.now()}_${currentLive.startAt}_${currentLive.title.replace('_', '-')}_${accountInfo.value?.name}.${exportType.value}`,
)
isExporting.value = false
}

View File

@@ -1,8 +1,8 @@
<script setup lang="ts">
import { NButton, NDivider, NTooltip, NTag, NIcon, NCard } from 'naive-ui'
import { format } from 'date-fns'
import { Money24Regular, VehicleShip24Filled } from '@vicons/fluent'
import { AccountInfo, DanmakuModel, EventDataTypes } from '@/api/api-models'
import { Money24Regular, VehicleShip24Filled } from '@vicons/fluent'
import { format } from 'date-fns'
import { NButton, NCard, NDivider, NIcon, NTag, NTooltip } from 'naive-ui'
function GetSCColor(price: number): string {
if (price === 0) return `#2a60b2`

View File

@@ -1,17 +1,13 @@
<script setup lang="ts">
import { FormRules, NForm } from 'naive-ui';
import { FormRules, NForm } from 'naive-ui'
defineProps<{
rules: FormRules
rules: FormRules
}>()
function getItems() {
}
function getItems() {}
</script>
<template>
<NForm>
</NForm>
</template>
<NForm> </NForm>
</template>

View File

@@ -1,8 +1,7 @@
<script setup lang="ts">
import { EventDataTypes, ResponseLiveInfoModel } from '@/api/api-models'
import { ResponseLiveInfoModel } from '@/api/api-models'
import { Info24Filled } from '@vicons/fluent'
import { List } from 'linqts'
import { NPopover, NSpace, NStatistic, NTime, NDivider, NNumberAnimation, NTag, NButton, NTooltip, NIcon } from 'naive-ui'
import { NButton, NDivider, NIcon, NNumberAnimation, NPopover, NSpace, NStatistic, NTag, NTime, NTooltip } from 'naive-ui'
import { ref, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
@@ -25,7 +24,7 @@ watch(
() => live,
(newValue) => {
defaultDanmakusCount.value = newValue.danmakusCount
}
},
)
</script>

View File

@@ -1,31 +1,9 @@
<script setup lang="ts">
import { GetSelfAccount } from '@/api/account'
import { AccountInfo } from '@/api/api-models'
import { QueryGetAPI, QueryPostAPI } from '@/api/query'
import { ACCOUNT_API_URL, TURNSTILE_KEY } from '@/data/constants'
import { GetNotifactions } from '@/data/notifactions'
import { useLocalStorage } from '@vueuse/core'
import {
FormInst,
FormItemInst,
FormItemRule,
FormRules,
NAlert,
NButton,
NCard,
NCountdown,
NDivider,
NForm,
NFormItem,
NInput,
NSpace,
NSpin,
NTab,
NTabPane,
NTabs,
NTime,
useMessage,
} from 'naive-ui'
import { FormInst, FormItemInst, FormItemRule, FormRules, NAlert, NButton, NCard, NCountdown, NDivider, NForm, NFormItem, NInput, NSpace, NTabPane, NTabs, useMessage } from 'naive-ui'
import { ref } from 'vue'
import VueTurnstile from 'vue-turnstile'
@@ -130,7 +108,7 @@ function onRegisterButtonClick() {
email: registerModel.value.email,
password: registerModel.value.password,
},
[['Turnstile', token.value]]
[['Turnstile', token.value]],
)
.then((data) => {
if (data.code == 200) {

View File

@@ -29,7 +29,7 @@ function saveCompoent() {
saveAs(data, props.fileName + '.png')
},
'image/png',
1
1,
)
})
}

View File

@@ -1,10 +1,7 @@
<script setup lang="ts">
import { useWindowSize } from '@vueuse/core'
import { NGrid, NList, NListItem, NSpace, NCard, NEmpty, NGridItem, NText, NTime, NButton, NPopconfirm, NEllipsis, NBadge } from 'naive-ui'
import { ref } from 'vue'
import { ScheduleWeekInfo } from '@/api/api-models'
import { QueryGetAPI } from '@/api/query'
import { SCHEDULE_API_URL } from '@/data/constants'
import { useWindowSize } from '@vueuse/core'
import { NBadge, NButton, NCard, NEllipsis, NEmpty, NGrid, NGridItem, NList, NListItem, NPopconfirm, NSpace, NText, NTime } from 'naive-ui'
const { width } = useWindowSize()

View File

@@ -1,9 +1,9 @@
<script setup lang="ts">
import { VVirtualList } from 'vueuc'
import type { VirtualListInst } from 'vueuc'
import { NScrollbar } from 'naive-ui/es/_internal'
import type { ScrollbarInst } from 'naive-ui/es/_internal'
import { NScrollbar } from 'naive-ui/es/_internal'
import { computed, onMounted, ref, type PropType } from 'vue'
import type { VirtualListInst } from 'vueuc'
import { VVirtualList } from 'vueuc'
import type { ItemData } from 'vueuc/lib/virtual-list/src/type'
const scrollerInstRef = ref<ScrollbarInst | null>(null)

View File

@@ -1,8 +1,11 @@
<script setup lang="ts">
import { SongAuthorInfo, SongFrom, SongLanguage, SongsInfo, SongRequestOption } from '@/api/api-models'
import { SongFrom, SongLanguage, SongRequestOption, SongsInfo } from '@/api/api-models'
import { QueryGetAPI, QueryPostAPI } from '@/api/query'
import { SONG_API_URL } from '@/data/constants'
import { refDebounced, useDebounceFn, useLocalStorage } from '@vueuse/core'
import FiveSingIcon from '@/svgs/fivesing.svg'
import NeteaseIcon from '@/svgs/netease.svg'
import { Delete24Filled, Info24Filled, NotepadEdit20Filled, Play24Filled, SquareArrowForward24Filled } from '@vicons/fluent'
import { refDebounced, useLocalStorage } from '@vueuse/core'
import { List } from 'linqts'
import {
DataTableBaseColumn,
@@ -10,11 +13,9 @@ import {
DataTableRowKey,
FormInst,
FormRules,
NAvatar,
NButton,
NCard,
NCheckbox,
NCollapseTransition,
NDataTable,
NDivider,
NEllipsis,
@@ -36,10 +37,7 @@ import {
NTooltip,
useMessage,
} from 'naive-ui'
import { onMounted, h, ref, watch, computed, VNodeChild } from 'vue'
import { NotepadEdit20Filled, Delete24Filled, Play24Filled, SquareArrowForward24Filled, Info24Filled } from '@vicons/fluent'
import NeteaseIcon from '@/svgs/netease.svg'
import FiveSingIcon from '@/svgs/fivesing.svg'
import { VNodeChild, computed, h, onMounted, ref, watch } from 'vue'
import SongPlayer from './SongPlayer.vue'
const props = defineProps<{

View File

@@ -1,9 +1,9 @@
<script setup lang="ts">
import { SongsInfo, SongFrom } from '@/api/api-models'
import { SongFrom, SongsInfo } from '@/api/api-models'
import { QueryGetAPI } from '@/api/query'
import { SONG_API_URL } from '@/data/constants'
import { NEmpty } from 'naive-ui'
import { computed, ref, toRef, toRefs, watch } from 'vue'
import { computed, ref, toRef, watch } from 'vue'
import APlayer from 'vue3-aplayer'
const props = defineProps<{

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { VideoCollectTable } from '@/api/api-models'
import router from '@/router'
import { Clock24Filled, Clock24Regular, NumberRow24Regular } from '@vicons/fluent'
import { Clock24Regular, NumberRow24Regular } from '@vicons/fluent'
import { CountdownProps, NCard, NCountdown, NDivider, NEllipsis, NIcon, NSpace, NTag, NText, NTime, NTooltip } from 'naive-ui'
const props = defineProps<{