先上圖
成都創(chuàng)新互聯(lián)公司致力于互聯(lián)網(wǎng)網(wǎng)站建設(shè)與網(wǎng)站營銷,提供成都網(wǎng)站設(shè)計、做網(wǎng)站、成都外貿(mào)網(wǎng)站建設(shè)公司、網(wǎng)站開發(fā)、seo優(yōu)化、網(wǎng)站排名、互聯(lián)網(wǎng)營銷、小程序開發(fā)、公眾號商城、等建站開發(fā),成都創(chuàng)新互聯(lián)公司網(wǎng)站建設(shè)策劃專家,為不同類型的客戶提供良好的互聯(lián)網(wǎng)應(yīng)用定制解決方案,幫助客戶在新的全球化互聯(lián)網(wǎng)環(huán)境中保持優(yōu)勢。功能:
1、上拉日歷折疊,展示周
2、左右滑動切換月
2、“今天”回到今天;“+”添加日程
3、localStorage存儲日程
index,html
<body> <div id="app" v-cloak @mousedown="down" @mouseup="heightChange"> <!--日歷--> <div id="calendar"> <!-- 年份 月份 --> <div class="year-month"> <span class="add" @click="eventAdd">+</span> <span class="choose-yearMonth" >{{ currentYear }}-{{currentMonth}}</span> <span class="today" @click="backToday">今天</span> </div> <div class="clear"></div> <!-- 星期 --> <ul class="weekdays"> <li >日</li> <li>一</li> <li>二</li> <li>三</li> <li>四</li> <li>五</li> <li >六</li> </ul> <!-- 日期 --> <ul class="days" ref="daysBox"> <!--展示月--> <li : @touchstart="down" @touchend="move" v-for="day in days"> //移動端點擊方法,可切換pc端點擊方法,見下 <!--非本月日期,灰色字體--> <span v-if="day.getMonth()+1 != currentMonth" class="other-month">{{ day.getDate() }}</span> <!--本月日期,正常顯示--> <span v-else> <!--今天,特殊標(biāo)示--> <span v-if="day.getFullYear() == new Date().getFullYear() && day.getMonth() == new Date().getMonth() && day.getDate() == new Date().getDate()" class="active">{{ day.getDate() }}</span> <!--非今天,正常顯示--> <span v-else>{{ day.getDate() }}</span> </span> </li> <!--展示周--> <li : @mousedown="down" @mouseup="move_week" v-for="day in week_day"> //pc端點擊方法,可切換移動端點擊方法,見上 <span v-if="day.getMonth()+1 != currentMonth" class="other-month">{{ day.getDate() }}</span> <span v-else> <!--今天--> <span v-if="day.getFullYear() == new Date().getFullYear() && day.getMonth() == new Date().getMonth() && day.getDate() == new Date().getDate()" class="active">{{ day.getDate() }}</span> <span v-else>{{ day.getDate() }}</span> </span> </li> <li><i class="mui-icon mui-icon-arrowdown"></i></li> </ul> </div> <!-- 添加日程 --> <div id="content" v-if="show"> <div class="nav"> <span class="back" @click="eventAdd_false">返回</span> <span class="finish" @click="eventAdd_true(id)">完成</span> </div> <div class="mui-input-row"> <input type="text" placeholder="日程內(nèi)容" ref="eventName"/> <input type="text" placeholder="備注信息" ref="eventInfo"/> <input type="text" list="cars" placeholder="擔(dān)任角色" ref="eventRole"/> <datalist id="cars"> <option value="經(jīng)辦人"> <option value="交辦人"> <option value="其他"> </datalist> <input type="text" v-model="getRemindTime" placeholder="設(shè)置提醒時間" @click="timeAdd"/> </div> <div class="overlay" v-if="selectTime"> <div id="curtain"> <div class="icon-shell"> <div class="icon-false" @click="setTime_false">X</div> <div class="icon-true" @click="setTime_true"></div> </div> <div class="clear"></div> <label >日 <input type="number" v-model="currentDay" min="0" /> </label> <label >時 <input type="number" v-model="currentHour" min="0" /> </label> <label >分 <input type="number" v-model="currentMinute" min="0" /> </label> </div> </div> </div> <!--選項卡--> <div id="box"> <ul class="ul1"> <li v-for="(item,index) in tabtit" v-bind:class="{active:index == num}" @click="tab(index)"> {{item}} </li> </ul> <ul class="ul2"> <li v-for="(main,index) in tabmain" v-show="index == num"> <div v-for="(date,index) in main"> <div class="clear"></div> <div>{{date.eventName}}</div> <div class="keep-right">{{date.eventTime}}</div> <div class="clear"></div> <div>{{date.eventInfo}}</div> <div class="clear"></div> <div>{{date.eventRole}}</div> <div class="keep-right" @click="select(index)">...</div> <div class="clear"></div> <div class="overlay" v-if="index==selectIndex" @click="closeDiv"></div> <div v-if="index==selectIndex" class="select-p"> <p>修改</p> <p>...</p> <p>...</p> <p>...</p> <p>...</p> </div> </div> </li> </ul> </div> <!--mui框架下底部選項卡 <nav class="mui-bar mui-bar-tab"> <a class="mui-tab-item"> <span class="mui-icon mui-icon-home"></span> <span class="mui-tab-label">工作</span> </a> <a class="mui-tab-item"> <span class="mui-icon mui-icon-phone"></span> <span class="mui-tab-label">角色</span> </a> <a class="mui-tab-item"> <span class="mui-icon mui-icon-email"></span> <span class="mui-tab-label">事項圈</span> <a class="mui-tab-item"> <span class="mui-icon mui-icon-gear"></span> <span class="mui-tab-label">同事</span> </a> <a class="mui-tab-item mui-active"> <span class="mui-icon mui-icon-gear"></span> <span class="mui-tab-label">日歷</span> </a> </nav>--> </div> </body>
分享題目:vue日歷/日程提醒/html5本地緩存功能-創(chuàng)新互聯(lián)
鏈接分享:http://jinyejixie.com/article36/djsesg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供微信小程序、響應(yīng)式網(wǎng)站、網(wǎng)站制作、網(wǎng)站維護(hù)、網(wǎng)站建設(shè)、網(wǎng)站設(shè)計公司
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容