vue暂存功能_vue日历/日程提醒/html5本地缓存

c4468b3f4df77e96b0a416fa2a870fba.png

vue日历/日程提醒/html5本地缓存

先上图

21c228b2c81770e0443a8a90baa494e2.png

功能:

1、上拉日历折叠,展示周

2、左右滑动切换月

2、“今天”回到今天;“+”添加日程

3、localStorage存储日程

index,html

+

{ { currentYear }}-{ {currentMonth}}

今天

  • //移动端点击方法,可切换pc端点击方法,见下

    { { day.getDate() }}

    { { day.getDate() }}

    { { day.getDate() }}

  • //pc端点击方法,可切换移动端点击方法,见上

    { { day.getDate() }}

    { { day.getDate() }}

    { { day.getDate() }}

X

  • { {item}}

  • { {date.eventName}}
    { {date.eventTime}}
    { {date.eventInfo}}
    { {date.eventRole}}
    ...

    修改

    ...

    ...

    ...

    ...

style.css

* {

box-sizing: border-box;

margin:0;

padding:0;

list-style:none;

}

a{

text-decoration: none;

}

ul {

list-style-type: none;

}

body {

font-family: Verdana, sans-serif;

background: #E8F0F3;

}

#calendar,#box{

width:100%;

margin: 0 auto;

box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.1), 0 1px 5px 0 rgba(0,0,0,0.12);

}

[v-cloak] {

display:none;

}

.year-month {

position: fixed;

width: 100%;

height:50px;

padding: 15px 0px;

background: #262626;

}

.add{

width: 15%;

float: left;

text-align: center;

color: white;

}

.choose-yearMonth{

position: absolute;

width: 70%;

float: left;

text-align: center;

color: white;

}

.today{

width: 15%;

text-align: center;

float: right;

color: white;

}

.choose-month {

text-align: center;

font-size: 1rem;

}

.arrow {

padding: 30px;

}

.arrow:hover {

background: rgba(100, 2, 12, 0.1);

}

.month ul li {

color: white;

font-size: 20px;

text-transform: uppercase;

letter-spacing: 3px;

}

.weekdays {

padding-top:55px;

background-color: #FFFFFF;

display: flex;

flex-wrap: wrap;

color: #949494;

justify-content: space-around;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值