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

相关推荐
Glommer2 分钟前
某音 Js 逆向思路
javascript·逆向
街尾杂货店&6 分钟前
webpack - 单独打包指定JS文件(因为不确定打出的前端包所访问的后端IP,需要对项目中IP配置文件单独拿出来,方便运维部署的时候对IP做修改)
前端·javascript·webpack
月光技术杂谈8 分钟前
用Deepseek 实现一个基于web的扣图应用
前端·javascript·html5·ccs·tensorflow.js·canvas api
金梦人生1 小时前
Css性能优化
前端·css
Holin_浩霖1 小时前
UI设计的底层逻辑:从组件到系统的跃迁
前端
Holin_浩霖1 小时前
前端开发者的 Web3 全图解实战 二
前端
写代码的皮筏艇1 小时前
CSS属性继承与特殊值
前端·css
kevlin_coder1 小时前
🚀 实现同一个滚动区域包含多个虚拟滚动列表
前端·javascript
金梦人生1 小时前
JS 性能优化
前端·javascript
peachSoda71 小时前
自定义配置小程序tabbar逻辑思路
javascript·vue.js·微信小程序·小程序