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>
相关推荐
90后的晨仔25 分钟前
Pinia 状态管理原理与实战全解析
前端·vue.js
EndingCoder32 分钟前
WebSocket实时通信:Socket.io
服务器·javascript·网络·websocket·网络协议·node.js
90后的晨仔32 分钟前
Vue3 状态管理完全指南:从响应式 API 到 Pinia
前端·vue.js
90后的晨仔1 小时前
Vue 内置组件全解析:提升开发效率的五大神器
前端·vue.js
我胡为喜呀1 小时前
Vue3 中的 watch 和 watchEffect:如何优雅地监听数据变化
前端·javascript·vue.js
liangshanbo12153 小时前
React 19 vs React 18全面对比
前端·javascript·react.js
Never_Satisfied3 小时前
在 JavaScript 中,删除数组中内容为xxx的元素
java·前端·javascript
_菜鸟果果3 小时前
Vue3+echarts 3d饼图
前端·javascript·echarts
Sheldon一蓑烟雨任平生4 小时前
Vue3 列表渲染
vue.js·vue3·v-for·列表渲染·vue3 列表渲染·v-for 循环对象·v-for与计算属性
rechol4 小时前
类与对象(中)笔记整理
java·javascript·笔记