Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
飞
飞鹤小程序
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
FH
飞鹤小程序
Commits
054cb74b
Commit
054cb74b
authored
Jun 13, 2025
by
王炽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
666666
parent
dd8e5425
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
ContentLibrary.vue
pages/library/ContentLibrary.vue
+10
-3
No files found.
pages/library/ContentLibrary.vue
View file @
054cb74b
...
@@ -222,11 +222,11 @@
...
@@ -222,11 +222,11 @@
width: item.textWidth + 'rpx',
width: item.textWidth + 'rpx',
bottom: item.bottom + 'rpx',
bottom: item.bottom + 'rpx',
...(index === 1 && {
...(index === 1 && {
textAlign
: 'center',
'text-align'
: 'center',
whiteSpace
: 'pre-line'
'white-space'
: 'pre-line'
}
)
}
)
}
"
}
"
>
{{
item
.
desc
}}
<
/text
>
>
{{
formatText
(
item
.
desc
,
index
)
}}
<
/text
>
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<
/view
>
...
@@ -1420,6 +1420,13 @@
...
@@ -1420,6 +1420,13 @@
}
);
}
);
const
formatText
=
(
text
,
index
)
=>
{
if
(
index
===
1
)
{
// 将 \n 替换为真实换行
return
text
.
replace
(
/
\\
n/g
,
'
\
n'
)
}
return
text
}
// 首页组件逻辑
// 首页组件逻辑
const
backHandler
=
()
=>
{
const
backHandler
=
()
=>
{
uni
.
navigateBack
();
uni
.
navigateBack
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment