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

相关推荐
无名友8 分钟前
HTML — 过渡与动画
前端·css·html
SouthernWind14 分钟前
用cursor接入mcp协议并体验Magic生成AI网站
前端·cursor
Aphasia31118 分钟前
面试八股文——vue篇📑
前端·vue.js·面试
A尘埃24 分钟前
前端ES6基本语法,以及前端项目模板vue-admin-template和后端进行对接(跨域问题的解决)
前端·vue.js·es6·前后端对接
Dignity_呱25 分钟前
小小导出,我大前端一人足矣(复杂多级表头)
前端·vue.js·面试
大叔_爱编程38 分钟前
wx219基于ssm+vue+uniapp的教师管理系统小程序
vue.js·小程序·uni-app·毕业设计·ssm·源码·课程设计
SoaringHeart40 分钟前
flutter 项目XCode16适配
前端
ak啊40 分钟前
Vue3 + Vite4 项目的性能优化配置方案
前端·vue.js·vite
Mintopia43 分钟前
Node.js 对前端技术有利的知识点
前端·javascript·node.js
一道雷1 小时前
🛠️ Unindex:推荐一款自动化索引文件生成工具
前端·javascript·node.js