[英]Meteor + React + Semantic - JS components
I'm trying to create a new app based on telescope-nova using react ES6 componentes overriding nova-base-components but I can't make use the tab
component. 我正在尝试使用React ES6组件覆盖nova-base-components创建一个基于telescope-nova的新应用程序,但是我无法使用
tab
组件。 I'm getting this error 我收到这个错误
Uncaught TypeError: (0 , _jquery2.default)(...).tab is not a function 未捕获的TypeError:(0,_jquery2.default)(...)。tab不是函数
<div className="ui top attached tabular menu" ref="tabsMenu">
<div className="active item" data-tab="description">Description</div>
<div className="item" data-tab="elevator">Elevator Pitch</div>
<div className="item" data-tab="market">Market Analysis</div>
<div className="item" data-tab="value">Value Proposition</div>
</div>
<div className="ui bottom attached active tab segment" data-tab="description">
<div dangerouslySetInnerHTML={createMarkup(cleanMarkup(idea.body))}>
</div>
</div>
<div className="ui bottom attached tab segment" data-tab="elevator">
<p>elevator</p>
</div>
<div className="ui bottom attached tab segment" data-tab="market">
<p>marketAnalysis</p>
</div>
<div className="ui bottom attached tab segment" data-tab="value">
<p>valueProposition</p>
</div>
In componentDidMount
I initialize the tabs with this code 在
componentDidMount
我使用以下代码初始化选项卡
$('.ui.top.attached.tabular.menu .item').tab();
And I have added semantic:ui-css
to the project and in the package I make use of it (only in the client). 并且我在项目中添加了
semantic:ui-css
,并在包中使用了它(仅在客户端中)。 I've also used the for the component - so the lifecycle events get triggered. 我还使用了组件-这样就触发了生命周期事件。
Any ideas on what is what I'm doing wrong? 关于我在做什么错的任何想法?
并且,在几个小时后尝试解决此问题,然后再在此处发布问题之后,我终于意识到,jQuery必须与jQuery(...).tab()
一起使用,而不是与美元符号
$('...').tab()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.