Prechádzať zdrojové kódy

fix: 分页与数量

kilnonedre 1 rok pred
rodič
commit
75d1470548

+ 2 - 1
packages/filebrowser/src/dataview.tsx

@@ -19,6 +19,7 @@ export const DagDataView: React.FC<IProps> = ({ data, info, changePage }) => {
         };
       })
     : [];
+  const total = data ? data.total : 0;
   const tableData: any = data
     ? data.dataList.map((item: any, index: number) => {
         const formatData = {} as Record<string, any>;
@@ -49,7 +50,7 @@ export const DagDataView: React.FC<IProps> = ({ data, info, changePage }) => {
           </div>
           <div className="dataview_item">
             <span className="dataview_label">数据条数</span>
-            {tableData.length}
+            {total}
           </div>
           <div className="dataview_item">
             <span className="dataview_label">创建时间</span>

+ 1 - 1
packages/yili-dag/src/Dag.tsx

@@ -1011,7 +1011,7 @@ export default class Dag extends React.Component<any, any> {
             columns={this.state.nodeTableCol}
             dataSource={this.state.nodeTableData}
             loading={this.state.tableLoading}
-            pagination={{ pageSize: 20 }}
+            pagination={{ pageSize: 20, showSizeChanger: false }}
             scroll={{ x: this.state.nodeTableCol.length * 250, y: 450 }}
           />
         </Modal>