溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

詳解vue移動(dòng)端日期選擇組件

發(fā)布時(shí)間:2020-09-05 12:32:54 來源:腳本之家 閱讀:236 作者:laozhang 欄目:web開發(fā)

先給大家分享一下源碼:https://github.com/lx544690189/vue-mobile-calendar

詳解vue移動(dòng)端日期選擇組件

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

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI