Home > Web Front-end > JS Tutorial > body text

Implement date selection component in vue mobile terminal

亚连
Release: 2018-06-05 15:43:26
Original
6356 people have browsed it

I have compiled a summary of the knowledge points about the date selection component of vue mobile terminal. I hope it can help readers and learn together for reference.

Let me share the source code with you first: https://github.com/lx544690189/vue-mobile-calendar

##Build Setup

# install dependencies
npm install

# build for production with minification
npm run build
Copy after login

Usage

install

npm install vue-mobile-calendar
Copy after login

or:(from the dist folder)

<script src="vue-mobile-calendar.js" type="text/javascript"></script>
Copy after login

Quickstart

import Vue from &#39;vue&#39;
import Calendar from &#39;vue-mobile-calendar&#39;

Vue.use(Calendar)
Copy after login
<calendar
 v-model="calendarShow"
 :defaultDate="defaultDate"
 @change="handelChange">
</calendar>
Copy after login

Attributes

##optionv-modelformatdefaultDateminDatemaxDatecloseByClickmaskmonthweekEvents
description type default
show/hide the calendar Boolean false
format date String "yyyy-MM-dd"
default selected date Date new Date()
optional minimum date Date null
optional maximum date Date null
close by mask Boolean true
text of month Array ["January", "February", "March", "April", "五"month", "June", "July", "August", "September", "October", "November", "December"]
text of day Array ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "week Saturday", "Sunday"]

##event namedescriptionparameter of callbackchangewhen date change(date,formatDate)Reference

framework7

mint-ui

The above is what I compiled for everyone. I hope that in the future It will be helpful to everyone.

Related articles:

How to use eventBus in vue to achieve communication between components at the same level

How to implement downloading in node.js Picture

Examples of how to implement hls playback using vue2.0 vue-dplayer technologies

The above is the detailed content of Implement date selection component in vue mobile terminal. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!