add reset actions

This commit is contained in:
2023-10-28 14:54:50 +08:00
parent 670910cc87
commit 49bdea87f7
11 changed files with 364 additions and 46 deletions

View File

@@ -1,3 +1,49 @@
<script setup lang="ts">
import { useAccount } from '@/api/account'
import { VideoCollectTable } from '@/api/api-models'
import { QueryGetAPI } from '@/api/query'
import { VIDEO_COLLECT_API_URL } from '@/data/constants'
import { NCard, NDivider, NList, NListItem, NSpace, NSpin, useMessage } from 'naive-ui'
import { ref } from 'vue'
const accountInfo = useAccount()
const message = useMessage()
const videoTables = ref<VideoCollectTable[]>([])
const isLoading = ref(true)
function get() {
QueryGetAPI<VideoCollectTable[]>(VIDEO_COLLECT_API_URL + 'get-all')
.then((data) => {
if (data.code == 200) {
videoTables.value = data.data
} else {
message.error('获取失败: ' + data.message)
}
})
.catch((err) => {
console.error(err)
message.error('获取失败')
})
.finally(() => {
isLoading.value = false
})
}
</script>
<template>
开发中...
</template>
<NSpace> </NSpace>
<NDivider />
<NSpin :show="isLoading">
<NSpace justify="center">
<NList>
<NListItem>
<NCard size="small">
<template #header> </template>
</NCard>
</NListItem>
</NList>
</NSpace>
</NSpin>
</template>