javascript - 我想在客户端使用带有 CDN 的 datebook,但出现错误
问题描述
我正在尝试使用datebook CDN ( https://www.jsdelivr.com/package/npm/datebook ),但出现错误“未捕获的 ReferenceError:ICalendar 未定义”。
有人能帮助我吗?
我的代码:
<script src="https://cdn.jsdelivr.net/npm/datebook@6.5.3/dist/datebook.min.js"> </script>
<script>
const config = {
title: "hello",
location: 'The Bar, New York, NY',
description: 'Let\'s blow off some steam with a tall cold one!',
start: new Date('2022-07-08T19:00:00'),
end: new Date('2022-07-08T23:30:00'),
}
const icalendar = new ICalendar(config)
console.log(icalendar.render());
</script>
解决方案
推荐阅读
- php - 在 WordPress 上配置 WooCommerce
- wix - 更改安装路径
- ruby-on-rails - 无法运行 rails 服务器
- java - Spring Kafka 事务导致生产者每条消息偏移量增加 2
- angular - Angular8:提取到另一个服务时,BehaviourSubject 部分不起作用
- sql - 从子查询中返回多列作为列
- node.js - MongoDb如何从客户端获取文档中的所有对象
- java - 使用 mapstruct 的值对象的通用映射
- python - 针对缓慢加载时间的 pyTables / HDF5 性能优化
- python - Python用“单词”替换单词