Skip to content

Commit

Permalink
Merge pull request #1313 from XiaoMi/develop
Browse files Browse the repository at this point in the history
3.1.0
  • Loading branch information
zhan8863 authored Nov 12, 2020
2 parents d16fdd1 + 6357e51 commit f90a556
Show file tree
Hide file tree
Showing 84 changed files with 624 additions and 566 deletions.
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# 更新日志

## 3.1.0

- 新增 `Card` bordered 属性配置是否显示边框 [#1296](https://github.com/XiaoMi/hiui/issues/1296)
- 修复 `Input` 在受控状态下,设置 value 为 null 时报错问题 [#1246](https://github.com/XiaoMi/hiui/issues/1246)
- 修复 `Select` 设置 autoload 为 true 时无限的调用接口问题 [#1249](https://github.com/XiaoMi/hiui/issues/1249)
- 修复 `Select` 异步多选,点击清空下拉数据未清空问题 [#1293](https://github.com/XiaoMi/hiui/issues/1293)
- 修复 `Timepicker` 弹出层在页面底部未翻转到上方问题 [#1253](https://github.com/XiaoMi/hiui/issues/1253)
- 优化 `Timepicker` 支持字符串格式的 value [#1245](https://github.com/XiaoMi/hiui/issues/1245)
- 修复 `SelectTree` 弹出层在页面底部不能翻转问题 [#1254](https://github.com/XiaoMi/hiui/issues/1254)
- 修复 `DatePicker` 周范围显示异常问题 [#1267](https://github.com/XiaoMi/hiui/issues/1267)
- 修复 `SelectTree` data 数据中 Children 为空数组报错问题 [#1261](https://github.com/XiaoMi/hiui/issues/1261)
- 修复 `SelectTree` 在 Form 包裹下样式显示异常 [#1310](https://github.com/XiaoMi/hiui/issues/1310)
- 修复 `Tag` 使用 ref 无效问题 [#1262](https://github.com/XiaoMi/hiui/issues/1262)
- 修复 `Table` data 为 undefined 时的报错问题 [#1265](https://github.com/XiaoMi/hiui/issues/1265)
- 修复 `Loading` 显示不正确的问题 [#1265](https://github.com/XiaoMi/hiui/issues/1268)
- 优化 `SelectTree` 样式问题 [#1272](https://github.com/XiaoMi/hiui/issues/1272)
- 修复 `Table` data 为 undefined 时的报错问题 [#1273](https://github.com/XiaoMi/hiui/issues/1265)
- 修复 `Loading` 显示不正确的问题 [#1268](https://github.com/XiaoMi/hiui/issues/1268)
- 修复 `Tag` 闪烁问题 [#1273](https://github.com/XiaoMi/hiui/issues/1273)
- 修复 `Timeline` 折断样式问题 [#1276](https://github.com/XiaoMi/hiui/issues/1276)
- 修复 `Timeline` 只有一条数据时的样式问题 [#1277](https://github.com/XiaoMi/hiui/issues/1277)
- 修复 `SelectTree` 受控问题 [#1283](https://github.com/XiaoMi/hiui/issues/1283)
- 修复 `Popover` 包裹函数组件无法触发问题 [#1282](https://github.com/XiaoMi/hiui/issues/1282)
- 修复 `Pagination` 输入页码后回车键报错的问题 [#1299](https://github.com/XiaoMi/hiui/issues/1299)
- 优化 `Upload` 不同 type 文件类型默认值 [#1286](https://github.com/XiaoMi/hiui/issues/1286)
- 优化 `Filter` 返回值问题 [#1288](https://github.com/XiaoMi/hiui/issues/1288)
- 优化 `Tabs` 线型模式样式 [#1291](https://github.com/XiaoMi/hiui/issues/1291)
- 优化 `Breadcrumb` 渲染方式 [#1303](https://github.com/XiaoMi/hiui/issues/1303)
- 优化 `Form` 组件 Form.Item 宽度设置问题 [#1295](https://github.com/XiaoMi/hiui/issues/1295)

## 3.0.0

- 新增:`Slider` 滑块组件 [#1225](https://github.com/XiaoMi/hiui/issues/1225)
Expand Down
11 changes: 6 additions & 5 deletions components/breadcrumb/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@ import Provider from '../context'

import './style/index'

const Breadcrumb = props => {
const Breadcrumb = (props) => {
const { separator, data, onClick, theme } = props

return (
<ul className={`hi-breadcrumb theme__${theme}`}>
{data.map((item, index) => {
return (
<li key={index} className='hi-breadcrumb__item'>
{item.path && index !== data.length - 1 ? (
<li key={index} className="hi-breadcrumb__item">
{item.href && index !== data.length - 1 ? (
<a
href={item.path}
href={item.href}
target={item.target}
onClick={() => {
onClick(item, index)
}}
Expand All @@ -42,7 +43,7 @@ const Breadcrumb = props => {
</span>
)}

<span className='hi-breadcrumb__separator'>{separator}</span>
<span className="hi-breadcrumb__separator">{separator}</span>
</li>
)
})}
Expand Down
5 changes: 3 additions & 2 deletions components/card/CoverCard.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import React from 'react'
import classNames from 'classnames'

const CoverCard = ({ cover, coverUrl, content, size, title, style, className, hoverable }) => {
const CoverCard = ({ cover, coverUrl, content, size, title, style, className, hoverable, bordered }) => {
return (
<div
className={classNames('hi-card', 'hi-card--cover', className, {
[`hi-card--${size}`]: size,
'hi-card--hoverable': hoverable
'hi-card--hoverable': hoverable,
'hi-card--bordered': bordered
})}
style={style}
>
Expand Down
5 changes: 3 additions & 2 deletions components/card/NormalCard.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import React from 'react'
import classNames from 'classnames'

const NormalCard = ({ children, size, title, extra, showHeaderDivider, style, className, hoverable }) => {
const NormalCard = ({ children, size, title, extra, showHeaderDivider, style, className, hoverable, bordered }) => {
return (
<div
className={classNames('hi-card', className, showHeaderDivider ? 'hi-card--standard' : 'hi-card--normal', {
[`hi-card--${size}`]: size,
'hi-card--hoverable': hoverable
'hi-card--hoverable': hoverable,
'hi-card--bordered': bordered
})}
style={style}
>
Expand Down
5 changes: 3 additions & 2 deletions components/card/SimpleCard.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import React from 'react'
import classNames from 'classnames'

const SimpleCard = ({ children, size, style, className, hoverable }) => {
const SimpleCard = ({ children, size, style, className, hoverable, bordered }) => {
return (
<div
className={classNames('hi-card', 'hi-card--simple', className, {
[`hi-card--${size}`]: size,
'hi-card--hoverable': hoverable
'hi-card--hoverable': hoverable,
'hi-card--bordered': bordered
})}
style={style}
>
Expand Down
1 change: 1 addition & 0 deletions components/card/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
interface Props {
title?: string | JSX.Element
bordered?: boolean
size?: 'small' | 'default' | 'large'
type?: 'simple' | 'default'
hoverable?: boolean
Expand Down
7 changes: 5 additions & 2 deletions components/card/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const Card = ({
content,
children,
showHeaderDivider,
type
type,
bordered = true
}) => {
if (cover || coverUrl) {
return (
Expand All @@ -28,14 +29,15 @@ const Card = ({
style={style}
content={content}
hoverable={hoverable}
bordered={bordered}
>
{children}
</CoverCard>
)
}
if (type === 'simple') {
return (
<SimpleCard size={size} style={style} className={className} hoverable={hoverable}>
<SimpleCard bordered={bordered} size={size} style={style} className={className} hoverable={hoverable}>
{children}
</SimpleCard>
)
Expand All @@ -49,6 +51,7 @@ const Card = ({
className={className}
showHeaderDivider={showHeaderDivider}
hoverable={hoverable}
bordered={bordered}
>
{children}
</NormalCard>
Expand Down
5 changes: 4 additions & 1 deletion components/card/style/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

.hi-card {
border-radius: 2px;
border: 1px solid use-color('gray-20');
box-sizing: border-box;
background: use-color('white');

&--bordered {
border: 1px solid use-color('gray-20');
}

&--simple {
height: 40px;
overflow: hidden;
Expand Down
3 changes: 2 additions & 1 deletion components/date-picker/BasePicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ const BasePicker = ({
value,
type,
defaultValue,
cacheDate
cacheDate,
format
})
const [iFormat] = useFormat({
type,
Expand Down
4 changes: 2 additions & 2 deletions components/date-picker/TimePicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ const TimePicker = ({
value,
type,
defaultValue,
cacheDate
cacheDate,
format
})

const inputChangeEvent = (val, dir) => {
Expand Down Expand Up @@ -142,7 +143,6 @@ const TimePicker = ({
leftGap={0}
overlayClassName={overlayClassName}
width={false}
preventOverflow
className={timePopperCls}
placement={placement}
onClickOutside={clickOutsideEvent}
Expand Down
Loading

0 comments on commit f90a556

Please sign in to comment.