如果我在表单标签上,我想更新导航标签。当事件发生在表单标记上时。如何在没有riot.update();
的情况下更新导航 <form id="signup" class="row" action="" method="">
<ul class="small-10 small-centered columns">
<li>
<div class="error" if={this.email.error}>Required</div>
<input onfocus="{focus}" onblur="{blur}" type="text" name="email" value="" placeholder="Email Address">
</li>
</ul>
</form>
</script>
this.focus = function() {
this.session.focused = true;
riot.update();
};
this.blur = function() {
this.session.focused = false;
riot.update();
};
</script>
不同页面
<nav class="{show: this.open === true, fix-header: this.session.focused}">
</nav>