Skip to content

Commit 2d0fbe2

Browse files
committed
feat(System Settings): Search logic changed
1 parent 88b79b5 commit 2d0fbe2

File tree

8 files changed

+35
-430
lines changed

8 files changed

+35
-430
lines changed

frontend/src/views/system/embedded/Page.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,10 @@ const refresh = (row: any) => {
180180
})
181181
}
182182
183-
const search = () => {
183+
const search = ($event: any = {}) => {
184+
if ($event?.isComposing) {
185+
return
186+
}
184187
searchLoading.value = true
185188
embeddedApi
186189
.getList(pageInfo.currentPage, pageInfo.pageSize, { keyword: keywords.value })
@@ -332,7 +335,7 @@ const copyCode = (row: any, key: any = 'app_secret') => {
332335
style="width: 240px; margin-right: 12px"
333336
:placeholder="$t('dashboard.search')"
334337
clearable
335-
@blur="search"
338+
@keydown.enter.exact.prevent="search"
336339
>
337340
<template #prefix>
338341
<el-icon>

frontend/src/views/system/member/index.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,10 @@ const handleToggleRowSelection = (check: boolean = true) => {
134134
isIndeterminate.value = !(i === 0 || i === arr.length)
135135
}
136136
137-
const search = () => {
137+
const search = ($event: any = {}) => {
138+
if ($event?.isComposing) {
139+
return
140+
}
138141
searchLoading.value = true
139142
workspaceUserList(
140143
keywordsMember.value ? { keyword: keywordsMember.value } : {},
@@ -220,7 +223,7 @@ const handleCurrentChange = (val: number) => {
220223
style="width: 240px; margin-right: 12px"
221224
:placeholder="$t('user.name_account_email')"
222225
clearable
223-
@blur="search"
226+
@keydown.enter.exact.prevent="search"
224227
>
225228
<template #prefix>
226229
<el-icon>

frontend/src/views/system/professional/index.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,10 @@ const configParams = () => {
228228
return str
229229
}
230230
231-
const search = () => {
231+
const search = ($event: any = {}) => {
232+
if ($event?.isComposing) {
233+
return
234+
}
232235
searchLoading.value = true
233236
oldKeywords.value = keywords.value
234237
professionalApi
@@ -430,7 +433,7 @@ const changeStatus = (id: any, val: any) => {
430433
style="width: 240px; margin-right: 12px"
431434
:placeholder="$t('professional.search_term')"
432435
clearable
433-
@blur="search"
436+
@keydown.enter.exact.prevent="search"
434437
>
435438
<template #prefix>
436439
<el-icon>

frontend/src/views/system/prompt/index.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,10 @@ const handleToggleRowSelection = (check: boolean = true) => {
246246
isIndeterminate.value = !(i === 0 || i === arr.length)
247247
}
248248
249-
const search = () => {
249+
const search = ($event: any = {}) => {
250+
if ($event?.isComposing) {
251+
return
252+
}
250253
searchLoading.value = true
251254
oldKeywords.value = keywords.value
252255
promptApi
@@ -466,7 +469,7 @@ const drawerMainClose = () => {
466469
style="width: 240px; margin-right: 12px"
467470
:placeholder="$t('dashboard.search')"
468471
clearable
469-
@blur="search"
472+
@keydown.enter.exact.prevent="search"
470473
>
471474
<template #prefix>
472475
<el-icon>

frontend/src/views/system/training/index.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,10 @@ const handleToggleRowSelection = (check: boolean = true) => {
216216
isIndeterminate.value = !(i === 0 || i === arr.length)
217217
}
218218
219-
const search = () => {
219+
const search = ($event: any = {}) => {
220+
if ($event?.isComposing) {
221+
return
222+
}
220223
searchLoading.value = true
221224
oldKeywords.value = keywords.value
222225
trainingApi
@@ -368,7 +371,7 @@ const onRowFormClose = () => {
368371
style="width: 240px"
369372
:placeholder="$t('training.search_problem')"
370373
clearable
371-
@blur="search"
374+
@keydown.enter.exact.prevent="search"
372375
>
373376
<template #prefix>
374377
<el-icon>

frontend/src/views/system/user/User.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
style="width: 240px; margin-right: 12px"
99
:placeholder="$t('user.name_account_email')"
1010
clearable
11-
@blur="handleSearch"
11+
@keydown.enter.exact.prevent="handleSearch"
1212
>
1313
<template #prefix>
1414
<el-icon>
@@ -625,7 +625,10 @@ const handleToggleRowSelection = (check: boolean = true) => {
625625
isIndeterminate.value = !(i === 0 || i === state.tableData.length)
626626
selectionLoading.value = false
627627
}
628-
const handleSearch = () => {
628+
const handleSearch = ($event: any = {}) => {
629+
if ($event?.isComposing) {
630+
return
631+
}
629632
state.pageInfo.currentPage = 1
630633
search()
631634
}

0 commit comments

Comments
 (0)