import React, { useState } from 'react'; import { PageContainer } from '@ant-design/pro-layout'; import ProCard from '@/components/ProCard'; import ProTable, { ProColumns } from '@ant-design/pro-table'; const PlanChange = () => { const columns: ProColumns[] = [ { title: '序号', width: 50, dataIndex: 'index', align: 'center', valueType: 'index', }, ]; return (

<ProTable rowKey={'key'} columns={columns} headerTitle={
1
2
} />
); }; export default PlanChange;

.planchanges{ .table-box{ display: flex; .plane_box1{ flex: 1; } .plane_box2{ flex: 1; } } }

可以使用CSS中的justify-content属性将.plane_box2元素定位到右边。将.table-box的样式修改如下:

.table-box {
  display: flex;
  justify-content: space-between;
}

这样就能让.plane_box2在右边展示了。

React Ant Design Pro Table: 如何将元素定位到右边

原文地址: https://www.cveoy.top/t/topic/pVoi 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录