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

相关推荐
繁依Fanyi13 分钟前
Animaster:一次由 CodeBuddy 主导的 CSS 动画编辑器诞生记
android·前端·css·编辑器·codebuddy首席试玩官
想起你的日子21 分钟前
Android studio 实现弹出表单编辑界面
java·前端·android studio
LuckyLay1 小时前
Vue百日学习计划Day9-15天详细计划-Gemini版
前端·vue.js·学习
weifont5 小时前
聊一聊Electron中Chromium多进程架构
javascript·架构·electron
大得3695 小时前
electron结合vue,直接访问静态文件如何跳转访问路径
javascript·vue.js·electron
水银嘻嘻7 小时前
12 web 自动化之基于关键字+数据驱动-反射自动化框架搭建
运维·前端·自动化
it_remember7 小时前
新建一个reactnative 0.72.0的项目
javascript·react native·react.js
小嘟嚷ovo8 小时前
h5,原生html,echarts关系网实现
前端·html·echarts
十一吖i8 小时前
Vue3项目使用ElDrawer后select方法不生效
前端
只可远观8 小时前
Flutter目录结构介绍、入口、Widget、Center组件、Text组件、MaterialApp组件、Scaffold组件
前端·flutter