فهرست منبع

🎨style: Standardize pagination text format in Dashboard components

- Replace `showTotal` with `formatPageText` in Dashboard table components
- Unify pagination text format to match table components pattern
- Update SettingsAnnouncements.js, SettingsAPIInfo.js, and SettingsFAQ.js
- Change from "共 X 条记录,显示第 Y-Z 条" to "第 Y - Z 条,共 X 条" format
- Ensure consistent user experience across all table components

This change improves UI consistency by standardizing the pagination
text format across Dashboard and table components.
Apple\Apple 10 ماه پیش
والد
کامیت
f7b870c16d

+ 5 - 1
web/src/pages/Setting/Dashboard/SettingsAPIInfo.js

@@ -367,7 +367,11 @@ const SettingsAPIInfo = ({ options, refresh }) => {
             total: apiInfoList.length,
             showSizeChanger: true,
             showQuickJumper: true,
-            showTotal: (total, range) => t(`共 ${total} 条记录,显示第 ${range[0]}-${range[1]} 条`),
+            formatPageText: (page) => t('第 {{start}} - {{end}} 条,共 {{total}} 条', {
+              start: page.currentStart,
+              end: page.currentEnd,
+              total: apiInfoList.length,
+            }),
             pageSizeOptions: ['5', '10', '20', '50'],
             onChange: (page, size) => {
               setCurrentPage(page);

+ 5 - 1
web/src/pages/Setting/Dashboard/SettingsAnnouncements.js

@@ -392,7 +392,11 @@ const SettingsAnnouncements = ({ options, refresh }) => {
             total: announcementsList.length,
             showSizeChanger: true,
             showQuickJumper: true,
-            showTotal: (total, range) => t(`共 ${total} 条记录,显示第 ${range[0]}-${range[1]} 条`),
+            formatPageText: (page) => t('第 {{start}} - {{end}} 条,共 {{total}} 条', {
+              start: page.currentStart,
+              end: page.currentEnd,
+              total: announcementsList.length,
+            }),
             pageSizeOptions: ['5', '10', '20', '50'],
             onChange: (page, size) => {
               setCurrentPage(page);

+ 5 - 1
web/src/pages/Setting/Dashboard/SettingsFAQ.js

@@ -330,7 +330,11 @@ const SettingsFAQ = ({ options, refresh }) => {
             total: faqList.length,
             showSizeChanger: true,
             showQuickJumper: true,
-            showTotal: (total, range) => t(`共 ${total} 条记录,显示第 ${range[0]}-${range[1]} 条`),
+            formatPageText: (page) => t('第 {{start}} - {{end}} 条,共 {{total}} 条', {
+              start: page.currentStart,
+              end: page.currentEnd,
+              total: faqList.length,
+            }),
             pageSizeOptions: ['5', '10', '20', '50'],
             onChange: (page, size) => {
               setCurrentPage(page);