0.0.2 • Published 4 years ago

w-roll-time v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

小程序时间选择器

time

install

npm install w-roll-time

使用

  1. 引入 .json 文件
  2. 在wxml中使用
    <w-selectTime id="selectTime" bind:pushTime="pushTime" bind:onCloseTime="closeTime" ></w-selectTime>
  3. 初始化当前时间 在调用页面中初始化
  getDate() { // 初始化子组件时间
    this.selectComponent('#selectTime').firstDate();
  },
  onLoad: function () {
    this.getDate();
  },

pushTime

pushTime 返回数据

{
    time:{text: "09月10日  周四", value: "20200910"}1: "13"2: "14"},
    timeGMT:'timeGMT Thu Sep 10 2020 08:00:00 GMT+0800 (中国标准时间)'
}

onCloseTime

触发函数 => closeTime