如何在WebOS中创建按钮?
我正在尝试在 WebOS 中开始我的开发。我刚刚开始使用一个带有标签和按钮的简单应用程序。这是代码片段:
<div class="palm-body-text">
<div id="main" class="palm-hasheader">
<div class="palm-header">First Scene</div>
<div class="palm-text">Welcome to my World</div>
<div class="myButton" x-mojo-element="Button"></div>
</div>
</div>
在模拟器中,它没有显示按钮。它还在按钮行上发出警告,上面写着“
unknown attribute x-mojo-element.
有建议吗?”
I am trying to start my development in WebOS. I just started with a simple application with a label and a button. Here's the code snippet:
<div class="palm-body-text">
<div id="main" class="palm-hasheader">
<div class="palm-header">First Scene</div>
<div class="palm-text">Welcome to my World</div>
<div class="myButton" x-mojo-element="Button"></div>
</div>
</div>
In emulator it's not showing up the button. Also its giving a warning on button line which says
unknown attribute x-mojo-element.
Any suggestion?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须先在场景助手中设置按钮。仅当您在场景助手的
setup
函数中调用this.controller.setupWidget
后,才会呈现该按钮。在您这样做之前,它只是一个没有任何特殊含义的div
。You have to setup the button in the scene assistant first. The button is only rendered after you call
this.controller.setupWidget
in the scene assistant'ssetup
function. Until you do that it's just adiv
without any special meaning.