欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

微信小程序日歷組件calendar詳解及實(shí)例

 更新時(shí)間:2017年06月08日 10:58:31   作者:Rolan  
這篇文章主要介紹了微信小程序日歷組件calendar詳解及實(shí)例的相關(guān)資料,需要的朋友可以參考下

微信小程序日歷組件calendar詳解及實(shí)例

模版使用:

 src="../cal/calendar.wxml">
 is="calendar" data="{{selected_value,days,month,years,lunar_years,lunar_month,lunar_days,selectDateType,l
unar_selected_value}}">

JS代碼使用:

var Calendar = require('../cal/calendar');
 Page({
 data: {
  selected_value: [],
  days: [],
  month: [],
  years: [],
  lunar_years: [],
  lunar_month: [],
  lunar_days: [],
  selectDateType: 1,
  lunar_selected_value: []
 },
 ....
 // 指定選擇器回調(diào)函數(shù)
 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目錄下。

感謝閱讀,希望能幫助到大家,謝謝大家對(duì)本站的支持!

相關(guān)文章

最新評(píng)論