Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
web-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
web-ci-test
Commits
73b9c58a
提交
73b9c58a
authored
5月 16, 2023
作者:
翁进城
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
发布消息组件开发中
上级
bbef8504
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
100 行增加
和
5 行删除
+100
-5
index.tsx
pages/forum/components/publishMessage/index.tsx
+58
-0
index.module.scss
pages/forum/index.module.scss
+15
-1
index.tsx
pages/forum/index.tsx
+27
-4
没有找到文件。
pages/forum/components/publishMessage/index.tsx
0 → 100644
浏览文件 @
73b9c58a
import
{
Form
,
Input
,
Modal
}
from
"antd"
;
import
{
useState
}
from
"react"
;
type
Props
=
{
open
:
boolean
;
onOk
:
()
=>
{},
onCancel
:
()
=>
{}
};
export
default
function
publishMessage
()
{
const
[
isModalOpen
,
setIsModalOpen
]
=
useState
(
false
);
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
(
false
);
const
showModal
=
()
=>
{
setIsModalOpen
(
true
);
};
const
handleOk
=
()
=>
{
setConfirmLoading
(
true
);
setTimeout
(()
=>
{
setIsModalOpen
(
false
);
setConfirmLoading
(
false
);
},
2000
);
};
const
handleCancel
=
()
=>
{
setIsModalOpen
(
false
);
};
return
(
<
Modal
title=
""
open=
{
isModalOpen
}
onOk=
{
handleOk
}
onCancel=
{
handleCancel
}
width=
{
500
}
confirmLoading=
{
confirmLoading
}
okText=
"发布"
okButtonProps=
{
{
style
:
{
height
:
37
,
padding
:
"0 32px"
,
fontSize
:
16
}
}
}
cancelButtonProps=
{
{
style
:
{
display
:
"none"
}
}
}
>
<
Form
style=
{
{
paddingTop
:
32
}
}
>
<
Form
.
Item
>
<
Input
placeholder=
"输入标题"
style=
{
{
height
:
44
}
}
></
Input
>
</
Form
.
Item
>
<
Form
.
Item
>
<
Input
.
TextArea
allowClear
showCount
placeholder=
"输入内容"
maxLength=
{
100
}
style=
{
{
height
:
120
,
resize
:
"none"
}
}
></
Input
.
TextArea
>
</
Form
.
Item
>
<
Form
.
Item
></
Form
.
Item
>
</
Form
>
</
Modal
>
);
}
pages/forum/index.module.scss
浏览文件 @
73b9c58a
.forum
{
width
:
690px
;
margin
:
18px
auto
0
;
margin
:
18px
auto
88px
;
}
.header
{
...
...
@@ -133,6 +133,7 @@
.btnCommentWrap
{
margin-top
:
7px
;
margin-bottom
:
13px
;
text-align
:
right
;
padding-right
:
30px
;
}
...
...
@@ -146,6 +147,7 @@
.comments
{
border-top
:
1px
RGBA
(
246
,
247
,
249
,
1
)
solid
;
border-bottom
:
1px
RGBA
(
246
,
247
,
249
,
1
)
solid
;
.commentItem
{
padding
:
8px
26px
;
...
...
@@ -190,4 +192,16 @@
}
}
}
.showAll
{
height
:
50px
;
font-size
:
13px
;
font-family
:
MicrosoftYaHei
;
color
:
#000000
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
gap
:
4px
;
cursor
:
pointer
;
}
}
pages/forum/index.tsx
浏览文件 @
73b9c58a
import
{
Button
,
Image
,
Space
,
Input
}
from
"antd"
;
import
{
Button
,
Image
,
Space
,
Input
,
Modal
,
Form
}
from
"antd"
;
import
Layout
from
"~/components/layout"
;
import
styles
from
"./index.module.scss"
;
import
errImg
from
"./assets/errImg"
;
import
{
RightOutlined
}
from
"@ant-design/icons"
;
export
default
function
forum
()
{
return
(
<
Layout
>
<
div
className=
{
styles
.
forum
}
>
<
div
className=
{
styles
.
header
}
>
<
div
className=
{
styles
.
title
}
>
最新讨论
</
div
>
<
Button
className=
{
styles
.
btn
}
type=
"primary"
>
<
Button
className=
{
styles
.
btn
}
type=
"primary"
onClick=
{
showModal
}
>
发布动态
</
Button
>
</
div
>
...
...
@@ -36,14 +40,14 @@ export default function forum() {
className=
"img"
width=
{
132
}
height=
{
132
}
src=
"err
Img
"
src=
"err
or
"
fallback=
{
errImg
}
/>
<
Image
className=
"img"
width=
{
132
}
height=
{
132
}
src=
"err
Img
"
src=
"err
or
"
fallback=
{
errImg
}
/>
<
Image
...
...
@@ -128,11 +132,30 @@ export default function forum() {
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
commentItem
}
>
<
div
className=
{
styles
.
commentHeadImg
}
></
div
>
<
div
className=
{
styles
.
info
}
>
<
div
className=
{
styles
.
nameWrap
}
>
<
div
className=
{
styles
.
commentName
}
>
无人机爱好者111:
<
div
className=
{
styles
.
date
}
>
05-16
</
div
>
</
div
>
<
div
className=
{
styles
.
commentContent
}
>
无人机记录生活
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
showAll
}
>
查看全部15条评论
<
RightOutlined
size=
{
14
}
/>
</
div
>
</
div
>
</
div
>
</
Space
>
</
div
>
</
Layout
>
);
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论