Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
project-www-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
project-www-h5
Commits
e17033aa
提交
e17033aa
authored
5月 26, 2021
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
b579fee9
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
38 行增加
和
13 行删除
+38
-13
Post.vue
components/home/Post.vue
+38
-13
没有找到文件。
components/home/Post.vue
浏览文件 @
e17033aa
...
...
@@ -2,20 +2,26 @@
<card
title=
"项目公告"
>
<template
#
header-aside
><nuxt-link
to=
"/about/news?type=article_news"
>
查看更多+
</nuxt-link></
template
>
<div
class=
"future"
>
<
div
class=
"future-left"
>
即将开始的
<br
/>
课程日期
</div
>
<
!-- <div class="future-left">即将开始的<br />课程日期</div> --
>
<div
class=
"future-right"
>
<div
class=
"future-item"
v-for=
"(item, index) in futureList"
:key=
"index"
>
<div
class=
"future-item__title"
>
{{ item.title }}
</div>
<div
class=
"future-item__date"
>
{{ formatDate(item.created_time) }}
</div>
</div>
<swiper
ref=
"mySwiper"
:options=
"swiperOptions"
class=
"my-swiper"
>
<
template
v-for=
"(item, index) in futureList"
>
<swiper-slide
:key=
"index"
>
<div
class=
"future-item"
>
<div
class=
"future-item__title"
>
{{
item
.
title
}}
</div>
<div
class=
"future-item__date"
>
{{
item
.
created_time
}}
</div>
</div>
</swiper-slide>
</
template
>
</swiper>
</div>
</div>
<div
class=
"list"
>
<nuxt-link
:to=
"`/about/news/${item.id}`"
v-for=
"(item, index) in list"
:key=
"index"
>
<div
class=
"list-item"
>
<div
class=
"list-item__date"
>
<p
class=
"t1"
>
{{ formatMD(item.
created_at
) }}
</p>
<p
class=
"t2"
>
{{ formatYY(item.
created_at
) }}
</p>
<p
class=
"t1"
>
{{ formatMD(item.
start_time
) }}
</p>
<p
class=
"t2"
>
{{ formatYY(item.
start_time
) }}
</p>
</div>
<div
class=
"list-item__title"
>
{{ item.title }}
</div>
</div>
...
...
@@ -30,9 +36,18 @@ export default {
components
:
{
Card
},
data
()
{
return
{
swiperOptions
:
{
autoplay
:
true
,
delay
:
5000
,
loop
:
true
,
direction
:
'vertical'
,
slidesPerView
:
'auto'
,
centeredSlides
:
true
},
futureList
:
[
{
title
:
'KELLEY商学院金融硕士(MSF)开学典礼'
,
created_time
:
'2020-03-23 14:41:08'
},
{
title
:
'酒店管理HMBA报名截止日'
,
created_time
:
'2020-04-10 14:41:08'
}
{
title
:
'KELLEY商学院金融硕士(MSF)开学典礼'
,
created_time
:
'5月22日'
},
{
title
:
'中国PRP首期班核心课程(二)'
,
created_time
:
'5月29日'
},
{
title
:
'紫荆-索菲亚金融方向工商管理硕士开学典礼'
,
created_time
:
'5月29日'
}
],
list
:
[]
}
...
...
@@ -40,17 +55,17 @@ export default {
methods
:
{
// 2月14日
formatDate
(
value
)
{
const
date
=
new
Date
(
value
.
replace
(
/
\-
/g
,
'/'
)
)
const
date
=
new
Date
(
value
*
1000
)
return
date
.
getMonth
()
+
1
+
'月'
+
date
.
getDate
()
+
'日'
},
// 2021
formatYY
(
value
)
{
const
date
=
new
Date
(
value
.
replace
(
/
\-
/g
,
'/'
)
)
const
date
=
new
Date
(
value
*
1000
)
return
date
.
getFullYear
()
},
// 2/14
formatMD
(
value
)
{
const
date
=
new
Date
(
value
.
replace
(
/
\-
/g
,
'/'
)
)
const
date
=
new
Date
(
value
*
1000
)
return
date
.
getMonth
()
+
1
+
'/'
+
date
.
getDate
()
}
},
...
...
@@ -75,7 +90,9 @@ export default {
}
.future-right
{
flex
:
1
;
padding-left
:
0
.28rem
;
height
:
1
.2rem
;
overflow
:
hidden
;
// padding-left: 0.28rem;
}
.future-item
{
display
:
flex
;
...
...
@@ -85,6 +102,14 @@ export default {
.future-item
+
.future-item
{
border-top
:
1px
solid
#999
;
}
::v-deep
{
.swiper-slide-duplicate-active
{
.future-item
{
border-top
:
1px
solid
#999999
;
}
}
}
.future-item__title
{
flex
:
1
;
font-size
:
0
.1rem
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论