wx-custom-component
v1.0.6
Published
* [小程序中如何使用npm ](https://developers.weixin.qq.com/miniprogram/dev/devtools/npm.html) * wx-custom-cb包下载成功之后,根据自己小程序文件路径引入相应的组件 * [微信小程序的组件使用](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/) #开发文档 ####picker-date-time > 说明
Downloads
33
Readme
#欢迎使用微信小程序wx-custom-component通用组件库 ##wx-custom-component的安装
- 小程序中如何使用npm
- wx-custom-cb包下载成功之后,根据自己小程序文件路径引入相应的组件
- 微信小程序的组件使用 #开发文档 ####picker-date-time
说明:从底部弹起的滚动时间选择器,此选择器可以选择年-月-日-时-分。
| 属性 | 类型 | 默认 | 必填 | 说明 | |-----|-----|----|--- |---| | show | Boolean | false |是 |默认为关闭选择器,当为true时,打开选择器 | | bindchange | eventhandle | |否 |value 改变时触发 change 事件,event.detail = {value} | | bindconfirm | eventhandle | |否 |点击确认按钮时触发,event.detail = {value: value} | | bindpickstart | eventhandle | |否 |当滚动选择开始时候触发事件 | | bindpickend | eventhandle | |否 |当滚动选择结束时候触发事件 |
JS代码
page({
data:{
show:false
},
onOpen(){
this.setData({
show:true
})
},
onChange(val){
console.log(val)
},
onconfirm(val){
console.log(val)
},
onStart(val){
console.log(val)
},
onEnd(val){
console.log(val)
}
})
<view bindtap="onOpen">打开</view>
<picker-date-time show="{{show}}"
bindchange="onChange"
bindconfirm="onconfirm"
bindpickstart="onStart"
bindpicksend="onEnd"
></picker-date-time>