File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -178,9 +178,13 @@ const DEFAULT_PAGE_SIZE = 10;
178178
179179const pageSize = computed (() => coreStore .resource ?.options ?.listPageSize || DEFAULT_PAGE_SIZE );
180180
181+ const isPageLoaded = ref (false );
181182
182183async function getList() {
183184 rows .value = null ;
185+ if (! isPageLoaded .value ) {
186+ return ;
187+ }
184188 const data = await callAdminForthApi ({
185189 path: ' /get_resource_data' ,
186190 method: ' POST' ,
@@ -434,9 +438,6 @@ watch([page], async () => {
434438 setQuery ({ page: page .value });
435439});
436440
437-
438-
439-
440441watch ([sort ], async () => {
441442 if (! sort .value .length ) {
442443 setQuery ({ sort: undefined });
@@ -445,5 +446,8 @@ watch([sort], async () => {
445446 setQuery ({ sort: SortQuerySerializer .serialize (sort .value ) });
446447});
447448
449+ watch (() => coreStore .resource , () => {
450+ isPageLoaded .value = true ;
451+ });
448452
449453 </script >
You can’t perform that action at this time.
0 commit comments