Procházet zdrojové kódy

⚡ chore: Increase default page size from 10 to 100 items in model pricing views

This commit updates the default pagination settings across the model pricing
components to improve user experience by reducing the need for frequent
page navigation when browsing large model catalogs.

Changes made:
- Update initial pageSize state from 10 to 100 in useModelPricingData hook
- Set defaultPageSize to 100 in PricingTable pagination configuration
- Increase default skeletonCount from 10 to 100 in PricingCardSkeleton

Files modified:
- web/src/hooks/model-pricing/useModelPricingData.jsx
- web/src/components/table/model-pricing/view/table/PricingTable.jsx
- web/src/components/table/model-pricing/view/card/PricingCardSkeleton.jsx

This change affects both card and table view modes of the model pricing page,
ensuring consistent pagination behavior across different display formats.
t0ng7u před 6 měsíci
rodič
revize
0f86c4df9e

+ 1 - 1
web/src/components/table/model-pricing/view/card/PricingCardSkeleton.jsx

@@ -21,7 +21,7 @@ import React from 'react';
 import { Card, Skeleton } from '@douyinfe/semi-ui';
 
 const PricingCardSkeleton = ({
-  skeletonCount = 10,
+  skeletonCount = 100,
   rowSelection = false,
   showRatio = false
 }) => {

+ 1 - 4
web/src/components/table/model-pricing/view/card/PricingCardView.jsx

@@ -282,10 +282,7 @@ const PricingCardView = ({
 
                   {/* 倍率信息(可选) */}
                   {showRatio && (
-                    <div
-                      className="pt-3 border-t border-dashed"
-                      style={{ borderColor: 'var(--semi-color-border)' }}
-                    >
+                    <div className="pt-3">
                       <div className="flex items-center space-x-1 mb-2">
                         <span className="text-xs font-medium text-gray-700">{t('倍率信息')}</span>
                         <Tooltip content={t('倍率是为了方便换算不同价格的模型')}>

+ 1 - 1
web/src/components/table/model-pricing/view/table/PricingTable.jsx

@@ -114,7 +114,7 @@ const PricingTable = ({
           />
         }
         pagination={{
-          defaultPageSize: 10,
+          defaultPageSize: 100,
           pageSize: pageSize,
           showSizeChanger: true,
           pageSizeOptions: [10, 20, 50, 100],

+ 1 - 1
web/src/hooks/model-pricing/useModelPricingData.jsx

@@ -39,7 +39,7 @@ export const useModelPricingData = () => {
   const [filterEndpointType, setFilterEndpointType] = useState('all'); // 端点类型筛选: 'all' | string
   const [filterVendor, setFilterVendor] = useState('all'); // 供应商筛选: 'all' | 'unknown' | string
   const [filterTag, setFilterTag] = useState('all'); // 模型标签筛选: 'all' | string
-  const [pageSize, setPageSize] = useState(10);
+  const [pageSize, setPageSize] = useState(100);
   const [currentPage, setCurrentPage] = useState(1);
   const [currency, setCurrency] = useState('USD');
   const [showWithRecharge, setShowWithRecharge] = useState(false);