我為大家整理了關於vue行動端日期選擇元件的知識點總結,希望能夠帶給讀者幫助,一起學習參考下。
先跟大家分享一下原始碼:https://github.com/lx544690189/vue-mobile-calendar
#Build Setup
# install dependencies npm install # build for production with minification npm 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
option | description | type | default |
---|---|---|---|
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 name | #description | parameter of callback |
---|---|---|
change | when date change | (date,formatDate) |
Reference
framework7
mint-ui
上面是我整理給大家的,希望今後會對大家有幫助。
相關文章:
使用vue2.0 vue-dplayer這些技巧如何實作hls播放的範例
#以上是在vue行動端實現日期選擇元件的詳細內容。更多資訊請關注PHP中文網其他相關文章!