【问题标题】:Trouble in showing Surfaces in Grid using famo.us and meteor使用 famo.us 和流星在网格中显示表面时遇到问题
【发布时间】:2015-05-27 11:02:25
【问题描述】:

我正在尝试使用 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;
    }
});

【问题讨论】:

    标签: meteor famo.us


    【解决方案1】:

    我遇到了同样的错误,现在发现不幸的是流星的当前著名视图已被弃用,取而代之的是新版本,该版本适用于新发布的 famo.us 0.5。并且表面不再起作用。

    您可以访问https://github.com/gadicc/meteor-famous-views 了解更多信息,但现在很难帮助当前的著名观点,因为所有讨论基本上都是针对新版本的。

    让我知道你想出了什么,目前我正在自己测试。

    【讨论】:

      猜你喜欢
      • 2020-01-31
      • 1970-01-01
      • 2020-05-11
      • 1970-01-01
      • 1970-01-01
      • 2021-08-12
      • 1970-01-01
      • 2015-12-07
      • 1970-01-01
      相关资源
      最近更新 更多