使用 famo.us 和流星在网格中显示曲面时出现问题
Trouble in showing Surfaces in Grid using famo.us and meteor
我正在尝试使用 Meteor 和 Famo.us 在 Grid 中显示一些表面,但没有成功。我在本地运行项目后,浏览器显示黑屏。作为参考,我正在看这个例子:https://famous-views.meteor.com/views/GridLayout
HTML
<template name="gridTemplate">
{{#GridLayout size='[undefined,undefined]' dimension='[3,3]'}}
{{#famousEach items}}
{{>ContainerSurface template='gridItem' }}
{{/famousEach}}
{{/GridLayout}}
</template>
<template name="gridItem">
{{#Surface size='[undefined,undefined]'}}
<img src="/img/thumbnail.png">
{{/Surface}}
</template>
Javascript
FView.ready(function(require) {
FView.registerView('GridLayout', famous.views.GridLayout);
});
var items = [{
name:"adfadf"
},
{
name:"adfadf"
},
{
name:"adfadf"
},
{
name:"adfadf"
}];
Template.gridTemplate.helpers({
items:function()
{
return items;
}
});
我遇到了同样的错误,现在发现不幸的是,目前流星的著名观点已被弃用,取而代之的是新版本,该版本与新发布的 famo.us 0.5 一起使用。和表面不再工作。
你可以访问https://github.com/gadicc/meteor-famous-views了解更多,但是目前的著名观点现在很难得到帮助,因为所有的讨论基本上都是针对新版本的。
让我知道你想出了什么,到目前为止我正在自己测试它。
我正在尝试使用 Meteor 和 Famo.us 在 Grid 中显示一些表面,但没有成功。我在本地运行项目后,浏览器显示黑屏。作为参考,我正在看这个例子:https://famous-views.meteor.com/views/GridLayout
HTML
<template name="gridTemplate">
{{#GridLayout size='[undefined,undefined]' dimension='[3,3]'}}
{{#famousEach items}}
{{>ContainerSurface template='gridItem' }}
{{/famousEach}}
{{/GridLayout}}
</template>
<template name="gridItem">
{{#Surface size='[undefined,undefined]'}}
<img src="/img/thumbnail.png">
{{/Surface}}
</template>
Javascript
FView.ready(function(require) {
FView.registerView('GridLayout', famous.views.GridLayout);
});
var items = [{
name:"adfadf"
},
{
name:"adfadf"
},
{
name:"adfadf"
},
{
name:"adfadf"
}];
Template.gridTemplate.helpers({
items:function()
{
return items;
}
});
我遇到了同样的错误,现在发现不幸的是,目前流星的著名观点已被弃用,取而代之的是新版本,该版本与新发布的 famo.us 0.5 一起使用。和表面不再工作。
你可以访问https://github.com/gadicc/meteor-famous-views了解更多,但是目前的著名观点现在很难得到帮助,因为所有的讨论基本上都是针对新版本的。
让我知道你想出了什么,到目前为止我正在自己测试它。