0.0.5 • Published 6 years ago

optimat-vue-demo v0.0.5

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

基于Vuejs+Webpack定义了开发规范的网页开发框架的日期选择器

使用方式(Usage)

安装(Install)

npm install optimat-vue-date-picker -save

导入(Import)

*.js

import DatePicker from 'optimat-vue-date-picker'

*.vue

<script>
    import DatePicker from 'optimat-vue-date-picker'
</script>

标签(Target)

*vue

<DatePicker :options="datePickerOptions"></DatePicker>

功能(Api)

OptionsTypeDescriptionDefaultResult
isShowboolean强制显示(true)或隐藏(false)false
preShowfunction选择框弹出前执行(强制显示时无效)undefined
onShowfunction选择框弹出后执行undefined
preDismissfunction选择框消失前执行(强制隐藏时无效)undefined(startDate, endDate)
onDismissfunction选择框消失后执行undefined(startDate, endDate)
onStartDateChangedfunction开始日期变更时执行 (单选模式必须加入该事件)undefined(startDate)
onEndDateChangedfunction结束日期变更时执行(单选模式不会执行)undefined(endDate)
placeholderstring无日期内容时的占位符undefined
alignstring选择框位置:居左(left),居中(center),居右(right)left
typestring选择器类型:单选(single),范围(range)single
modestring选择器模式:单个日历(single),两个日历(double)type == single ? single : double
autoClearboolean是否自动清空(范围选择时有效)false
defaultStartDatedate默认开始日期当前日期
selectPassDateboolean能否选择以往日期false
resetboolean是否重置所有日期(只在options更新时执行)false