简体   繁体   English

Vaadin 8 HTML导入Javascript

[英]Vaadin 8 Html Imports Javascript

I am trying to use Vaadin 8 's "Html Import" feature 我正在尝试使用Vaadin 8的“ HTML导入”功能

i followed instructions here : What's New In Vaadin 8 我在这里按照说明进行操作: Vaadin 8的新增功能

you can check it at 10th feature. 您可以在第10个功能处进行检查。

i am also sure that i installed both polymer-cli and bower.As GameCard creator mantioned at his own github. 我也确定我同时安装了polymer-cli和bower.GameCard创作者在自己的github上提到。

But when run the application "the cards" are loading but not the way as it should.Mines have no flipping animation and kind a looks bad. 但是,在运行应用程序时,“卡片”正在加载,但加载方式却没有达到预期的效果。地雷没有翻转动画,而且看起来还不错。

Screenshot : 屏幕截图:

在此处输入图片说明

Update After Gerald's Solution. Gerald解决方案之后进行更新。

没有翻转

Finally Works with the Right Version of Polymer. 最后,使用正确版本的Polymer。 工作证明

initialize rank and symbol in different order (set rank first): 以不同的顺序初始化等级和符号(首先设置等级):

GameCard = function () {
    var element = this.getElement();
    this.setCard = function (symbol, rank) {
        element.set("rank", rank);
        element.set("symbol", symbol);
    };
};

Seems to be a problem with the game-card element and the latest version of Polymer. 似乎是游戏卡牌元素和最新版本的Polymer的问题。 I opened an issue on GitHub. 我在GitHub上发布了一个问题 Try with the version I used when I developed the demo. 尝试使用开发演示时使用的版本。 Find it here . 在这里找到它。 Just replace your bower_components directory with the one in my demo. 只需将您的bower_components目录替换为演示中的目录即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM