-
-
Save azl397985856/4151d4aa2eb4123cfb26fb8afbf5e939 to your computer and use it in GitHub Desktop.
code-pen-antd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="container"> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Tooltip } = antd; | |
const App = React.createClass({ | |
getInitialState() { | |
return { | |
switch: false | |
} | |
}, | |
showSmsDetail() { | |
this.setState({ | |
switch: !this.state.switch | |
}); | |
}, | |
render() { | |
console.log(this.state.switch); | |
return ( | |
<div style={this.state.switch ? {display: 'none'} : {display: 'block'}}> | |
<a onClick={this.showSmsDetail.bind(this, '')} style={{fontSize: 16, color: '#6C7B8A', position: 'relative', top: 60, left: 68}}> | |
<Tooltip title="注意: 总消耗短信包括测试短信,分类短信中不包括测试短信"> | |
<span>详情清单</span> | |
</Tooltip> | |
</a> | |
</div> | |
); | |
} | |
}); | |
ReactDOM.render(<App />, document.getElementById('container')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://npmcdn.com/react/dist/react.js"></script> | |
<script src="https://npmcdn.com/react-dom/dist/react-dom.js"></script> | |
<script src="https://npmcdn.com/antd/dist/antd.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="https://npmcdn.com/antd/dist/antd.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment