diff --git a/designer-realize/src/main/java/com/fr/design/webattr/PageToolBarPane.java b/designer-realize/src/main/java/com/fr/design/webattr/PageToolBarPane.java index a378ab315..0e9e15497 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/PageToolBarPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/PageToolBarPane.java @@ -62,6 +62,10 @@ public class PageToolBarPane extends AbstractEditToolBarPane { private static final Color TIPS_FONT_COLOR = new Color(0x8f8f92); private static final Pattern ROW_COUNT = Pattern.compile("^[1-5][\\d]*$"); + //固定函数分页,每页最多500行,最少1行数据 + private static final int MAX_ROW_COUNT = 500; + private static final int MIN_ROW_COUNT = 1; + public PageToolBarPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); @@ -281,7 +285,7 @@ public class PageToolBarPane extends AbstractEditToolBarPane { Matcher matcher = ROW_COUNT.matcher(rowCount); if(matcher.find()){ int count = Integer.parseInt(matcher.group()); - return count > 0 && count < 501; + return count >= MIN_ROW_COUNT && count <= MAX_ROW_COUNT; } return false; }