diff --git a/archive/Process.vue b/archive/Process.vue index c25229c5e452effc3eb4b79c41e40b69000008b5..15707350ea70fe6ad62459ce53eb01074c142c3b 100644 --- a/archive/Process.vue +++ b/archive/Process.vue @@ -74,6 +74,6 @@ watch(() => props.collapse, () => { handleCollapse(false) }, 500) } -}, { immediate: true}) +}, { immediate: true }) defineExpose({ handleCollapse }) diff --git a/archive/SearchHistory.vue b/archive/SearchHistory.vue index e120659d89735fdae22aa82df5dac863670bb2ef..b2f7d830787cb947abb5256d7700e5474caa3b37 100644 --- a/archive/SearchHistory.vue +++ b/archive/SearchHistory.vue @@ -87,7 +87,7 @@ \ No newline at end of file diff --git a/components/i/Confirm.vue b/components/i/Confirm.vue index 46c555c925befe26bb4ba7c69a021708f89c7ad0..cb1653a81b85258723867e27fe66da7d3959c931 100644 --- a/components/i/Confirm.vue +++ b/components/i/Confirm.vue @@ -32,7 +32,7 @@ defineProps({ default: false } }) -const emits = defineEmits(['success', 'cancel']) +const emits = defineEmits([ 'success', 'cancel' ]) function handleCancel () { emits('cancel') } diff --git a/components/i/Create.vue b/components/i/Create.vue index 209c1bec4a387333045505e60349343282845f15..52b444f42a9613b99cdcf397dcc62df05af49e54 100644 --- a/components/i/Create.vue +++ b/components/i/Create.vue @@ -17,7 +17,8 @@
-
-
diff --git a/components/i/library/Create.vue b/components/i/library/Create.vue index ef7e86635e895ea6553d90dcd78a353abcaf1877..bfdc02d1c05781ca34eb23daca9d61f98fa0ae3e 100644 --- a/components/i/library/Create.vue +++ b/components/i/library/Create.vue @@ -70,7 +70,7 @@ const { $closeLibraryCreate, $getCollection } = useLibraryStore() const { setOrUpdateCollection } = useCollectionRequest() const props = defineProps({ id: { - type: [String, Number], + type: [ String, Number ], default: '' } }) diff --git a/components/i/library/Edit.vue b/components/i/library/Edit.vue index 71dd9c24a18dab1e8f3e535e6fd5b7d7fdf732a8..4f4ba681db3034cc797aef7d6defe77e160d6528 100644 --- a/components/i/library/Edit.vue +++ b/components/i/library/Edit.vue @@ -4,7 +4,7 @@ diff --git a/components/i/search/RecommendQuestion.vue b/components/i/search/RecommendQuestion.vue index d8dfd6b3a0e944d4eb81c1eb49be4844a5ed02b6..99540da7660111b0e9062df9b0d14b7d834b00cc 100644 --- a/components/i/search/RecommendQuestion.vue +++ b/components/i/search/RecommendQuestion.vue @@ -26,7 +26,7 @@ defineProps({ default: () => [] } }) -const emits = defineEmits(['click']) +const emits = defineEmits([ 'click' ]) function handleClick(title) { emits('click', title) } diff --git a/components/i/search/Title.vue b/components/i/search/Title.vue index 9a491fb3b416ed6940faada373dd129e2a784bf8..03d01ac15a5975b5de4fb140ad33d730c0c1c224 100644 --- a/components/i/search/Title.vue +++ b/components/i/search/Title.vue @@ -12,7 +12,7 @@ const props = defineProps({ default: '' }, id: { - type: [String, Number], + type: [ String, Number ], default: '' } }) diff --git a/components/prose/Chart.global.vue b/components/prose/Chart.global.vue index 8391d6bd89b867091760fb1a0dcd0ca5c4050dee..a0ae2048b7fbb43615e79c51e84fda5832958ee0 100644 --- a/components/prose/Chart.global.vue +++ b/components/prose/Chart.global.vue @@ -45,8 +45,8 @@ function init () { datasets: props.data.map(item => { // item.backgroundColor = ['rgba(54, 162, 235, 0.2)', 'rgba(255, 99, 132, 0.2)', 'rgba(255, 159, 64, 0.2)', 'rgba(255, 205, 86, 0.2)', 'rgba(75, 192, 192, 0.2)', 'rgba(153, 102, 255, 0.2)', 'rgba(201, 203, 207, 0.2)'] // item.borderColor = ['rgb(54, 162, 235)', 'rgb(255, 99, 132)', 'rgb(255, 159, 64)', 'rgb(255, 205, 86)', 'rgb(75, 192, 192)', 'rgb(153, 102, 255)', 'rgb(201, 203, 207)'] - item.backgroundColor = ['rgba(54, 162, 235, 0.2)'] - item.borderColor = ['rgb(54, 162, 235)'] + item.backgroundColor = [ 'rgba(54, 162, 235, 0.2)' ] + item.borderColor = [ 'rgb(54, 162, 235)' ] item.borderWidth = 1 return item }) diff --git a/composables/useCollectionRequest.js b/composables/useCollectionRequest.js index b0c1f87f1990cd0efedb8e0843475b28e32e2b04..ab9b2d52478d65af0136914013ae2ff8e16a1715 100644 --- a/composables/useCollectionRequest.js +++ b/composables/useCollectionRequest.js @@ -9,7 +9,7 @@ export default () => { * description string * */ - const {data, error} = await useRequest('/v1/collection/merge', { + const { data, error } = await useRequest('/v1/collection/merge', { method: 'post', body }) @@ -17,7 +17,7 @@ export default () => { } // 删除收藏夹 const deleteCollection = async (collection_id) => { - const {data, error} = await useRequest(`/v1/collection/${collection_id}/remove`, { + const { data, error } = await useRequest(`/v1/collection/${collection_id}/remove`, { method: 'post' }) return { data, error } @@ -26,7 +26,7 @@ export default () => { const saveCollection = async (body) => { // collection_id number 收藏夹ID // c_id string 会话ID - const {data, error} = await useRequest(`/v1/collection/item/add`, { + const { data, error } = await useRequest('/v1/collection/item/add', { method: 'post', body }) @@ -34,7 +34,7 @@ export default () => { } // 查询收藏夹会话列表 const findCollection = async (collection_id) => { - const {data, error} = await useRequest(`/v1/collection/${collection_id}/items`) + const { data, error } = await useRequest(`/v1/collection/${collection_id}/items`) if (error.value) { return [] } @@ -42,7 +42,7 @@ export default () => { } // 删除收藏夹会话 const deleteCollectionRecord = async (collection_id, c_id) => { - const {data, error} = await useRequest(`/v1/collection/item/delete`, { + const { data, error } = await useRequest('/v1/collection/item/delete', { method: 'post', body: { collection_id, c_id } }) @@ -51,12 +51,12 @@ export default () => { } // 查询会话是否被收藏 const findRecordCollection = async (c_id) => { - const {data, error} = await useRequest(`/v1/collection/item/check/${c_id}`) + const { data, error } = await useRequest(`/v1/collection/item/check/${c_id}`) return { data, error } } const deleteThread = async (ids) => { - const {data, error} = await useRequest('/v1/chat/completion/remove', { + const { data, error } = await useRequest('/v1/chat/completion/remove', { method: 'post', body: ids }) diff --git a/composables/useRequestError.js b/composables/useRequestError.js index 31e25786c4153a5cc6a4b98a9303e84dda0a8077..fcb6c1a1631da90825f92d43799d572da5da8723 100644 --- a/composables/useRequestError.js +++ b/composables/useRequestError.js @@ -1,5 +1,5 @@ export default function (status, message) { - if (import.meta.client && [400, 401, 403].includes(status)) { + if (import.meta.client && [ 400, 401, 403 ].includes(status)) { // 全局弹提示 let title if (status === 400) title = message diff --git a/eslint.config.mjs b/eslint.config.mjs index 96989c2d217b6c7d575ce747ffeed422cd98bd8b..7f753ff8217b3adb9cc8dcde43995584ab519e00 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -3,7 +3,7 @@ import withNuxt from './.nuxt/eslint.config.mjs' export default withNuxt({ files: ['**/*.vue', '**/*.js'], - + ignores: ['node_modules/**'], rules: { 'semi': [0], 'vue/html-indent': ['off'], @@ -20,6 +20,6 @@ export default withNuxt({ // 关键字后面是否要空一格 'keyword-spacing': [2, { 'before': true, 'after': true }], // 强制最后一行空行 - 'no-multiple-empty-lines': ['error', { 'max': 2,'maxEOF': 1 }] + 'no-multiple-empty-lines': ['error', { 'max': 2, 'maxEOF': 1 }], } }) diff --git a/pages/library/index.vue b/pages/library/index.vue index 674af400c0d0981bdade1802ca2b29966f854a8c..449218c63192a72ee0430583773ef7de83920f8f 100644 --- a/pages/library/index.vue +++ b/pages/library/index.vue @@ -39,7 +39,7 @@