温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

详解vue移动端日期选择组件

发布时间:2020-09-05 12:32:54 来源:脚本之家 阅读:218 作者:laozhang 栏目:web开发

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

详解vue移动端日期选择组件

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问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI