mirror of
https://github.com/wassname/slider.git
synced 2026-09-10 12:38:09 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c021cadcbb | ||
|
|
4a59745a23 | ||
|
|
3e78e9ac4a | ||
|
|
82179e613a |
+13
-10
@@ -18,16 +18,19 @@ const handleStyle = {
|
||||
textAlign: 'center',
|
||||
};
|
||||
|
||||
const CustomHandle = props => {
|
||||
const style = Object.assign({ left: `${props.offset}%` }, handleStyle);
|
||||
return (
|
||||
<div style={style}>val: {props.value}</div>
|
||||
);
|
||||
};
|
||||
CustomHandle.propTypes = {
|
||||
value: React.PropTypes.any,
|
||||
offset: React.PropTypes.number,
|
||||
};
|
||||
const CustomHandle = React.createClass({
|
||||
propTypes: {
|
||||
value: React.PropTypes.any,
|
||||
offset: React.PropTypes.number,
|
||||
},
|
||||
render() {
|
||||
const props = this.props;
|
||||
const style = Object.assign({ left: `${props.offset}%` }, handleStyle);
|
||||
return (
|
||||
<div style={style}>val: {props.value}</div>
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
ReactDOM.render(
|
||||
<div>
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "rc-slider",
|
||||
"version": "5.3.3",
|
||||
"version": "5.3.5",
|
||||
"description": "slider ui component for react",
|
||||
"keywords": [
|
||||
"react",
|
||||
|
||||
+2
-1
@@ -508,9 +508,10 @@ class Slider extends React.Component {
|
||||
|
||||
const sliderClassName = classNames({
|
||||
[prefixCls]: true,
|
||||
[`${prefixCls}-with-marks`]: Object.keys(marks).length,
|
||||
[`${prefixCls}-disabled`]: disabled,
|
||||
[className]: !!className,
|
||||
[`${prefixCls}-vertical`]: this.props.vertical,
|
||||
[className]: !!className,
|
||||
});
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user