Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: table update style #2608

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

bestlyg
Copy link
Contributor

@bestlyg bestlyg commented Mar 22, 2024

Types of changes

  • New feature
  • Bug fix
  • Enhancement
  • Documentation change
  • Coding style change
  • Component style change
  • Refactoring
  • Test cases
  • Continuous integration
  • Typescript definition change
  • Breaking change
  • Others

Background and context

Solution

How is the change tested?

Changelog

Component Changelog(CN) Changelog(EN) Related issues
table 修复异常边框

Checklist:

  • Test suite passes (npm run test)
  • Provide changelog for relevant changes (e.g. bug fixes and new features) if applicable.
  • Changes are submitted to the appropriate branch (e.g. features should be submitted to feature branch and others should be submitted to main branch)

Other information

复现Demo:

import "@arco-design/web-react/dist/css/arco.css";

import React from "react";
import {
  Table,
  TableColumnProps,
  ConfigProvider,
} from "@arco-design/web-react";

const columns = [
  {
    title: "Name",
    dataIndex: "name",
    fixed: "left",
    width: 140,
  },
  {
    title: "Address",
    dataIndex: "address",
  },
  {
    title: "Email",
    dataIndex: "email",
  },
  {
    title: "Other",
    dataIndex: "other",
    render: () => "Other",
  },
  {
    title: "Other 1",
    dataIndex: "other1",
    render: () => "Other 1",
  },
  {
    title: "Other 2",
    dataIndex: "other2",
    render: () => "Other 2",
  },
  {
    title: "Salary",
    dataIndex: "salary",
    fixed: "right",
    width: 120,
  },
];
const data = [
  {
    key: "1",
    name: "Jane Doe",
    salary: 23000,
    address: "32 Park Road, London",
    email: "jane.doe@example.com",
  },
  {
    key: "2",
    name: "Alisa Ross",
    salary: 25000,
    address: "35 Park Road, London",
    email: "alisa.ross@example.com",
  },
  {
    key: "3",
    name: "Kevin Sandra",
    salary: 22000,
    address: "31 Park Road, London",
    email: "kevin.sandra@example.com",
  },
  {
    key: "4",
    name: "Ed Hellen",
    salary: 17000,
    address: "42 Park Road, London",
    email: "ed.hellen@example.com",
  },
  {
    key: "5",
    name: "William Smith",
    salary: 27000,
    address: "62 Park Road, London",
    email: "william.smith@example.com",
  },
];

export const App = () => {
  const [rtl, setRtl] = React.useState(false);
  return (
    <ConfigProvider rtl={rtl}>
      <button onClick={() => setRtl(!rtl)}>change rtl</button>
      <Table
        columns={columns}
        data={data}
        expandedRowRender={(record) =>
          `${record.name}'s address is ${record.address}`
        }
        rowSelection={{}}
        scroll={{
          x: 1600,
        }}
        border={
          {
            // wrapper: true,
            // headerCell: true,
            // bodyCell: true,
            // cell: true,
          }
        }
      />
    </ConfigProvider>
  );
};
export default App;

复现步骤:

  1. 仅开启border中的cell:true,滚动的时候左侧投影和边框正常,右侧多了一条边框
image
  1. 仅开启border中的headerCell:true,滚动的时候,右侧边框的header有边框,body无边框,看起来没有对齐一样
image
  1. 同2,仅开启border中的bodyCell:true,滚动的时候,右侧边框的body有边框,header无边框,看起来没有对齐一样
image

Copy link

codesandbox bot commented Mar 22, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

Prepare preview

Copy link

codesandbox-ci bot commented Mar 22, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@yinkaihui yinkaihui added this to the 2.61.2 milestone Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants