is="calendar" data="{{selected_value,days,month,years,lunar_years,lunar_month,lunar_days,selectD ;更新日期:2025/11/10.幽灵资源网,磁力链接,云盘下载,BT种子,CPU天梯,显卡天梯,UU加速器,阅读3.0,英雄联盟,怪物猎人,无损音乐网,无损音乐下载网站,无损音乐免费下载,320Kmp3下载,无损音乐免费下载网站,音画欣赏,无损音乐,抖音神曲,发烧大碟,车载歌曲,试音天碟,WMA,WAV+CUE,WAV整轨,FLAC分轨,DSD黑胶,HI-FI试音,SACD-ISO,4K高清,高清电影下载,Magnet,Torrent,BitTorrent,迅雷快传,SUB,SRT,ASS/SSA,SUP,RARBG,TLF字幕,BluRay,x265,x264,DTS-HD,WEBRip,10BIT,HDR,DDP5.1,WEB-DL,1080p高清电影下载,中国高清网,高清电影,720p,1080p,MKV,AVI,蓝光原盘,3D高清,电影下载">
网络编程 发布日期:2025/11/10 浏览次数:1
微信小程序日历组件calendar详解及实例
模版使用:
src="/UploadFiles/2021-04-02/calendar.wxml">JS代码使用:
var Calendar = require('../cal/calendar'); Page({ data: { selected_value: [], days: [], month: [], years: [], lunar_years: [], lunar_month: [], lunar_days: [], selectDateType: 1, lunar_selected_value: [] }, .... // 指定选择器回调函数 new Calendar('key', this, function(date){ that.setData({ date: date }) });样式
.calendar{ position: absolute; bottom: 0; width: 100%; z-index: 999; background-color: #fff; } .tab{ display:inline-block; width:50%; text-align:center; font-size:16px; color: #ccc; } .tab-bar{ background-color: #eee; height: 40px; line-height: 40px; } .tab-bar .active{ color: #000; } .selected-item{ font-size: 28px; } .event-type_parent{ font-size: 14px; } .event-type_child{ text-align: center; line-height: 30px; } .event-type_txt{ display: inline-block; }以上用法看不懂的话,具体就参考代码里面index目录下。
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!