问题:根据文档引入fastclick报错。
var attachFastClick = require('fastclick');
attachFastClick(document.body);
问题:根据文档引入fastclick报错。
var attachFastClick = require('fastclick');
attachFastClick(document.body);
https://github.com/ftlabs/fas...
If you're using Browserify or another CommonJS-style module system, the FastClick.attach function will be returned when you call require('fastclick'). As a result, the easiest way to use FastClick with these loaders is as follows:
var attachFastClick = require('fastclick');
attachFastClick(document.body);
如果在打包工具中,应该CMD模块模式写法:
var attachFastClick = require('fastclick');
attachFastClick(document.body);
如果事script引用 ,使用AMD 模式的写法:
var FastClick = require('fastclick');
FastClick.attach(document.body, options);
如果有帮助,请采纳
13 回答12.7k 阅读
7 回答1.8k 阅读
3 回答1k 阅读✓ 已解决
3 回答1.2k 阅读✓ 已解决
5 回答2.5k 阅读
2 回答1.1k 阅读✓ 已解决
2 回答1.8k 阅读