From 4ac0163ef2a2b95fad51149f5624c6d601c953c8 Mon Sep 17 00:00:00 2001 From: Aresn Date: Fri, 31 May 2024 09:58:54 +0800 Subject: [PATCH] update Library --- components/i/library/thread.vue | 6 +----- ...{useThemeRequest.js => useLibraryRequest.js} | 8 +++----- pages/library/index.vue | 17 ++++++++--------- 3 files changed, 12 insertions(+), 19 deletions(-) rename composables/{useThemeRequest.js => useLibraryRequest.js} (67%) diff --git a/components/i/library/thread.vue b/components/i/library/thread.vue index 0fea51d..e5a5f70 100644 --- a/components/i/library/thread.vue +++ b/components/i/library/thread.vue @@ -13,7 +13,7 @@
- {{formatTime}} + {{ useTime(item.create_time) }}
@@ -50,8 +50,4 @@ const props = defineProps({ function handleOpenSelect (id) { $openLibrarySelect(id) } -const formatTime = computed(() => { - return useTime(props.item.create_time) -}) - \ No newline at end of file diff --git a/composables/useThemeRequest.js b/composables/useLibraryRequest.js similarity index 67% rename from composables/useThemeRequest.js rename to composables/useLibraryRequest.js index 734edef..d3cf64e 100644 --- a/composables/useThemeRequest.js +++ b/composables/useLibraryRequest.js @@ -1,15 +1,13 @@ export default () => { // 查询主题列表 - const getThemeList = async () => { - const { data, error } = await useRequest('/v1/chat/completion/list', { - method: 'get' - }) + const getThreadsList = async () => { + const { data, error } = await useRequest('/v1/chat/completion/list') if (error.value) { return [] } return data.value.data || [] } return { - getThemeList + getThreadsList } } \ No newline at end of file diff --git a/pages/library/index.vue b/pages/library/index.vue index 805d287..e35a808 100644 --- a/pages/library/index.vue +++ b/pages/library/index.vue @@ -6,7 +6,7 @@
@@ -28,6 +28,7 @@
@@ -38,7 +39,7 @@ -- GitLab