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