-
diff --git a/components/i/library/Create.vue b/components/i/library/Create.vue
index ef7e866..bfdc02d 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 71dd9c2..4f4ba68 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 d8dfd6b..99540da 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 9a491fb..03d01ac 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 8391d6b..a0ae204 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 b0c1f87..ab9b2d5 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 31e2578..fcb6c1a 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 96989c2..7f753ff 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 674af40..449218c 100644
--- a/pages/library/index.vue
+++ b/pages/library/index.vue
@@ -39,7 +39,7 @@