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(code): add word-wrap prop #2129

Merged
merged 2 commits into from
Jan 8, 2022
Merged

feat(code): add word-wrap prop #2129

merged 2 commits into from
Jan 8, 2022

Conversation

Sepush
Copy link
Collaborator

@Sepush Sepush commented Jan 7, 2022

Signed-off-by: Sepush [email protected]

add word-wrap prop

close #2111

@vercel
Copy link

vercel bot commented Jan 7, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tusimple/naive-ui/3TLaHUcQ4bW2pZCtFFRbq6gvKvyk
✅ Preview: https://naive-ui-git-fork-sepush-code-tusimple.vercel.app

Comment on lines 18 to 19
<p class="n-p" data-v-79af885b="" style="--n-bezier:cubic-bezier(0.4, 0, 0.2, 1); --n-font-size:14px; --n-line-height:1.6; --n-text-color:rgb(51, 54, 57); font-size: 16px; margin-top: 0px; margin-bottom: 0px;">还是得再学习一个</p>
`
Copy link
Collaborator

@07akioni 07akioni Jan 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这代码感觉有点迷惑性啊,换一个更直观的?某种编程语言的

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,23 @@
<markdown>
# 软换行
</markdown>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

加个描述

“code 可以在溢出时自动换行“

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@@ -23,6 +23,7 @@ export default c([
c('pre', `
margin: 0;
font-family: inherit;
white-space: pre-wrap;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个需要加一个新的属性,叫 word-wrap,默认关闭。

不换行才是默认的需求。

换行需要加属性。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@Sepush Sepush changed the title feat(code): support soft wrap feat(code): add word-wrap prop Jan 7, 2022
@@ -23,7 +24,7 @@ export default c([
c('pre', `
margin: 0;
font-family: inherit;
white-space: pre-wrap;
white-space: var(--n-word-wrap);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个别通过变量实现,直接加个类就行,这个变量对用户没有任何调整的价值

@07akioni 07akioni merged commit f1fd374 into tusen-ai:main Jan 8, 2022
@Sepush Sepush deleted the code branch January 8, 2022 11:21
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.

Softwrap support in NCode
2 participants