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>
相关推荐
伍哥的传说17 分钟前
Vue 3.5重磅更新:响应式Props解构,让组件开发更简洁高效
前端·javascript·vue.js·defineprops·vue 3.5·响应式props解构·vue.js新特性
菜牙买菜23 分钟前
Hicharts入门
前端·vue.js·数据可视化
德育处主任28 分钟前
p5.js 3D 形状 "预制工厂"——buildGeometry ()
前端·javascript·canvas
Mintopia30 分钟前
React 牵手 Ollama:本地 AI 服务对接实战指南
前端·javascript·aigc
Mintopia1 小时前
Next.js 全栈开发基础:在 pages/api/*.ts 中创建接口的艺术
前端·javascript·next.js
xvmingjiang1 小时前
Element Plus 中 el-input 限制为数值输入的方法
前端·javascript·vue.js
狂炫一碗大米饭1 小时前
事件委托的深层逻辑:当冒泡不够时⁉️
javascript·面试
张柏慈2 小时前
JavaScript性能优化30招
开发语言·javascript·性能优化
pepedd8642 小时前
全面解析this-理解this指向的原理
前端·javascript·trae