mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix(Data Source): The pagination bar is not displaying correctly after clearing the search results.
This commit is contained in:
@@ -189,7 +189,9 @@ export class ChatInfo extends Chat {
|
||||
ds_type: string,
|
||||
datasource_name: string,
|
||||
datasource_exists: boolean,
|
||||
records: Array<ChatRecord>
|
||||
records: Array<ChatRecord>,
|
||||
recommended_question?: string | undefined,
|
||||
recommended_generate?: boolean | undefined
|
||||
)
|
||||
constructor(
|
||||
param1?: number | Chat,
|
||||
|
||||
@@ -465,6 +465,7 @@
|
||||
"import": "Import",
|
||||
"change_file": "Change file",
|
||||
"data_import_completed": "Data import completed",
|
||||
"notes_import_completed": "Import of notes complete",
|
||||
"imported_100_data": "Successfully imported {msg} data",
|
||||
"return_to_view": "Return to view",
|
||||
"continue_importing": "Continue importing",
|
||||
|
||||
@@ -465,6 +465,7 @@
|
||||
"import": "가져오기",
|
||||
"change_file": "파일 변경",
|
||||
"data_import_completed": "데이터 가져오기 완료",
|
||||
"notes_import_completed": "메모 가져오기 완료",
|
||||
"imported_100_data": "데이터 {msg}개를 성공적으로 가져왔습니다",
|
||||
"return_to_view": "돌아가서 보기",
|
||||
"continue_importing": "계속 가져오기",
|
||||
@@ -850,4 +851,4 @@
|
||||
"to_doc": "API 보기",
|
||||
"trigger_limit": "최대 {0}개의 API 키 생성 지원"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -466,6 +466,7 @@
|
||||
"import": "导入",
|
||||
"change_file": "更换文件",
|
||||
"data_import_completed": "数据导入完成",
|
||||
"notes_import_completed": "备注导入完成",
|
||||
"imported_100_data": "成功导入数据 {msg} 条",
|
||||
"return_to_view": "返回查看",
|
||||
"continue_importing": "继续导入",
|
||||
|
||||
@@ -53,7 +53,7 @@ async function getRecommendQuestions(articles_number: number) {
|
||||
if (res.recommended_config === 2) {
|
||||
questions.value = res.questions
|
||||
} else if (currentChat.value.recommended_generate) {
|
||||
questions.value = currentChat.value.recommended_question
|
||||
questions.value = currentChat.value.recommended_question as string
|
||||
} else {
|
||||
getRecommendQuestionsLLM(articles_number)
|
||||
}
|
||||
|
||||
@@ -107,9 +107,13 @@ const handleCurrentChange = (val: number) => {
|
||||
|
||||
const fieldListComputed = computed(() => {
|
||||
const { currentPage, pageSize } = pageInfo
|
||||
return fieldList.value
|
||||
.filter((ele: any) => ele.field_name.toLowerCase().includes(fieldName.value.toLowerCase()))
|
||||
.slice((currentPage - 1) * pageSize, currentPage * pageSize)
|
||||
return fieldListTotalComputed.value.slice((currentPage - 1) * pageSize, currentPage * pageSize)
|
||||
})
|
||||
|
||||
const fieldListTotalComputed = computed(() => {
|
||||
return fieldList.value.filter((ele: any) =>
|
||||
ele.field_name.toLowerCase().includes(fieldName.value.toLowerCase())
|
||||
)
|
||||
})
|
||||
|
||||
const init = (reset = false) => {
|
||||
@@ -319,7 +323,7 @@ const renderHeader = ({ column }: any) => {
|
||||
}
|
||||
const fieldNameSearch = debounce(() => {
|
||||
pageInfo.currentPage = 1
|
||||
pageInfo.total = fieldListComputed.value.length
|
||||
pageInfo.total = fieldListTotalComputed.value.length
|
||||
}, 100)
|
||||
const fieldName = ref('')
|
||||
const btnSelectClick = (val: any) => {
|
||||
|
||||
@@ -424,7 +424,8 @@ const onSuccess = (response: any) => {
|
||||
uploadLoading.value = false
|
||||
}
|
||||
|
||||
const onError = () => {
|
||||
const onError = (e: any) => {
|
||||
ElMessage.error(e.toString())
|
||||
uploadLoading.value = false
|
||||
}
|
||||
|
||||
|
||||
@@ -156,12 +156,12 @@ const customColorChange = (val: any) => {
|
||||
}
|
||||
|
||||
const setPageCustomColor = (val: any) => {
|
||||
const ele = document.querySelector('.ui-main') as HTMLElement
|
||||
const ele = document.querySelector('.left-preview') as HTMLElement
|
||||
setCurrentColor(val, ele)
|
||||
}
|
||||
|
||||
const setPageHeaderFontColor = (val: any) => {
|
||||
const ele = document.getElementsByClassName('ui-main')[0] as HTMLElement
|
||||
const ele = document.getElementsByClassName('left-preview')[0] as HTMLElement
|
||||
ele.style.setProperty('--ed-text-color-primary', val)
|
||||
}
|
||||
const resetSqlBotForm = (reset2Default?: boolean) => {
|
||||
|
||||
Reference in New Issue
Block a user