Browse Source

滚动条

Leo 1 năm trước cách đây
mục cha
commit
7fe17b798f

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

@@ -79,7 +79,7 @@ export const DagDataView: React.FC<IProps> = ({ data, info, changePage }) => {
       <Table
         columns={columns}
         dataSource={tableData}
-        scroll={{ x: 3500, y: 250 }}
+        scroll={{ x: columns.length * 120, y: 250 }}
         pagination={{
           total: data.total,
           onChange: pageChange

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

@@ -969,7 +969,7 @@ export default class Dag extends React.Component<any, any> {
             columns={this.state.nodeTableCol}
             dataSource={this.state.nodeTableData}
             pagination={{ pageSize: 20 }}
-            scroll={{ x: 3500, y: 450 }}
+            scroll={{ x: this.state.nodeTableCol * 120, y: 450 }}
           />
         </Modal>
         <Modal

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

@@ -96,7 +96,7 @@ export default class ToolBar extends React.Component<any, any> {
           columns={this.state.columns}
           dataSource={this.state.tableData}
           pagination={{ pageSize: 50 }}
-          scroll={{ x: 3500, y: 250 }}
+          scroll={{ x: this.state.columns * 120, y: 250 }}
         />
       </div>
     );

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

@@ -397,7 +397,7 @@ export default class ScriptNodeInfo extends React.Component<any, any> {
                           bordered
                           columns={this.state.columns}
                           dataSource={this.state.tableData}
-                          scroll={{ x: 3500, y: 400 }}
+                          scroll={{ x: this.state.columns * 120, y: 400 }}
                           pagination={{ showSizeChanger: false }}
                         />
                       </div>