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

救救孩子,高版本Safari浏览器遇到过宽的ant table不展示 #111

Open
xiaonizi1994 opened this issue Oct 14, 2024 · 1 comment
Labels

Comments

@xiaonizi1994
Copy link

xiaonizi1994 commented Oct 14, 2024

问题

当浏览器缩放到150%,这时候 ant 表格如果过宽超出屏幕,高版本的Safari浏览器对dom样式会有转换问题

例如:以下表格因为超出了屏幕,样式错乱了,表格没有展示
image
当表格大小未超过屏幕,则表格是正常显示的,
image

code

  <div id="Page1">
      <div className="font-title text-black mb-16">剩余待付款金额:100000</div>
      <Table dataSource={billResult?.[EFinComWriteOFFResultType.Payment] || []} 
columns={[    {
      title: 'a',
      dataIndex: 'supplierCode',
      render: (_t, r) => `${normalRender(r.supplierCode)}:${normalRender(r.supplierName)}`,
    },
    {
      title: 'b',
      dataIndex: 'finSettlementCompanyName',
      render: normalRender,
    },
    {
      title: 'c',
      dataIndex: 'amount',
      align: 'right',
      render: t => amountToComponent(t),
    },]} pagination={false} />
    </div>



export const domToPdf = async (pageInfos: { domId: string; scale?: number }[]) => {
   const canvas = await domToCanvas(document.querySelector(`#Page1`));
  console.log('ca', canvas); 
  document.getElementsByTagName(`body`)[0].appendChild(canvas);
};

Your Environment

  • modern-screenshot: [e.g. 4.4.39]
  • Browser: [e.g. Safari 18.0.1 (20619.1.26.31.7)]
    我试过,老版本的Safari不会有,高版本稳定复现
@xiaonizi1994 xiaonizi1994 changed the title 高版本Safari浏览器展示过宽的ant table会样式错乱 高版本Safari浏览器展示过宽的ant table不展示 Oct 14, 2024
@xiaonizi1994
Copy link
Author

谁能帮我看看,救救孩子吧

@xiaonizi1994 xiaonizi1994 changed the title 高版本Safari浏览器展示过宽的ant table不展示 救救孩子,高版本Safari浏览器遇到过宽的ant table不展示 Oct 18, 2024
@qq15725 qq15725 added the Safari label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants