Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kissy页面模板中能绑定方法吗? #746

Open
peipeichengbao opened this issue Nov 14, 2017 · 0 comments
Open

kissy页面模板中能绑定方法吗? #746

peipeichengbao opened this issue Nov 14, 2017 · 0 comments

Comments

@peipeichengbao
Copy link

写一个页面模板,想绑定click方法,结果函数直接运行,并且没有绑定成功

<div class='coupon' onClick="{{clickFunction}}">
    <span>Select Color and Size</span>
</div>
var clickFunction=function(){
    console.log('binding success')
}
var firstObj={
    width:width+'px',
    height:width+'px',
    backgroundColor:'pink',
    clickFunction:clickFunction
}
var newFirstScreen=new XTemplate(firstScreenTemplate).render(firstObj);
Node.all('#firstScreen').html(newFirstScreen);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant