1
我正在使用Handsontable v0.34.0并尝试使用requirejs 进行集成我的require配置是正确的,因为我可以看到像时刻,numbro和pikaday一样正常加载的所有文件。 但是当我运行调用下面的代码Handsontable v0.34.0不能与requirejs一起工作
require(['jquery', 'handsontable'], function ($, Handsontable) {
let container = document.getElementById('container');
let hot = new Handsontable(container, {
data: dataSet,
width: 584,
height: 320,
colWidths: 47,
rowHeights: 23,
rowHeaders: true,
colHeaders: true,
renderAllRows: true
});
});
我得到错误
Uncaught TypeError: Handsontable is not a constructor
我强烈疑问,这已经是与在handsontable.js