From f8074f545ca643fb981761684e3da16d64f46077 Mon Sep 17 00:00:00 2001 From: pengda Date: Mon, 27 Sep 2021 11:09:09 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-58039=20=E6=94=AF=E6=8C=81=E5=9B=BA?= =?UTF-8?q?=E5=AE=9A=E8=A1=8C=E6=95=B0=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/webattr/PageToolBarPane.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; }