vue 使用quasar_使用Quasar框架的vue.js日历,可实现每月视图和议程视图

本文介绍了如何在Vue项目中使用Quasar框架构建一个日历组件,支持月视图和议程视图。日历事件数据格式遵循Google Calendar v3 API,并允许自定义事件详细信息处理和编辑功能。用户可以通过设置特定参数来自定义日历组件,并通过全局事件总线监听日历事件。
摘要由CSDN通过智能技术生成

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 
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值