Skip to content

Commit

Permalink
Merge pull request #831 from XiaoMi/hotfix/#828
Browse files Browse the repository at this point in the history
Hotfix/#828
  • Loading branch information
GleanCoder1116 authored Dec 19, 2019
2 parents 06be194 + 5802323 commit 9632e2d
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 28 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# 更新日志

## 2.6.2

- 修复 `<Form />` labelPosition 兼容属性不生效的问题 [#828](https://github.com/XiaoMi/hiui/issues/828)
- 修复 `<Transfer />` type 的问题 [#821](https://github.com/XiaoMi/hiui/issues/821)
- 修复 `<Counter />` step 为负值,max 和 min 不起作用的问题 [#799](https://github.com/XiaoMi/hiui/issues/799)
- 优化 `<Cascader />` filterOption [#832](https://github.com/XiaoMi/hiui/issues/832)
- 修复 `<Cascader />` 受控问题 [#830](https://github.com/XiaoMi/hiui/issues/830)

## 2.6.1

- 修复 `<Cascader />` 不能正确通过搜索过滤选项的问题 [#812](https://github.com/XiaoMi/hiui/issues/812)
Expand Down
4 changes: 2 additions & 2 deletions components/counter/Counter.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ class Counter extends React.Component {
step
} = this.props

let num = new Decimal(this.valueTrue).plus(step).valueOf() * 1
let num = new Decimal(this.valueTrue).plus(step > 0 ? step : -step).valueOf() * 1
return max <= num
}

Expand All @@ -248,7 +248,7 @@ class Counter extends React.Component {
min = -1 * Infinity,
step
} = this.props
let num = new Decimal(this.valueTrue).minus(step).valueOf() * 1
let num = new Decimal(this.valueTrue).minus(step > 0 ? step : -step).valueOf() * 1
return min >= num
}

Expand Down
1 change: 0 additions & 1 deletion components/form/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ Form.propTypes = {

Form.defaultProps = {
size: 'small',
labelPlacement: 'left',
showColon: true
}

Expand Down
2 changes: 1 addition & 1 deletion components/transfer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ class Transfer extends Component {
draggable={draggable}
key={index}
onClick={this.clickItemEvent.bind(this, item, index, dir)}
mode={mode}
mode={mode === 'basic' && type === 'default' ? 'basic' : 'multiple'}
item={item}
checked={selectedKeys.includes(item.id)}
checkboxOnChange={this.checkboxEvent.bind(this, dir)}
Expand Down
8 changes: 4 additions & 4 deletions docs/demo/collapse/section-accordion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@ class Demo extends React.Component {
<Collapse
onChange={()=>{console.log('切换了!');}}
accordion={true}
arrow="right"
arrowPlacement="right"
>
<Collapse.Panel
disabled={true}
header="panel title 1"
title="panel title 1"
>
<p>Collapse Panel Content 1</p>
<p>Collapse Panel Content 1</p>
<p>Collapse Panel Content 1</p>
</Collapse.Panel>
<Collapse.Panel
header="panel title 2"
title="panel title 2"
>
<p>Collapse Panel Content 2</p>
<p>Collapse Panel Content 2</p>
<p>Collapse Panel Content 2</p>
</Collapse.Panel>
<Collapse.Panel
header="panel title 3"
title="panel title 3"
>
<p>Collapse Panel Content 3</p>
<p>Collapse Panel Content 3</p>
Expand Down
8 changes: 4 additions & 4 deletions docs/demo/collapse/section-basic.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ class Demo extends React.Component {
return(
<Collapse
onChange={()=>{console.log('切换了!');}}
arrow="right"
arrowPlacement="right"
>
<Collapse.Panel
disabled={true}
header="panel title 1"
title="panel title 1"
>
<p>Collapse Panel Content 1</p>
<p>Collapse Panel Content 1</p>
<p>Collapse Panel Content 1</p>
</Collapse.Panel>
<Collapse.Panel
header="panel title 2"
title="panel title 2"
>
<p>Collapse Panel Content 2</p>
<p>Collapse Panel Content 2</p>
<p>Collapse Panel Content 2</p>
</Collapse.Panel>
<Collapse.Panel
header="panel title 3"
title="panel title 3"
>
<p>Collapse Panel Content 3</p>
<p>Collapse Panel Content 3</p>
Expand Down
4 changes: 2 additions & 2 deletions docs/demo/transfer/section-area.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class Demo extends React.Component {
render () {
return (
<Transfer
mode='multiple'
showAllSelect
type='multiple'
showCheckAll
draggable
targetKeys={this.state.targetKeys}
data={this.state.datas}
Expand Down
3 changes: 1 addition & 2 deletions docs/demo/transfer/section-base.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ class Demo extends React.Component {
render () {
return (
<Transfer
mode='basic'
emptyContent={['空', '无数据']}
title={['左标题', '右标题']}
targetKeys={this.state.targetKeys}
targetIds={this.state.targetKeys}
data={this.state.datas}
onChange={this.onChange.bind(this)}
/>
Expand Down
4 changes: 2 additions & 2 deletions docs/demo/transfer/section-batch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ class Demo extends React.Component {
return (
<div>
<Transfer
mode='multiple'
type='multiple'
title={['批量']}
disabled={this.state.disabled}
targetKeys={this.state.targetKeys}
targetIds={this.state.targetKeys}
data={this.state.datas}
onChange={this.onChange.bind(this)}
/>
Expand Down
6 changes: 3 additions & 3 deletions docs/demo/transfer/section-check.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ class Demo extends React.Component {
render () {
return (
<Transfer
mode='multiple'
showAllSelect
targetKeys={this.state.targetKeys}
type='multiple'
showCheckAll
targetIds={this.state.targetKeys}
data={this.state.datas}
onChange={this.onChange.bind(this)}
/>
Expand Down
6 changes: 3 additions & 3 deletions docs/demo/transfer/section-count.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ class Demo extends React.Component {
render () {
return (
<Transfer
mode='multiple'
showAllSelect
type='multiple'
showCheckAll
targetLimit={4}
targetKeys={this.state.targetKeys}
targetIds={this.state.targetKeys}
data={this.state.datas}
onChange={this.onChange.bind(this)}
/>
Expand Down
6 changes: 3 additions & 3 deletions docs/demo/transfer/section-search.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ class Demo extends React.Component {
render () {
return (
<Transfer
mode='multiple'
showAllSelect
type='multiple'
showCheckAll
searchable
targetKeys={this.state.targetKeys}
targetIds={this.state.targetKeys}
data={this.state.datas}
onChange={this.onChange.bind(this)}
/>
Expand Down
8 changes: 8 additions & 0 deletions docs/zh-CN/components/changelog.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# 更新日志

## 2.6.2

- 修复 `<Form />` labelPosition 兼容属性不生效的问题 [#828](https://github.com/XiaoMi/hiui/issues/828)
- 修复 `<Transfer />` type 的问题 [#821](https://github.com/XiaoMi/hiui/issues/821)
- 修复 `<Counter />` step 为负值,max 和 min 不起作用的问题 [#799](https://github.com/XiaoMi/hiui/issues/799)
- 优化 `<Cascader />` filterOption [#832](https://github.com/XiaoMi/hiui/issues/832)
- 修复 `<Cascader />` 受控问题 [#830](https://github.com/XiaoMi/hiui/issues/830)

## 2.6.1

- 修复 `<Cascader />` 不能正确通过搜索过滤选项的问题 [#812](https://github.com/XiaoMi/hiui/issues/812)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hi-ui/hiui",
"version": "2.6.1",
"version": "2.6.2",
"description": "HIUI for React",
"scripts": {
"test": "node_modules/.bin/standard && node_modules/.bin/stylelint --config .stylelintrc 'components/**/*.scss'",
Expand Down

0 comments on commit 9632e2d

Please sign in to comment.