mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-11 19:42:54 +08:00
Merge
This commit is contained in:
commit
8a84bb264b
@ -9,9 +9,8 @@
|
||||
````jsx
|
||||
var Checkbox = antd.Checkbox;
|
||||
var container = document.getElementById('components-checkbox-demo-basic');
|
||||
|
||||
function onChange(checked){
|
||||
console.log('checked = ' + checked);
|
||||
function onChange(e) {
|
||||
console.log('checked = ' + e.target.checked);
|
||||
}
|
||||
|
||||
React.render(<label>
|
||||
|
@ -45,8 +45,7 @@ var App = React.createClass({
|
||||
this.setState({disabled:!this.state.disabled});
|
||||
},
|
||||
onChange(checked){
|
||||
console.log('checked = ',checked);
|
||||
this.setState({checked:checked});
|
||||
console.log('checked = ',e.target.checked);
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -20,4 +20,4 @@
|
||||
|-----------|------------------------------------------|------------|-------|--------|
|
||||
| checked | 指定当前是否选中 | boolean | | false |
|
||||
| defaultChecked | 初始是否选中 | boolean | | false |
|
||||
| onChange | 变化时回调函数 | Function(checked:boolean) | | |
|
||||
| onChange | 变化时回调函数 | Function(e:Event) | | |
|
||||
|
@ -15,6 +15,7 @@ var Switch = antd.Switch;
|
||||
var Menu = antd.Menu;
|
||||
var Dropdown = antd.Dropdown;
|
||||
var Slider = antd.Slider;
|
||||
var Checkbox = antd.Checkbox;
|
||||
|
||||
var menu = <Menu>
|
||||
<Menu.Item>
|
||||
@ -84,7 +85,7 @@ React.render(
|
||||
<div className="col-16">
|
||||
<div className="ant-input-group">
|
||||
<input type="text" className="ant-input" id="site4" placeholder="Search for..." />
|
||||
<div className="ant-input-group-btn">
|
||||
<div className="ant-input-group-btn">
|
||||
<Dropdown overlay={menu}>
|
||||
<button className="ant-btn ant-btn-menu">
|
||||
.com <i className="anticon anticon-down"></i>
|
||||
@ -103,7 +104,9 @@ React.render(
|
||||
<div className="ant-form-item">
|
||||
<label for="" className="col-6" required>ant-checkbox:</label>
|
||||
<div className="col-10">
|
||||
<p className="ant-form-text">请填写 ant-design 的 checkbox</p>
|
||||
<p className="ant-form-text">
|
||||
<Checkbox />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="ant-form-item">
|
||||
@ -135,4 +138,4 @@ React.render(
|
||||
</div>
|
||||
</form>
|
||||
, document.getElementById('components-form-demo-mix'));
|
||||
````
|
||||
````
|
||||
|
@ -33,7 +33,6 @@
|
||||
background-color: #ffffff;
|
||||
content: " ";
|
||||
cursor: pointer;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
|
||||
transform: scale(1);
|
||||
transition: left @switch-duration cubic-bezier(0.35, 0, 0.25, 1);
|
||||
animation-timing-function: cubic-bezier(0.35, 0, 0.25, 1);
|
||||
@ -61,11 +60,11 @@
|
||||
|
||||
&-disabled{
|
||||
cursor: no-drop;
|
||||
background: #ccc;
|
||||
border-color:#ccc;
|
||||
background: #f4f4f4;
|
||||
border-color:#f4f4f4;
|
||||
|
||||
&:after{
|
||||
background: #9e9e9e;
|
||||
background: #ccc;
|
||||
animation-name: none;
|
||||
cursor: no-drop;
|
||||
}
|
||||
@ -74,17 +73,10 @@
|
||||
transform: scale(1);
|
||||
animation-name: none;
|
||||
}
|
||||
}
|
||||
|
||||
&-label {
|
||||
display: inline-block;
|
||||
line-height: 20px;
|
||||
font-size: 14px;
|
||||
padding-left: 10px;
|
||||
vertical-align: middle;
|
||||
white-space: normal;
|
||||
pointer-events: none;
|
||||
user-select: text;
|
||||
&-inner {
|
||||
color:#ccc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user