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

🐛SheetComponent 里面设置的 cell 高度没有生效 #2736

Closed
1 of 5 tasks
egolink0 opened this issue May 22, 2024 · 1 comment
Closed
1 of 5 tasks

🐛SheetComponent 里面设置的 cell 高度没有生效 #2736

egolink0 opened this issue May 22, 2024 · 1 comment
Assignees
Labels
next 2.0-next 版本的问题

Comments

@egolink0
Copy link

egolink0 commented May 22, 2024

🏷 Version

Package Version
@antv/s2 2.0.0-next.21
@antv/s2-react 2.0.0-next.20
@antv/s2-vue

Sheet Type

  • PivotSheet
  • TableSheet(SheetComponent)
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Description

⌨️ Code Snapshots

 const s2Options: S2Options = {
      width: 600,
      height: 480,
      style: {
        // 列头宽度始终和数值单元格一致
        dataCell: {
          width: 200,
          height: 50, // 高度没生效
        },
        colCell: {
          width: 200,
          height: 50,
          widthByField: {
            // 特定维度 (如: 城市)
            city: 100,
            // 特定维值 (明细表场景下等同于配置特定维度)
            "root[&]province": 80,
          },
        },
        rowCell: {
          // 设置行高
          height: 40,
          // 明细表每一行根据行索引单独设置 (从 0 开始)
          heightByField: {
            "0": 40,
            "1": 130,
            "3": 60,
            "10": 80,
            "15": 20,
          },
        },
      },
    };

🔗 Reproduce Link

🤔 Steps to Reproduce

sandbox

😊 Expected Behavior

预期应该根据高度设置的值变化,但现在并没有变化

😅 Current Behavior

💻 System information

Environment Info
System linux deepin
Browser chrome 122
@github-actions github-actions bot added the next 2.0-next 版本的问题 label May 22, 2024
@lijinke666
Copy link
Member

lijinke666 commented May 24, 2024

Demo 示例只是演示一下各种配置如何写, 优先级规则是 rowCell.heightByField > rowCell.height > dataCell.height (后面再完善下文档吧)

image

image

所以这里 dataCell.height 是不生效的, 你想设置明细表的行头, 直接使用 rowCell.height 就行了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next 2.0-next 版本的问题
Projects
None yet
Development

No branches or pull requests

2 participants