Dhtmlx Event Calendar 付费版使用

TypeScript 复制代码
<template>
  <div ref="eventCalendarRef" class="event-calendar"></div>
</template>

<script lang="ts" setup>
import { onMounted, ref } from "vue";
// @ts-ignore
import { eventCalendar } from "./lib/event-calendar.dev.js";
import "./lib/event-calendar.css";
import { eventCalendarProps } from "./event-calendar";
defineOptions({ name: "EventCalendar" });
const {
  events,
  date,
  config,
  locale,
  mode,
  calendars,
  colors,
  editorConfig,
  editorValidation,
} = defineProps(eventCalendarProps);
const eventCalendarRef = ref();
const eventCalendarInstance = ref();
const { EventCalendar } = eventCalendar;
onMounted(() => {
  eventCalendarInstance.value = new EventCalendar(eventCalendarRef.value, {
    config: config,
    events: events,
    calendars: calendars,
    date: date,
    mode: mode,
    colors: colors,
    editorConfig: editorConfig,
    editorValidation: editorValidation,
    locale: eventCalendar[locale],
  });
});

defineExpose({
  instance: eventCalendarInstance,
});
</script>

<style lang="scss" scoped>
</style>
相关推荐
我有满天星辰1 小时前
Vue 3 响应式双雄:ref 与 reactive 完全指南
前端·javascript·vue.js
随风一样自由10 小时前
【前端独角兽】刚进入前端领域的前端开发用jQuery还是Vue3?
前端·javascript·vue3·jquery
YHHLAI11 小时前
[特殊字符] 面试中的 Promise —— 从入门到精通
前端·javascript·面试
weixin_BYSJ198711 小时前
SpringBoot + MySQL 乒乓球运动员信息管理系统项目实战--附源码04954
java·javascript·spring boot·python·django·flask·php
沪飘大军12 小时前
ll-llm:一个零依赖、可插拔的 OpenAI 兼容 LLM 代理
javascript
leoZ23112 小时前
Claude 驱动的全栈开发:Spring Boot + Vue 的 BS 架构实践
vue.js·spring boot·架构
山河木马13 小时前
GPU自动处理专题3-NDC怎么映射成屏幕像素坐标(视口变换)
javascript·webgl·图形学
Appthing15 小时前
在 TanStack Start 中使用 VitePWA 的正确配置
javascript
前端炒粉16 小时前
手写promise
java·前端·javascript
mONESY16 小时前
Node.js fs 文件系统模块 四种读写方案全解析
javascript·后端