材料ui标签不可点击 [英] material ui Tabs unclickable
本文介绍了材料ui标签不可点击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
来自material-ui的标签是不可点击的。什么都没发生,然后我点击它们。
代码很简单:
Tabs from material-ui are unclickable. Nothing happens then i click on them. Code is just simple:
`var Tabs = React.createClass ({
render: function() {
return (
<Tabs>
<Tab label="1">
<p>hello 1</p>
</Tab>
<Tab label="2"/>
<p>hello 2</p>
</Tab>
</Tabs>
);
}
});`
但是在页面我看到theese选项卡打开第一个选项卡,然后我点击第二个没有任何反应。试过不同的浏览器。可能出现什么问题?
But on the page i see theese tabs with first tab opened and then i click on the second nothing happens. Tried different browsers. What could go wrong?
推荐答案
您必须添加以下代码:
var injectTapEventPlugin = require("react-tap-event-plugin");
injectTapEventPlugin();
我想知道为什么在他们的例子中没有明确提到它。
I wonder why it is not explicitly mentioned in their examples.
这篇关于材料ui标签不可点击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文