File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
components/infinite-scroll Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 1212 </div >
1313</template >
1414<script setup lang="ts">
15- import { ref , computed } from ' vue'
15+ import { ref , computed , watch } from ' vue'
1616
1717defineOptions ({ name: ' InfiniteScroll' })
1818const props = defineProps ({
@@ -47,6 +47,15 @@ const props = defineProps({
4747const emit = defineEmits ([' update:current_page' , ' load' ])
4848const current = ref (props .current_page )
4949
50+ watch (
51+ () => props .current_page ,
52+ (val ) => {
53+ if (val === 1 ) {
54+ current .value = 1
55+ }
56+ }
57+ )
58+
5059const noMore = computed (
5160 () =>
5261 props .size > 0 && props .size === props .total && props .total > props .page_size && ! props .loading
Original file line number Diff line number Diff line change @@ -223,9 +223,9 @@ function searchHandle() {
223223 if (user .userInfo ) {
224224 localStorage .setItem (user .userInfo .id + ' application' , selectUserId .value )
225225 }
226- paginationConfig .total = 0
227- paginationConfig .current_page = 1
228226 applicationList .value = []
227+ paginationConfig .current_page = 1
228+ paginationConfig .total = 0
229229 getList ()
230230}
231231function getAccessToken(id : string ) {
You can’t perform that action at this time.
0 commit comments