TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How to Create a Tab UI with Riot 2.0

34 点作者 robertwpearce00超过 10 年前

4 条评论

bshimmin超过 10 年前
Aside from the usual unpleasantness of muddling together views and logic (and welcome back `onclick`, how I've missed you...), I find the idea of the "parent" scope rather troubling. If you have something nested inside a tab, let's say a link, what is its parent - an individual tab, or the whole "tabs" component?
评论 #8960932 未加载
tipiirai超过 10 年前
Instead of<p><pre><code> class={ tabItem: true, is_active: something() } </code></pre> you can just write<p><pre><code> class=&quot;tabItem { is_active: something() }&quot;</code></pre>
评论 #8960920 未加载
SimeVidas超过 10 年前
Custom elements must contain a hyphen: <a href="http://w3c.github.io/webcomponents/spec/custom/#dfn-custom-element" rel="nofollow">http:&#x2F;&#x2F;w3c.github.io&#x2F;webcomponents&#x2F;spec&#x2F;custom&#x2F;#dfn-custom-e...</a>. Just `&lt;tabs&gt;` is not allowed.
评论 #8961449 未加载
quest88超过 10 年前
Of course we&#x27;d still have posts in 2015 about how to make tabs.