File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 11<script setup lang="ts">
22import { VAceEditor } from ' vue3-ace-editor'
33import ' ace-builds/src-noconflict/mode-nginx'
4+ import ace from ' ace-builds'
45import ' ace-builds/src-noconflict/theme-monokai'
6+ import extSearchboxUrl from ' ace-builds/src-noconflict/ext-searchbox?url'
57import { computed } from ' vue'
68
79const props = defineProps <{
@@ -21,6 +23,8 @@ const value = computed({
2123 emit (' update:content' , v )
2224 },
2325})
26+
27+ ace .config .setModuleUrl (' ace/ext/searchbox' , extSearchboxUrl )
2428 </script >
2529
2630<template >
Original file line number Diff line number Diff line change @@ -141,12 +141,26 @@ watch(route, () => {
141141 params .trash = route .query .trash === ' true'
142142})
143143
144+ const filterParams = reactive ({})
145+
146+ watch (filterParams , () => {
147+ Object .assign (params , {
148+ ... filterParams ,
149+ page: 1 ,
150+ })
151+ })
152+
144153onMounted (() => {
145154 if (! props .disableQueryParams ) {
146155 Object .assign (params , {
147156 ... route .query ,
148157 trash: route .query .trash === ' true' ,
149158 })
159+
160+ Object .assign (filterParams , {
161+ ... route .query ,
162+ trash: route .query .trash === ' true' ,
163+ })
150164 }
151165
152166 get_list ()
@@ -429,7 +443,7 @@ const paginationSize = computed(() => {
429443 v-if =" !disableSearch && searchColumns.length"
430444 :key =" updateFilter"
431445 :data-list =" searchColumns"
432- :data-source =" params "
446+ :data-source =" filterParams "
433447 type =" search"
434448 layout =" inline"
435449 >
You can’t perform that action at this time.
0 commit comments