Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
corporate-culture-qd
Overview
Overview
Details
Activity
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王立鹏
corporate-culture-qd
Commits
cd16fba5
Commit
cd16fba5
authored
Mar 17, 2026
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
styles: 纯文本文章加入换行
parent
98e8a720
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
index.vue
src/components/common/ArticleContent/index.vue
+7
-2
index.vue
src/components/common/PublishBox/index.vue
+5
-2
No files found.
src/components/common/ArticleContent/index.vue
View file @
cd16fba5
...
@@ -165,8 +165,13 @@
...
@@ -165,8 +165,13 @@
</div>
</div>
<!-- 文章内容 -->
<!-- 文章内容 -->
<div
v-if=
"!isHtml"
class=
"prose prose-lg max-w-none"
>
<div
v-if=
"!isHtml"
class=
"prose prose-lg max-w-none"
>
<div
class=
"text-gray-700 leading-relaxed space-y-4 whitespace-pre-line text-17px"
>
<div
class=
"text-gray-700 leading-relaxed space-y-1 text-17px"
>
{{
articleDetail
?.
content
}}
<template
v-for=
"(line, i) in (articleDetail?.content || '').split(/\n/)"
:key=
"i"
>
<div
v-if=
"line.trim()"
class=
"indent-2em"
>
{{
line
}}
</div>
<div
v-else
class=
"h-2"
aria-hidden=
"true"
/>
</
template
>
</div>
</div>
<!-- 图片内容 -->
<!-- 图片内容 -->
...
...
src/components/common/PublishBox/index.vue
View file @
cd16fba5
...
@@ -233,7 +233,7 @@ const { play } = useAnimate(
...
@@ -233,7 +233,7 @@ const { play } = useAnimate(
},
},
)
)
const
[
form
,
resetForm
]
=
useResetData
({
const
[
form
,
,
forReset
]
=
useResetData
({
title
:
''
,
title
:
''
,
content
:
''
,
content
:
''
,
imgUrl
:
''
,
imgUrl
:
''
,
...
@@ -296,7 +296,10 @@ const handlePublish = async (releaseStatus: ReleaseStatusTypeEnum) => {
...
@@ -296,7 +296,10 @@ const handlePublish = async (releaseStatus: ReleaseStatusTypeEnum) => {
await
textMap
[
type
].
api
(
transformForm
(
releaseStatus
))
await
textMap
[
type
].
api
(
transformForm
(
releaseStatus
))
loading
.
value
=
false
loading
.
value
=
false
push
.
success
(
releaseStatus
===
ReleaseStatusTypeEnum
.
PUBLISH
?
'发布成功'
:
'存草稿成功'
)
push
.
success
(
releaseStatus
===
ReleaseStatusTypeEnum
.
PUBLISH
?
'发布成功'
:
'存草稿成功'
)
resetForm
()
// resetForm()
forReset
()
// form.value.imgUrl = ''
console
.
log
(
form
.
value
)
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
error
)
console
.
error
(
error
)
}
finally
{
}
finally
{
...
...
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