简体   繁体   中英

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. I'm getting this error

Uncaught TypeError: (0 , _jquery2.default)(...).tab is not a function

<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

$('.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). 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()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM