소스 검색

Table: fix pages calculation

master
Bing Sun 5 년 전
부모
커밋
c2159cc65c
로그인 계정: sunb GPG 키 ID: F7795F8C590626AB
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -1
      src/components/Table.js

+ 1
- 1
src/components/Table.js 파일 보기

@@ -30,7 +30,7 @@ export default initial_vnode => {
if (limit > 0 && limit < Infinity && model.cache().count) {
let active_page = offset / limit

pages = Array.from(Array(Math.floor(model.cache().count / limit) + 1))
pages = Array.from(Array(Math.ceil(model.cache().count / limit)))
.map((_,i) => active_page == i ? {active: true} : {active: false})

if (pages.length <= 10) {


불러오는 중...
취소
저장