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

相关推荐
万物得其道者成几秒前
React Zustand状态管理库的使用
开发语言·javascript·ecmascript
小白小白从不日白1 分钟前
react hooks--useReducer
前端·javascript·react.js
下雪天的夏风14 分钟前
TS - tsconfig.json 和 tsconfig.node.json 的关系,如何在TS 中使用 JS 不报错
前端·javascript·typescript
青稞儿19 分钟前
面试题高频之token无感刷新(vue3+node.js)
vue.js·node.js
diygwcom25 分钟前
electron-updater实现electron全量版本更新
前端·javascript·electron
volodyan29 分钟前
electron react离线使用monaco-editor
javascript·react.js·electron
^^为欢几何^^37 分钟前
lodash中_.difference如何过滤数组
javascript·数据结构·算法
Hello-Mr.Wang42 分钟前
vue3中开发引导页的方法
开发语言·前端·javascript
程序员凡尘1 小时前
完美解决 Array 方法 (map/filter/reduce) 不按预期工作 的正确解决方法,亲测有效!!!
前端·javascript·vue.js
编程零零七4 小时前
Python数据分析工具(三):pymssql的用法
开发语言·前端·数据库·python·oracle·数据分析·pymssql