File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
2
import { VAceEditor } from ' vue3-ace-editor'
3
3
import ' ace-builds/src-noconflict/mode-nginx'
4
+ import ace from ' ace-builds'
4
5
import ' ace-builds/src-noconflict/theme-monokai'
6
+ import extSearchboxUrl from ' ace-builds/src-noconflict/ext-searchbox?url'
5
7
import { computed } from ' vue'
6
8
7
9
const props = defineProps <{
@@ -21,10 +23,13 @@ const value = computed({
21
23
emit (' update:content' , v )
22
24
},
23
25
})
26
+
27
+ ace .config .setModuleUrl (' ace/ext/searchbox' , extSearchboxUrl )
24
28
</script >
25
29
26
30
<template >
27
31
<VAceEditor
32
+ ref =" aceRef"
28
33
v-model:value =" value"
29
34
lang =" nginx"
30
35
theme =" monokai"
Original file line number Diff line number Diff line change @@ -141,12 +141,26 @@ watch(route, () => {
141
141
params .trash = route .query .trash === ' true'
142
142
})
143
143
144
+ const filterParams = reactive ({})
145
+
146
+ watch (filterParams , () => {
147
+ Object .assign (params , {
148
+ ... filterParams ,
149
+ page: 1 ,
150
+ })
151
+ })
152
+
144
153
onMounted (() => {
145
154
if (! props .disableQueryParams ) {
146
155
Object .assign (params , {
147
156
... route .query ,
148
157
trash: route .query .trash === ' true' ,
149
158
})
159
+
160
+ Object .assign (filterParams , {
161
+ ... route .query ,
162
+ trash: route .query .trash === ' true' ,
163
+ })
150
164
}
151
165
152
166
get_list ()
@@ -429,7 +443,7 @@ const paginationSize = computed(() => {
429
443
v-if =" !disableSearch && searchColumns.length"
430
444
:key =" updateFilter"
431
445
:data-list =" searchColumns"
432
- :data-source =" params "
446
+ :data-source =" filterParams "
433
447
type =" search"
434
448
layout =" inline"
435
449
>
You can’t perform that action at this time.
0 commit comments