Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use mpvue calendar

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "how to use mpvue calendar". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

WeChat Mini Programs Calendar component based on vue-calendar adapting to mpvue platform

Installation

Npm i mpvue-calendar

Use

Import Calendar from 'mpvue-calendar' bring in components

Register component Calendar in components

Using components in template

Parameters and methods

The value parameter value is an one-dimensional array in normal mode, for example, June 21, 2018 is [2018 value 21]. In range and multi mode, value is a two-dimensional array. For example, range mode selects June 21 to June 28, 2018 as [2018 June 21], [2018 6jue 28].

The events parameter events is a custom comment, for example, on June 21, 2018, it is {'2018-6-21': 'remarks today', '2018-6-22' 'tomorrow's remarks'}, which is dotted in clean mode, but not displayed in lunar lunar calendar mode.

Parameter disabled of disabled is disabled date, for example, 2018-6-21 is ['2018-6-21']

Example

Return to today's import Calendar from 'mpvue-calendar'export default {data () {return {months: [' January', 'February',' March', 'April',' May', 'June',' July', 'August',' September', 'October',' November', 'December'], disabledarr: [' 2018-6-27], value: [2018-6-27] Begin: [2018 Calendar 1], end: [20120 console.log 1], events: {'2016-6-7' remarks for Today', '2018-6-8' notes for tomorrow'},}}, components: {Calendar}, methods: {selectMonth (month,year) {console.log (year,month)}, prev (month) {console.log (month)} Next (month) {console.log (month)}, selectYear (year) {console.log (year)}, setToday (val,val1,val2) {this.$refs.calendar.setToday () }, select (val, val2) {console.log (val) console.log (val2)}} "how to use mpvue calendar" content is introduced here, thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report