【发布时间】:2023-03-11 00:22:01
【问题描述】:
我已经从https://github.com/TimHeckel/meteor-webshot安装了webshot包和meteor webshot智能包
在目录 pacages/webshot/lib/webshot.js 中有 WEBSHOT 对象的定义。 在默认的流星应用程序中,我想使用这个对象来获取快照,如上面链接的第二步所示:
Template.hello.events({
'click input' : function () {
var _image = "myscreenshot.png";
var _res = WEBSHOT.snap("http://google.com", "public/exports~/" + _image, {
screenSize: {
width: 300
, height: 300
}
});
}
});
当我点击按钮时出现异常: 未捕获的 ReferenceError:未定义 WEBSHOT。
命令:
流星列表
显示 webshot 包,我需要在哪里包含此包才能使其正常工作?
【问题讨论】: