我给大家整理了关于vue移动端日期选择组件的知识点总结,希望能够给读者带来帮助,一起学习参考下。
先给大家分享一下源码:https://github.com/lx544690189/vue-mobile-calendar
build setup
# install dependenciesnpm install# build for production with minificationnpm run build
usage
install
npm install vue-mobile-calendar
or:(from the dist folder)
<script src="vue-mobile-calendar.js" type="text/javascript"></script>
quickstart
import vue from 'vue'import calendar from 'vue-mobile-calendar'vue.use(calendar)
<calendar v-model="calendarshow" :defaultdate="defaultdate" @change="handelchange"></calendar>
attributes
optiondescriptiontypedefault
v-model show/hide the calendar boolean false
format format date string yyyy-mm-dd
defaultdate default selected date date new date()
mindate optional minimum date date null
maxdate optional maximum date date null
closebyclickmask close by mask boolean true
month text of month array [一月, 二月, 三月, 四月, 五月, 六月, 七月, 八月, 九月, 十月, 十一月, 十二月]
week text of day array [周一, 周二, 周三, 周四, 周五, 周六, 周日]
events
event namedescriptionparameter of callback
change when date change (date,formatdate)
reference
framework7
mint-ui
上面是我整理给大家的,希望今后会对大家有帮助。
相关文章:
在vue中使用eventbus如何实现同级组件的通讯
在node.js中如何实现下载图片
使用vue2.0+vue-dplayer这些技术如何实现hls播放的示例
以上就是在vue移动端中实现日期选择组件的详细内容。