Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
fe1a9699
提交
fe1a9699
authored
9月 26, 2025
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 回复增加标题
上级
48f7ccfe
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
39 行增加
和
6 行删除
+39
-6
chapterWorkCommentAndReply.vue
...les/viewer/components/work/chapterWorkCommentAndReply.vue
+24
-2
chapterWorkCommentItem.vue
...modules/viewer/components/work/chapterWorkCommentItem.vue
+9
-3
chapterWorkCommentToMe.vue
...modules/viewer/components/work/chapterWorkCommentToMe.vue
+6
-1
没有找到文件。
src/modules/viewer/components/work/chapterWorkCommentAndReply.vue
浏览文件 @
fe1a9699
...
@@ -5,11 +5,19 @@
...
@@ -5,11 +5,19 @@
<div
v-html=
"data.comment"
></div>
<div
v-html=
"data.comment"
></div>
</show-more>
</show-more>
</div>
</div>
<div
class=
"chapter-work-comment-and-reply"
v-for=
"reply in data.details"
>
<div
class=
"chapter-work-comment-and-reply-list"
>
<div
class=
"chapter-work-comment-and-reply"
:class=
"
{ 'is-mine': studentId === reply.student_id, 'is-other': studentId !== reply.student_id }"
v-for="reply in data.details"
>
<p
class=
"chapter-work-comment-and-reply-title"
v-if=
"studentId === reply.student_id"
>
我的回复:
</p>
<p
class=
"chapter-work-comment-and-reply-title"
v-else
>
{{
title
}}
的回复:
</p>
<show-more
:key=
"reply.id"
>
<show-more
:key=
"reply.id"
>
<div
v-html=
"reply.comment"
></div>
<div
v-html=
"reply.comment"
></div>
</show-more>
</show-more>
</div>
</div>
</div>
<div
class=
"chapter-work-comment-and-reply-tools"
>
<div
class=
"chapter-work-comment-and-reply-tools"
>
<el-button
size=
"small"
@
click=
"showComment = !showComment"
>
评论
</el-button>
<el-button
size=
"small"
@
click=
"showComment = !showComment"
>
评论
</el-button>
<template
v-if=
"showComment"
>
<template
v-if=
"showComment"
>
...
@@ -29,7 +37,11 @@ import * as api from '../../api'
...
@@ -29,7 +37,11 @@ import * as api from '../../api'
export
default
{
export
default
{
name
:
'ChapterWorkCommentAndReply'
,
name
:
'ChapterWorkCommentAndReply'
,
props
:
{
data
:
{
type
:
Object
,
default
:
()
=>
({})
},
showFirst
:
{
type
:
Boolean
,
default
:
true
}
},
props
:
{
data
:
{
type
:
Object
,
default
:
()
=>
({})
},
showFirst
:
{
type
:
Boolean
,
default
:
true
},
title
:
{
type
:
String
,
default
:
''
}
},
emits
:
[
'update'
],
emits
:
[
'update'
],
components
:
{
VEditor
,
showMore
},
components
:
{
VEditor
,
showMore
},
data
()
{
data
()
{
...
@@ -38,6 +50,11 @@ export default {
...
@@ -38,6 +50,11 @@ export default {
comment
:
''
comment
:
''
}
}
},
},
computed
:
{
studentId
()
{
return
window
.
G
.
UserInfo
?.
student_info
?.
id
}
},
methods
:
{
methods
:
{
handleSubmit
()
{
handleSubmit
()
{
api
.
addChapterHomeworkCommentReply
({
comment_id
:
this
.
data
.
id
,
comment
:
this
.
comment
}).
then
((
response
)
=>
{
api
.
addChapterHomeworkCommentReply
({
comment_id
:
this
.
data
.
id
,
comment
:
this
.
comment
}).
then
((
response
)
=>
{
...
@@ -63,6 +80,11 @@ export default {
...
@@ -63,6 +80,11 @@ export default {
max-width
:
100%
;
max-width
:
100%
;
}
}
}
}
.chapter-work-comment-and-reply-title
{
font-size
:
14px
;
margin-bottom
:
10px
;
color
:
#333
;
}
.chapter-work-comment-and-reply-tools
{
.chapter-work-comment-and-reply-tools
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
...
...
src/modules/viewer/components/work/chapterWorkCommentItem.vue
浏览文件 @
fe1a9699
<
template
>
<
template
>
<div>
<div>
<chapter-work-answer-item
:data=
"data"
:key=
"data.id"
v-bind=
"$attrs"
>
<chapter-work-answer-item
:data=
"data"
:
index=
"index"
:
key=
"data.id"
v-bind=
"$attrs"
>
<h3
class=
"comment-title"
>
{{
$t
(
'viewerWork.commentMyTitle'
)
}}
</h3>
<h3
class=
"comment-title"
>
{{
$t
(
'viewerWork.commentMyTitle'
)
}}
</h3>
<v-editor
v-model=
"data.comment"
:disabled=
"disabled"
></v-editor>
<v-editor
v-model=
"data.comment"
:disabled=
"disabled"
></v-editor>
</chapter-work-answer-item>
</chapter-work-answer-item>
<chapter-work-comment-and-reply
:data=
"data"
v-on=
"$listeners"
:show-first=
"false"
/>
<chapter-work-comment-and-reply
:data=
"data"
v-on=
"$listeners"
:show-first=
"false"
:title=
"nickname"
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -15,10 +15,16 @@ import VEditor from '@/components/tinymce'
...
@@ -15,10 +15,16 @@ import VEditor from '@/components/tinymce'
import
chapterWorkCommentAndReply
from
'./chapterWorkCommentAndReply.vue'
import
chapterWorkCommentAndReply
from
'./chapterWorkCommentAndReply.vue'
export
default
{
export
default
{
props
:
{
data
:
{
type
:
Object
,
default
:
()
=>
({})
},
disabled
:
{
type
:
Boolean
}
},
props
:
{
data
:
{
type
:
Object
,
default
:
()
=>
({})
},
disabled
:
{
type
:
Boolean
}
,
index
:
{
type
:
Number
}
},
components
:
{
ChapterWorkAnswerItem
,
VEditor
,
chapterWorkCommentAndReply
},
components
:
{
ChapterWorkAnswerItem
,
VEditor
,
chapterWorkCommentAndReply
},
data
()
{
data
()
{
return
{}
return
{}
},
computed
:
{
nickname
()
{
const
name
=
this
.
data
.
personal_name
return
name
?
name
+
this
.
$t
(
'viewerWork.student'
)
:
this
.
$t
(
'viewerWork.student'
)
+
(
this
.
index
+
1
)
}
}
}
}
}
</
script
>
</
script
>
...
...
src/modules/viewer/components/work/chapterWorkCommentToMe.vue
浏览文件 @
fe1a9699
...
@@ -4,7 +4,12 @@
...
@@ -4,7 +4,12 @@
<div
class=
"module-item"
:key=
"index"
>
<div
class=
"module-item"
:key=
"index"
>
<div
class=
"module-item-hd"
>
{{
$t
(
'viewerWork.comment'
)
}}{{
index
+
1
}}
:
</div>
<div
class=
"module-item-hd"
>
{{
$t
(
'viewerWork.comment'
)
}}{{
index
+
1
}}
:
</div>
<div
class=
"module-item-bd"
>
<div
class=
"module-item-bd"
>
<chapter-work-comment-and-reply
:data=
"item"
:key=
"item.id"
@
update=
"getList"
/>
<chapter-work-comment-and-reply
:data=
"item"
:title=
"$t('viewerWork.comment') + (index + 1)"
:key=
"item.id"
@
update=
"getList"
/>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论