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 12
12
</div >
13
13
</template >
14
14
<script setup lang="ts">
15
- import { ref , computed } from ' vue'
15
+ import { ref , computed , watch } from ' vue'
16
16
17
17
defineOptions ({ name: ' InfiniteScroll' })
18
18
const props = defineProps ({
@@ -47,6 +47,15 @@ const props = defineProps({
47
47
const emit = defineEmits ([' update:current_page' , ' load' ])
48
48
const current = ref (props .current_page )
49
49
50
+ watch (
51
+ () => props .current_page ,
52
+ (val ) => {
53
+ if (val === 1 ) {
54
+ current .value = 1
55
+ }
56
+ }
57
+ )
58
+
50
59
const noMore = computed (
51
60
() =>
52
61
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() {
223
223
if (user .userInfo ) {
224
224
localStorage .setItem (user .userInfo .id + ' application' , selectUserId .value )
225
225
}
226
- paginationConfig .total = 0
227
- paginationConfig .current_page = 1
228
226
applicationList .value = []
227
+ paginationConfig .current_page = 1
228
+ paginationConfig .total = 0
229
229
getList ()
230
230
}
231
231
function getAccessToken(id : string ) {
You can’t perform that action at this time.
0 commit comments