tui.calender日历在vue中的使用1.0

官网:https://ui.toast.com/tui-calendar

github:https://github.com/nhn/tui.calendar/tree/main

月、周、日视图都有,拖拽也比较方便,但是自己用起来比较费劲,参考文档写得不全,做个记录日后方便参考,我用的vue。

1.首先搭建自己的项目,然后安装

javascript 复制代码
npm install @toast-ui/calendar

安装可能遇到的报错以及解决方法

javascript 复制代码
报错1:You are using the runtime-only build of Vue 
where the template compiler is not available. 
Either pre-compile the templates into render functions, 
or use the compiler-included build.

解决1:在根目录下新建一个新的vue.config.js的文件,
添加runtimeCompiler为true
module.exports = {
    runtimeCompiler: true
}


报错2:Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

解决2:重新安装,后面加上--legacy-peer-deps
npm install @toast-ui/calendar --legacy-peer-deps
  1. 在github上下载源码,然后找到vue-calender中的App.vue,把文件复制到自己项目的vue文件中,
    import的这些文件自己根据路径去项目中找到然后复制到自己的项目,不出意外就可以跑出来了。

options选项里的字段
https://github.com/nhn/tui.calendar/tree/main/docs/en/apis

这些是options里面参数的介绍和日历的方法,可以挨个看看

介绍一部分

参考https://github.com/nhn/tui.calendar/blob/main/docs/en/apis/calendar.md

相关推荐
GISer_Jing21 小时前
AI编程革命:Trae如何重塑前端开发
前端·前端框架·aigc·ai编程
计算机学姐21 小时前
基于SpringBoot的送货上门系统【2026最新】
java·vue.js·spring boot·后端·mysql·spring·tomcat
豌豆学姐21 小时前
Sora2 视频生成 API 如何对接?附可直接使用的开源前端项目
前端·人工智能·开源·aigc·php
cz追天之路21 小时前
华为机考 ------ 计算某字符出现次数
前端·javascript·华为机考
毕设源码-朱学姐21 小时前
【开题答辩全过程】以 基于Web酒店管理的设计与实现为例,包含答辩的问题和答案
前端
talenteddriver21 小时前
Java Web:http请求在springboot项目中的传递层级(自用笔记)
java·前端·spring boot·http
咘噜biu21 小时前
Java后端和前端的接口数据加密方案(椭圆曲线集成加密方案)
java·前端·安全·aes·密钥协商ecdh·椭圆曲线集成加密方案
CodeSheep21 小时前
百度又一知名产品,倒下了!
前端·后端·程序员
阿芯爱编程21 小时前
前端面试题linux操作
前端·面试
Bug.ink1 天前
BUUCTF——WEB(4)
前端·网络安全·靶场·ctf·buuctf