蹴鞠 大佬有话说 : 2020-3-23 12:03:54
再求node.js大佬
本帖最后由 蹴鞠 于 2020-3-23 12:05 编辑
github上的一个项目https://github.com/nhn/tui.calendar
在这个地方我一直没办法引入到html,请问大佬我应该怎么引入?
https://s1.ax1x.com/2020/03/23/8TwZkV.png
<body>
…
<div id="calendar" style="height: 800px;"></div>
…
</body>
var Calendar = tui.Calendar;
var Calendar = require(‘tui-calendar’); /* CommonJS */
require("tui-calendar/dist/tui-calendar.css");
// If you use the default popups, use this.
require("tui-date-picker/dist/tui-date-picker.css");
require("tui-time-picker/dist/tui-time-picker.css");
import Calendar from ‘tui-calendar’; /* ES6 */
import "tui-calendar/dist/tui-calendar.css";
// If you use the default popups, use this.
import ‘tui-date-picker/dist/tui-date-picker.css’;
import ‘tui-time-picker/dist/tui-time-picker.css’;
var calendar = new Calendar(‘#calendar’, {
defaultView: ‘month’,
taskView: true,
template: {
monthDayname: function(dayname) {
return ‘<span class="calendar-week-dayname-name">’ + dayname.label + ‘</span>’;
}
…
}
});
锦安 大佬有话说 : 2020-3-23 12:05:52
照着文档引用就行啊
再说这也不是nodejs啊
蹴鞠 大佬有话说 : 2020-3-23 12:07:31
锦安 大佬有话说 : 2020-3-23 12:05
照着文档引用就行啊
再说这也不是nodejs啊
不用nodejs?之前我用npm直接下载了node里面。
dforel 大佬有话说 : 2020-3-23 12:10:26
假如用npm install 安装的话,他是前端资源.nodejs在这种情况下就是辅助打包和辅助开发的工具,
如果真的是 npm install
大概就是
import Calendar from ‘tui-calendar’; /* ES6 */
import "tui-calendar/dist/tui-calendar.css";
// If you use the default popups, use this.
import ‘tui-date-picker/dist/tui-date-picker.css’;
import ‘tui-time-picker/dist/tui-time-picker.css’
这个方式引用,.
具体也得看你是什么架构的,本身是vue还是angular还是普通的js.还是react
蹴鞠 大佬有话说 : 2020-3-23 12:14:19
dforel 大佬有话说 : 2020-3-23 12:10
假如用npm install 安装的话,他是前端资源.nodejs在这种情况下就是辅助打包和辅助开发的工具,
我就用了普通的JS,以前没用过node,不太知道怎么用
锦安 大佬有话说 : 2020-3-23 12:22:06
蹴鞠 大佬有话说 : 2020-3-23 12:07
不用nodejs?之前我用npm直接下载了node里面。
npm是基于nodejs没错,
不过大家通常所说的nodejs项目是指这个项目用到了nodejs,而不是因为用了npm来构建就叫做nodejs项目
我是一个大水怪 大佬有话说 : 2020-3-23 13:00:08
本帖最后由 我是一个大水怪 于 2020-3-23 13:03 编辑
README都不会看吗?
导入:
“`
https://github.com/nhn/tui.calendar#via-contents-delivery-network-cdn
“`
使用:
“`
https://github.com/nhn/tui.calendar#-usage
“`
无论是使用node.js的伪后端,还是webpack管理的前端项目,你都没用到node.js,去管它干什么,碰都别碰(需要时可以去专门学学)。
wweng 大佬有话说 : 2020-3-23 13:03:44
如果你的项目没有用构建系统(就是npm run build之类的是啥你不知道)
https://github.com/nhn/tui.calendar#via-contents-delivery-network-cdn
就用这个。
蹴鞠 大佬有话说 : 2020-3-23 13:07:59
我是一个大水怪 大佬有话说 : 2020-3-23 13:00
README都不会看吗?
导入:
“`
就是在使用这里,这个JS,我一直是用node来启动,但是就是有错。
蹴鞠 大佬有话说 : 2020-3-23 13:12:25
wweng 大佬有话说 : 2020-3-23 13:03
如果你的项目没有用构建系统(就是npm run build之类的是啥你不知道)
https://github.com/nhn/tui.calenda …
好的,谢谢大佬