0.0.6 • Published 4 years ago
@mas.io/mas-dayweekmonth v0.0.6
安装
tnpm install --save @alipay/mas-dayweekmonth
组件介绍
云支付场景下日月周选择器
参数说明
属性 | 必填 | 参数类型 | 参数说明 | 默认值 | 示例 |
---|---|---|---|---|---|
unit | 否 | string | 单位,可选值day week month | day | day |
selectDate | 否 | string, date | 选中日期 | 当前日期 | 2020-04-01 |
startDate | 否 | string, date | 开始日期 | 一年前 | 2020-04-01 |
endDate | 否 | string, date | 结束日期 | 当前日期 | 2020-04-01 |
minDate | 否 | string, date | 展示最早时间 | 一年前 | 2020-04-01 |
maxDate | 否 | string, date | 展示最晚时间 | 当前日期 | 2020-04-01 |
onSelect | 否 | function | 选中日期触发该函数 | 空函数 | - |
onChangeUnit | 否 | function | 切换日周月单位触发该函数 | 空函数 | - |
slot
name | 说明 |
---|---|
unit-postfix | 日周月后面插入自定义内容 |
在小程序中使用
{
"usingComponents": {
"mas-dayweekmonth": "@alipay/mas-dayweekmonth/es/index"
}
}
在 page.axml 中引用组件
<mas-dayweekmonth
selectDate="{{date}}"
onSelect="onSelect"
onChangeUnit="onChangeUnit"
unit="{{unit}}"
/>