vue 使用quasar
类星历 (Quasar Calendar)
An event display calendar for the Quasar framework. This is still a work in progress project but we're putting in functionality and squashing bugs on a consistent basis.
Quasar框架的事件显示日历。 这仍然是一个进行中的项目,但我们会不断添加功能并消除错误。
建立 (Setup)
npm install quasar-calendar
Add Calendar to you .vue page similar to a a Quasar component
将日历添加到您的.vue页面,类似于Quasar组件
import { Calendar } from 'quasar-calendar'
or import individual components
或导入单个组件
import {
CalendarMonth,
CalendarAgenda,
CalendarMultiDay
} from 'quasar-calendar'
In your template, you can just put in a calendar viewer using the current date as the start date
在模板中,您可以使用当前日期作为开始日期来放入日历查看器
<calendar />
Or you can pass in parameters to customize
或者您可以传递参数以自定义
<calendar-month
:start-date="Date('2019-01-01')"
:events="someEventObject"
:sunday-first-day-of-week="true"
calendar-locale="fr"
calendar-timezone="Europe/Paris"
:allow-editing="false"
/>
事件数据格式 (Event data format)
The event data format is meant to be a subset of the Google Calendar v3 API (this is still a work in progress). Events should be passed in as an array of objects. Each object can have elements like in this example:
事件数据格式应作为Google Calendar v3 API的子集( 目前仍在进行中 )。 事件应作为对象数组传递。 每个对象可以具有以下示例中的元素:
[
{
id: 1,
summary: 'Test event',
description: 'Some extra info goes here',
location: 'Office of the Divine Randomness, 1232 Main St., Denver, CO',
start: {
dateTime: '2018-02-16T14:00:00', // ISO