File tree Expand file tree Collapse file tree
frontend/src/pages/oj/views/rank Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 :solution =" this .error .solution || ' ' "
88 />
99 <div class =" soaring-rank" v-else >
10- <UserList :userList =" surgeUsers " :is-loading =" isLoading " :limit =" limit " />
10+ <UserList
11+ :userList =" surgeUsers "
12+ :is-loading =" isLoading "
13+ :limit =" query .limit "
14+ />
1115 <Pagination
1216 :total =" total "
13- :page-size .sync =" limit "
14- :current .sync =" page "
17+ :page-size .sync =" query . limit "
18+ :current .sync =" query . page "
1519 @on-change =" getSurgeUsers "
1620 show-sizer
1721 @on-page-size-change =" getSurgeUsers (1 )"
@@ -38,7 +42,7 @@ export default {
3842 error: null ,
3943
4044 total: 0 ,
41- limit: 30 ,
45+ // limit: 10 ,
4246 query: {
4347 page: 1 ,
4448 limit: 10 ,
@@ -52,9 +56,9 @@ export default {
5256 },
5357 getSurgeUsers () {
5458 this .isLoading = true
55- const offset = (this .query .page - 1 ) * this .limit
59+ const offset = (this .query .page - 1 ) * this .query . limit
5660 api
57- .getSurgeUsers (offset, this .limit )
61+ .getSurgeUsers (offset, this .query . limit )
5862 .then ((res ) => {
5963 this .surgeUsers = res .data .data .results
6064 this .total = res .data .data .total
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export default {
2525 error: null ,
2626
2727 total: 0 ,
28- limit: 10 ,
28+ // limit: 10,
2929 query: {
3030 page: 1 ,
3131 limit: 10 ,
@@ -79,9 +79,9 @@ export default {
7979 let offset = (this .query .page - 1 ) * this .query .limit + 3
8080 this .isLoading = true
8181 api
82- .getUserRank (offset, this .limit , RULE_TYPE .ACM )
82+ .getUserRank (offset, this .query . limit , RULE_TYPE .ACM )
8383 .then ((res ) => {
84- this .total = res .data .data .total - 3
84+ this .total = Math . max ( 0 , res .data .data .total - 3 )
8585 this .dataRank = res .data .data .results
8686 if (this .dataRank .length === 0 ) {
8787 this .error = {
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export default {
3838 <tbody >
3939 <tr
4040 v-if =" isLoading"
41- v-for =" index in 10 "
41+ v-for =" index in limit "
4242 :key =" index"
4343 class =" skeleton-row"
4444 >
You can’t perform that action at this time.
0 commit comments