mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-16 09:39:10 +08:00
Merge branch 'master' of github.com:ant-design/ant-design
This commit is contained in:
commit
6ba61fc41e
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { findDOMNode } from 'react-dom';
|
||||
|
||||
const rxTwoCNChar = /^[\u4e00-\u9fa5]{2,2}$/;
|
||||
const rxTwoCNChar = /^[\u4e00-\u9fa5]{2}$/;
|
||||
const isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);
|
||||
function isString(str) {
|
||||
return typeof str === 'string';
|
||||
|
@ -16,15 +16,16 @@
|
||||
|
||||
| 参数 | 类型 | 默认值 |说明 |
|
||||
|------------|----------------|-------------|--------------|
|
||||
| range | Boolean | false | 双滑块模式
|
||||
| min | Number | 0 | 最小值
|
||||
| max | Number | 100 | 最大值
|
||||
| step | Number or null | 1 | 步长,取值必须大于 0,并且可被 (max - min) 整除。当 `marks` 不为空对象时,可以设置 `step` 为 `null`,此时 Slider 的可选值仅有 marks 标出来的部分。
|
||||
| marks | Object {Number: String} | {} | 分段标记,key 的类型必须为 `Number` 且取值在闭区间 [min, max] 内
|
||||
| marks | Object {Number: String} | {} | 刻度标记,key 的类型必须为 `Number` 且取值在闭区间 [min, max] 内
|
||||
| dots | Boolean | false | 是否只能拖拽到刻度上
|
||||
| value | Number or [Number, Number]| | 设置当前取值。当 `range` 为 `false` 时,使用 `Number`,否则用 `[Number, Number]`
|
||||
| defaultValue | Number or [Number, Number]| 0 or [0, 0] | 设置初始取值。当 `range` 为 `false` 时,使用 `Number`,否则用 `[Number, Number]`
|
||||
| included | Boolean | true | `marks` 不为空对象时有效,值为 true 时表示值为包含关系,false 表示并列
|
||||
| disabled | Boolean | false | 值为 `true` 时,滑块为禁用状态
|
||||
| allowCross | Boolean | true | 当 `range` 为 `true` 时,该属性可以设置是否允许两个滑块交换位置。
|
||||
| onChange | Function | NOOP | 当 Slider 的值发生改变时,会触发 onChange 事件,并把改变后的值作为参数传入。
|
||||
| onAfterChange | Function | NOOP | 与 `onmouseup` 触发时机一致,把当前值作为参数传入。
|
||||
| tipFormatter | Function or null | IDENTITY | Slider 会把当前值传给 `tipFormatter`,并在 Tooltip 中显示 `tipFormatter` 的返回值,若为 null,则隐藏 Tooltip。
|
||||
|
@ -96,6 +96,7 @@ let FilterMenu = React.createClass({
|
||||
let menus = (
|
||||
<div className="ant-table-filter-dropdown">
|
||||
<Menu multiple={multiple}
|
||||
onClick={this.handleMenuItemClick}
|
||||
prefixCls="ant-dropdown-menu"
|
||||
onSelect={this.setSelectedKeys}
|
||||
onDeselect={this.setSelectedKeys}
|
||||
|
@ -130,10 +130,6 @@ Ant Design React 支持所有的现代浏览器和 IE8+。
|
||||
</html>
|
||||
```
|
||||
|
||||
另外,由于 babel 对 IE8 的支持不佳,你可能会遇到类似 [#28](https://github.com/ant-tool/atool-build/issues/28) 和 [#858](https://github.com/ant-design/ant-design/issues/858) 的 default 报错的问题。
|
||||
|
||||
[antd-init](http://github.com/ant-design/antd-init) 脚手架已经解决了这个问题,你也可以参照这个 [webpack 配置](https://github.com/ant-design/antd-init/blob/8c4a55d205c82a6ad87814bbf997696051713d58/boilerplate/webpack.config.js#L10-L14)。
|
||||
|
||||
> 更多 IE8 下使用 React 的相关问题可以参考:https://github.com/xcatliu/react-ie8
|
||||
|
||||
## 自行构建
|
||||
|
@ -46,10 +46,6 @@
|
||||
.btn-circle(@btn-prefix-cls);
|
||||
}
|
||||
|
||||
&-circle-outline {
|
||||
.btn-circle-outline;
|
||||
}
|
||||
|
||||
&:after {
|
||||
font-family: anticon;
|
||||
content: "\e6a1";
|
||||
|
@ -192,50 +192,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
// circle button with stroke border
|
||||
.btn-circle-outline() {
|
||||
position: relative;
|
||||
|
||||
&:not([disabled]):before {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
display: inline-block;
|
||||
.opacity(0);
|
||||
border-radius: 50% 50%;
|
||||
content: " ";
|
||||
.scale(0, 0);
|
||||
.transition(all .3s @ease-in-out);
|
||||
z-index: 0;
|
||||
background-color: @primary-color;
|
||||
}
|
||||
|
||||
&:not([disabled]):hover,
|
||||
&:not([disabled]):focus,
|
||||
&:not([disabled]):active,
|
||||
&:not([disabled]).active {
|
||||
> .@{iconfont-css-prefix} {
|
||||
color: @btn-primary-color;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
&:not([disabled]):hover:before,
|
||||
&:not([disabled]):focus:before,
|
||||
&:not([disabled]):active:before,
|
||||
&:not([disabled]).active:before {
|
||||
.opacity(1);
|
||||
.scale(1, 1);
|
||||
}
|
||||
|
||||
&:not([disabled]):active:before,
|
||||
&:not([disabled]).active:before {
|
||||
background-color: tint(@primary-color, 20%);
|
||||
}
|
||||
}
|
||||
|
||||
// Horizontal button groups styl
|
||||
// --------------------------------------------------
|
||||
.btn-group(@btnClassName: btn) {
|
||||
@ -269,15 +225,15 @@
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
& > & {
|
||||
& > & {
|
||||
float: left;
|
||||
}
|
||||
|
||||
& > &:not(:first-child):not(:last-child) > .@{btnClassName} {
|
||||
& > &:not(:first-child):not(:last-child) > .@{btnClassName} {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
& > &:first-child:not(:last-child) {
|
||||
& > &:first-child:not(:last-child) {
|
||||
> .@{btnClassName}:last-child {
|
||||
border-bottom-right-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
@ -285,7 +241,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
& > &:last-child:not(:first-child) > .@{btnClassName}:first-child {
|
||||
& > &:last-child:not(:first-child) > .@{btnClassName}:first-child {
|
||||
border-bottom-left-radius: 0;
|
||||
border-top-left-radius: 0;
|
||||
padding-left: 8px;
|
||||
|
Loading…
Reference in New Issue
Block a user