如果我在表单标签上,并且想要更新导航标签。当窗体标记上发生事件时。如何在没有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>发布于 2016-08-13 15:09:03
使用像redux这样的东西来存储全局应用程序状态。
https://stackoverflow.com/questions/36613700
复制相似问题