Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
xugenyuan
2024-05-15 11:30:41 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5d80ab329c60ccdc042632335e4fe73659befeb4
5d80ab32
1 parent
dba9b654
ref |> 评论展开收起文字颜色
Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentText.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentText.ets
View file @
5d80ab3
...
...
@@ -3,8 +3,8 @@ import curves from '@ohos.curves';
import { BusinessError } from '@ohos.base';
import display from '@ohos.display';
const collapseString = '...展开全文'
const uncollapseString = '...收起'
const collapseString = '...展开'
const uncollapseString = ' 收起'
const TestLongText = "超过三行超\n过三行超过\n三行超超过三行\n超过三行超过三行超过三\n行超过"
...
...
@@ -129,7 +129,9 @@ export struct CommentText {
// Stack({ alignContent: Alignment.BottomEnd }) {
Text(this.longMessage) {
Span(this.expandedStates ? this.longMessage : this.maxLineMesssage)
Span(this.collapseText).onClick(() => {
Span(this.collapseText)
.fontColor("#999999")
.onClick(() => {
if (this.collapseText == collapseString) {
this.collapseText = uncollapseString;
this.expandedStates = true;
...
...
Please
register
or
login
to post a comment