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

Tree content style #3562

Merged
merged 2 commits into from
Aug 28, 2022
Merged

Tree content style #3562

merged 2 commits into from
Aug 28, 2022

Conversation

sunny9528
Copy link
Contributor

fix issue #3561

@vercel
Copy link

vercel bot commented Aug 21, 2022

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

Name Status Preview Updated
naive-ui ❌ Failed (Inspect) Aug 28, 2022 at 3:55PM (UTC)

@codecov-commenter
Copy link

codecov-commenter commented Aug 21, 2022

Codecov Report

Merging #3562 (9d1a36d) into main (9055caa) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #3562      +/-   ##
==========================================
- Coverage   62.99%   62.98%   -0.02%     
==========================================
  Files        1056     1056              
  Lines       21925    21954      +29     
  Branches     5720     5729       +9     
==========================================
+ Hits        13812    13827      +15     
- Misses       6623     6634      +11     
- Partials     1490     1493       +3     
Impacted Files Coverage Δ
src/tree/src/Tree.tsx 35.93% <ø> (ø)
src/tree/src/styles/index.cssr.ts 100.00% <ø> (ø)
src/transfer/src/use-transfer-data.ts 53.73% <0.00%> (-2.04%) ⬇️
src/transfer/src/Transfer.tsx 63.49% <0.00%> (-1.51%) ⬇️
src/data-table/src/TableParts/Body.tsx 62.54% <0.00%> (-0.45%) ⬇️
src/menu/src/Menu.tsx 49.48% <0.00%> (-0.26%) ⬇️
src/slider/src/Slider.tsx 54.77% <0.00%> (ø)
src/locales/common/frFR.ts 40.00% <0.00%> (ø)
src/radio/src/RadioGroup.tsx 45.56% <0.00%> (ø)
src/statistic/styles/light.ts 100.00% <0.00%> (ø)
... and 9 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@sunny9528
Copy link
Contributor Author

  1. 因为tree组件文本没有指定宽度,因此当文本过长时且block-line时,就会超出容器长度

@07akioni
Copy link
Collaborator

应该想办法用纯 CSS 解决

image

.n-tree.n-tree--block-node .n-tree-node-content {
    flex: 1;
    /* flex-shrink: 1; */
    min-width: 0;
}

.n-tree .n-tree-node-content .n-tree-node-content__text {
    border-bottom: 1px solid #0000;
    transition: border-color .3s var(--n-bezier);
    flex-grow: 1;
    max-width: 100%;
}

@sunny9528
Copy link
Contributor Author

学到了 学到了,我就觉得这个方式不好,但纯css没想到解决方案,晚会我改改

@sunny9528
Copy link
Contributor Author

这个预计什么时候合并,想使用这个功能

@07akioni
Copy link
Collaborator

这个预计什么时候合并,想使用这个功能

我周末看看

@07akioni 07akioni merged commit f7806b3 into tusen-ai:main Aug 28, 2022
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.

3 participants