Skip to content

Commit

Permalink
Merge branch 'feature-1.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
gtopia committed Jul 20, 2020
2 parents 8d428cb + 2d389be commit 7dcec1a
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ppfish",
"version": "1.7.6-alpha.2",
"version": "1.7.6-beta.1",
"description": "fish design ui components",
"scripts": {
"precommit": "lint-staged",
Expand Down
7 changes: 7 additions & 0 deletions site/docs/upgradeNotes/1.7/1.7.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@
- RichEditor
- 🐛 粘贴图片或其他文件时,只执行默认的剪切板处理逻辑,防止重复插入两次内容
- 🐛 当前富文本编辑器使用 `pastePlainText` 支持粘贴纯文本后,不应该影响同一个页面内其他富文本编辑器的粘贴行为

### 1.7.6-beta.1
- DateRangePicker
- 🐛 粘贴图片或其他文件时,只执行默认的剪切板处理逻辑,防止重复插入两次内容
- 🐛 当前富文本编辑器使用 `pastePlainText` 支持粘贴纯文本后,不应该影响同一个页面内其他富文本编辑器的粘贴行为
- Table
- 🎊 新增 API `filtrateDefault`,用于控制默认展示数据项,且按column位置展示,不统一在底部展示,区别columnFiltrate.defaultColumns
11 changes: 11 additions & 0 deletions site/docs/upgradeNotes/版本升级说明.md
Original file line number Diff line number Diff line change
Expand Up @@ -1019,3 +1019,14 @@
- RichEditor
- 🐛 粘贴图片或其他文件时,只执行默认的剪切板处理逻辑,防止重复插入两次内容
- 🐛 当前富文本编辑器使用 `pastePlainText` 支持粘贴纯文本后,不应该影响同一个页面内其他富文本编辑器的粘贴行为


---
`2020.7.20`

## 1.7.6-beta.1
- DateRangePicker
- 🐛 粘贴图片或其他文件时,只执行默认的剪切板处理逻辑,防止重复插入两次内容
- 🐛 当前富文本编辑器使用 `pastePlainText` 支持粘贴纯文本后,不应该影响同一个页面内其他富文本编辑器的粘贴行为
- Table
- 🎊 新增 API `filtrateDefault`,用于控制默认展示数据项,且按column位置展示,不统一在底部展示,区别columnFiltrate.defaultColumns
2 changes: 2 additions & 0 deletions site/docs/zh-CN/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const columns = [{
title: 'Address',
dataIndex: 'address',
key: 'address',
filtrateDefault: true,
}, {
title: 'Action',
key: 'action',
Expand Down Expand Up @@ -2264,6 +2265,7 @@ ReactDOM.render(<Demo {...context.props}/>,mountNode);
| filtrateTitle | 筛选Checkbox显示文字 | String \| ReactNode | - |
| width | 列宽度 | String \| Number | - |
| ellipsis | 该列是否使用ellipsis属性,需要配合`scroll.x`使用,且指定列宽度,固定列中使用需要指定为像素宽度。 | Boolean | false |
| filtrateDefault | 默认展示数据项,且按column位置展示,不统一在底部展示,区别columnFiltrate.defaultColumns | Boolean | false |

### ColumnGroup

Expand Down
9 changes: 7 additions & 2 deletions source/components/DatePicker/panel/DateRangePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,14 +342,19 @@ class DateRangePanel extends React.Component {
// 开始日期或结束日期发生改变
handleDateInputChange(e, type) {
const {disabledDate,format} = this.props;
const {minDate, maxDate} = this.state;
const {minDate, maxDate, minTime, maxTime} = this.state;
const text = type === 'min' ? 'minDateInputText' : 'maxDateInputText';
const value = type === 'min' ? 'minDate' : 'maxDate';

const inputText = e.target.value;
const ndate = parseDate(inputText, dateFormat(format));
const getDate = () => {
const ndateMin = [setTime(new Date(ndate), minTime), maxDate];
const ndateMax = [minDate, setTime(new Date(ndate), maxTime)];
return type === 'min' ? ndateMin : ndateMax;
};

if (!isInputValid(inputText, type === 'min'?[ndate, maxDate]:[minDate, ndate], disabledDate)) {
if (!isInputValid(inputText, getDate(), disabledDate)) {
this.setState({
[text]: inputText,
});
Expand Down
4 changes: 2 additions & 2 deletions source/components/Table/ColumnFiltrateModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class ColumnFiltrateModal<T> extends React.Component<ColumnFiltrateProps<T>, Col
this.setState({
checkedOption,
okButtonDisabled: (
JSON.stringify(checkedOption && checkedOption.sort()) ==
JSON.stringify(checkedOption && checkedOption.sort()) ==
JSON.stringify(checkedOptionConfirm && checkedOptionConfirm.sort())
)
});
Expand All @@ -137,7 +137,7 @@ class ColumnFiltrateModal<T> extends React.Component<ColumnFiltrateProps<T>, Col
.map((column) => {
const uniqKey = getColumnKey(column);
//fixed /分组不能控制显示隐藏
const disabled = !!column.fixed || !!column.children;
const disabled = !!column.fixed || !!column.children || !!column.filtrateDefault;
const title = column.filtrateTitle || column.title;
return {
label: <ToolTip title={title}>{title}</ToolTip>,
Expand Down
1 change: 1 addition & 0 deletions source/components/Table/interface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export interface ColumnProps<T> {
onCell?: (record: T) => any;
onHeaderCell?: (props: ColumnProps<T>) => any;
ellipsis?: boolean;
filtrateDefault?: boolean;
}

export interface TableComponents {
Expand Down

0 comments on commit 7dcec1a

Please sign in to comment.