antvis / S2

⚡️ A practical visualization library for tabular analysis.
https://s2.antv.antgroup.com
MIT License
1.49k stars 196 forks source link

feat: 单元格行高拖拽支持多行文本自适应 #2980

Closed lijinke666 closed 4 days ago

lijinke666 commented 5 days ago

👀 PR includes

✨ Feature

📝 Description

手动拖拽调整单元格高度时, 根据行高动态计算 maxLines 配置, 支持自适应.

{
  "number": 2367,
  "province": "浙江省",
  "city": "绍兴市\n绍兴市\n绍兴市\n绍兴市\n绍兴市",
  "type": "家具\n家具\n家具",
  "sub_type": "桌子"
}
const s2Options = {
  style: {
    cornerCell: {
      maxLines: Infinity,
    },
    rowCell: {
      maxLines: Infinity,
    },
    colCell: {
      maxLines: Infinity,
    },
  },
}

🖼️ Screenshot

Before After
Kapture 2024-11-18 at 17 00 16 Kapture 2024-11-18 at 16 56 39
Kapture 2024-11-19 at 16 15 15 Kapture 2024-11-19 at 16 11 28

🔗 Related issue link

ref #2963

🔍 Self-Check before the merge

vercel[bot] commented 5 days ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
antvis-s2 ❌ Failed (Inspect) Nov 20, 2024 3:53am
github-actions[bot] commented 5 days ago

你好, @lijinke666 CI 执行失败, 请点击 [Details] 按钮查看, 并根据日志修复

Hello, @lijinke666 CI run failed, please click the [Details] button for detailed log information and fix it.

github-actions[bot] commented 5 days ago

你好, @lijinke666 CI 执行失败, 请点击 [Details] 按钮查看, 并根据日志修复。

Hello, @lijinke666 CI run failed, please click the [Details] button for detailed log information and fix it.

github-actions[bot] commented 5 days ago

Size Change: +523 B (+0.08%)

Total Size: 617 kB

Filename Size Change
./packages/s2-core/dist/s2-extends.min.js 153 kB +197 B (+0.13%)
./packages/s2-core/dist/s2.min.js 256 kB +319 B (+0.12%)
./packages/s2-react/dist/s2-react.min.js 38.3 kB +2 B (+0.01%)
./packages/s2-vue/dist/s2-vue.min.js 37.4 kB +5 B (+0.01%)
ℹ️ View Unchanged | Filename | Size | | :--- | :---: | | `./packages/s2-core/dist/s2.min.css` | 388 B | | `./packages/s2-react-components/dist/s2-react-components.min.css` | 2.55 kB | | `./packages/s2-react-components/dist/s2-react-components.min.js` | 125 kB | | `./packages/s2-react/dist/s2-react.min.css` | 1.55 kB | | `./packages/s2-vue/dist/s2-vue.min.css` | 1.85 kB |

compressed-size-action