Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-learn
Commits
7ff278b3
提交
7ff278b3
authored
10月 26, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
5543cb07
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
19 行增加
和
3 行删除
+19
-3
DiscussItem.vue
src/modules/bbs/components/DiscussItem.vue
+10
-0
DiscussItemCommentList.vue
src/modules/bbs/components/DiscussItemCommentList.vue
+1
-1
View.vue
src/modules/bbs/views/View.vue
+8
-2
没有找到文件。
src/modules/bbs/components/DiscussItem.vue
浏览文件 @
7ff278b3
...
...
@@ -60,6 +60,7 @@ function handleSubmit() {
<section
class=
"discuss-item"
>
<div
class=
"discuss-item__left"
>
<div
class=
"discuss-item__landlord"
v-if=
"data.sso_id === landlordId"
><span>
楼主
</span></div>
<div
class=
"discuss-item__index"
><slot
name=
"index"
></slot></div>
<div
class=
"discuss-item__avatar"
>
<img
:src=
"data.sso_user.avatar || 'https://webapp-pub.ezijing.com/website/base/images/default.jpg'"
/>
</div>
...
...
@@ -147,6 +148,15 @@ function handleSubmit() {
transform
:
rotate
(
-45deg
);
}
}
.discuss-item__index
{
position
:
absolute
;
right
:
0
;
top
:
0
;
font-size
:
14px
;
line-height
:
28px
;
color
:
#9b9b9b
;
padding
:
5px
10px
;
}
.discuss-item__avatar
{
width
:
100px
;
height
:
100px
;
...
...
src/modules/bbs/components/DiscussItemCommentList.vue
浏览文件 @
7ff278b3
...
...
@@ -62,6 +62,7 @@ function handleReply(data: DiscussCommentItem) {
}
activeComment
=
data
formVisible
=
true
form
.
content
=
''
nextTick
(()
=>
{
inputRef
?.
focus
()
})
...
...
@@ -87,7 +88,6 @@ function handleSubmit() {
content
:
form
.
content
}).
then
(()
=>
{
formVisible
=
false
form
.
content
=
''
refresh
()
ElMessage
({
message
:
'回复成功'
,
type
:
'success'
})
})
...
...
src/modules/bbs/views/View.vue
浏览文件 @
7ff278b3
...
...
@@ -14,11 +14,11 @@ interface Props {
}
const
props
=
defineProps
<
Props
>
()
const
router
=
useRouter
()
const
route
=
useRoute
()
let
detail
=
$ref
<
Post
>
()
const
appList
=
$ref
<
InstanceType
<
typeof
AppList
>
|
null
>
(
null
)
const
params
=
reactive
({
page
:
1
,
limit
:
10
})
// 列表配置
const
listOptions
=
computed
(()
=>
{
return
{
...
...
@@ -26,6 +26,10 @@ const listOptions = computed(() => {
remote
:
{
httpRequest
:
getPostAndDiscussList
,
params
:
{
id
:
props
.
id
},
beforeRequest
(
requestParams
:
any
)
{
Object
.
assign
(
params
,
requestParams
)
return
requestParams
},
callback
(
res
:
{
total
:
number
;
data
:
any
;
info
:
any
})
{
detail
=
res
.
info
return
{
total
:
res
.
total
,
list
:
res
.
data
}
...
...
@@ -76,7 +80,9 @@ function handleBack() {
</div>
<AppList
v-bind=
"listOptions"
ref=
"appList"
>
<template
#
body=
"
{ data }">
<DiscussItem
:landlordId=
"detail.sso_id"
:data=
"item"
v-for=
"item in data"
:key=
"item.id"
></DiscussItem>
<DiscussItem
:landlordId=
"detail.sso_id"
:data=
"item"
v-for=
"(item, index) in data"
:key=
"item.id"
>
<template
#
index
>
{{
(
params
.
page
-
1
)
*
params
.
limit
+
(
index
+
1
)
}}
楼
</
template
>
</DiscussItem>
</template>
</AppList>
</div>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论