文件
css
js
README.md
demo1.html
demo2.html
demo3.html
demo4.html
demo5.html
demo6.html
escape.html
excel.html
excel2.html
excel3.html
excel4.html
excel5.html
excel6.html
excel7.html
excel8.html
excel9.html
hello-broken.html
html-entities.html
spread.html
table-sortby.html
table-sortby2.html
white.html
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
spread.html 1.52 KB
一键复制 编辑 原始数据 按行查看 历史
涎涎 提交于 7年前 . Add files via upload
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="css/table.css"/>
</head>
<body>
<div id="app"></div>
</body>
</html>
<script src="js/react.min.js"></script>
<script src="js/react-dom.min.js"></script>
<script src="js/browser.js"></script>
<script type="text/babel">
var FancyLink = React.createClass({
render: function() {
/*
var attr = {
href: 'http://example.org',
target: '_blank',
};
// return <a {...attr}>Hello</a>;
return (
<a
href={attr.href}
target={attr.target}>
Hello
</a>
);
*/
/*
switch(this.props.size) {
// do something based on the `size` prop
}
var attribs = Object.assign({}, this.props); // shallow clone
delete attribs.size;
*/
var {size, ...attribs} = this.props;
switch(size) {
// do something based on the `size` prop
}
return <a {...attribs}>{this.props.children}</a>;
}
});
ReactDOM.render(
<div>
<FancyLink
href="http://example.org"
style={{color: "red"}}
target="_blank"
size="medium">
Hello
</FancyLink>
</div>,
document.getElementById('app')
);
</script>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化