Skip to content

Commit 116fbbf

Browse files
authored
feat(Empty): V14 (#2760)
1 parent 1fa8c82 commit 116fbbf

File tree

21 files changed

+77
-57
lines changed

21 files changed

+77
-57
lines changed

src/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,8 @@
770770
"sort": 16,
771771
"show": true,
772772
"taro": true,
773-
"author": "liukun"
773+
"author": "liukun",
774+
"v14": true
774775
},
775776
{
776777
"version": "3.0.0",

src/packages/calendarcard/calendarcard.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,12 @@
115115
&.prev,
116116
&.next,
117117
&.disabled {
118+
cursor: not-allowed;
118119
.nut-calendarcard-day-top,
119120
.nut-calendarcard-day-inner,
120121
.nut-calendarcard-day-bottom {
121122
color: $calendar-disable-color;
122123
}
123-
cursor: not-allowed;
124124
}
125125
}
126126
}

src/packages/empty/__test__/empty.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ test('should render actions correctly', () => {
3131
actions={[{ text: '操作1' }, { text: '操作2' }]}
3232
/>
3333
)
34-
expect(container.querySelector('.nut-empty-actions')).toBeTruthy()
34+
expect(container.querySelector('.nut-empty-actions-base')).toBeTruthy()
3535
expect(
36-
container.querySelectorAll('.nut-empty-actions .nut-button').length
36+
container.querySelectorAll('.nut-empty-actions-base .nut-button').length
3737
).toEqual(2)
3838
})
3939
test('should render custom image correctly', () => {

src/packages/empty/demos/h5/demo1.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,19 @@ const Demo1 = () => {
55
return (
66
<>
77
<Empty
8-
title="标题"
9-
description="无数据"
10-
actions={[{ text: '操作按钮' }, { text: '操作按钮', type: 'primary' }]}
8+
title="全屏缺省标题"
9+
description="内容描述内容描述内容描述"
10+
actions={[{ text: '次要操作' }, { text: '主要操作', type: 'primary' }]}
1111
/>
1212
<Empty
13-
description="无数据"
13+
description="内容描述内容描述内容描述"
1414
actions={[{ text: '操作按钮' }]}
1515
style={{ marginTop: '10px' }}
1616
/>
17-
<Empty description="无数据" style={{ marginTop: '10px' }} />
17+
<Empty
18+
description="内容描述内容描述内容描述"
19+
style={{ marginTop: '10px' }}
20+
/>
1821
</>
1922
)
2023
}

src/packages/empty/demos/h5/demo2.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ import React from 'react'
22
import { Empty } from '@nutui/nutui-react'
33

44
const Demo2 = () => {
5-
return <Empty description="无数据" size="small" />
5+
return (
6+
<Empty
7+
title="半屏缺省标题"
8+
description="内容描述内容描述内容描述"
9+
size="small"
10+
/>
11+
)
612
}
713
export default Demo2

src/packages/empty/demos/h5/demo3.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ import React from 'react'
22
import { Empty } from '@nutui/nutui-react'
33

44
const Demo3 = () => {
5-
return <Empty description="无数据" imageSize={80} />
5+
return <Empty description="内容描述内容描述" imageSize={80} />
66
}
77
export default Demo3

src/packages/empty/demos/h5/demo4.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ const Demo4 = () => {
1111
setTabvalue(paneKey)
1212
}}
1313
>
14-
<TabPane title="无内容" value="0">
15-
<Empty status="empty" title="无内容" />
14+
<TabPane title="通用空状态" value="0">
15+
<Empty status="empty" title="通用空状态" />
1616
</TabPane>
1717
<TabPane title="加载失败/错误" value="1">
1818
<Empty status="error" title="加载失败/错误" />
1919
</TabPane>
20-
<TabPane title="无网络" value="2">
21-
<Empty status="network" title="无网络" />
20+
<TabPane title="网络异常" value="2">
21+
<Empty status="network" title="网络异常" />
2222
</TabPane>
2323
</Tabs>
2424
)

src/packages/empty/demos/h5/demo6.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const Demo6 = () => {
99
style={{ marginBottom: '20px' }}
1010
>
1111
<div style={{ marginTop: '10px' }}>
12-
<Button icon="refresh" type="primary" size="small">
13-
重试
12+
<Button type="primary" size="small">
13+
刷新重试
1414
</Button>
1515
</div>
1616
</Empty>

src/packages/empty/demos/taro/demo1.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,19 @@ const Demo1 = () => {
66
return (
77
<>
88
<Empty
9-
title="标题"
10-
description="无数据"
11-
actions={[{ text: '操作按钮' }, { text: '操作按钮', type: 'primary' }]}
9+
title="全屏缺省标题"
10+
description="内容描述内容描述内容描述"
11+
actions={[{ text: '次要操作' }, { text: '主要操作', type: 'primary' }]}
1212
/>
1313
<Empty
14-
description="无数据"
14+
description="内容描述内容描述内容描述"
1515
actions={[{ text: '操作按钮' }]}
1616
style={{ marginTop: pxTransform(10) }}
1717
/>
18-
<Empty description="无数据" style={{ marginTop: pxTransform(10) }} />
18+
<Empty
19+
description="内容描述内容描述内容描述"
20+
style={{ marginTop: pxTransform(10) }}
21+
/>
1922
</>
2023
)
2124
}

src/packages/empty/demos/taro/demo2.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ import React from 'react'
22
import { Empty } from '@nutui/nutui-react-taro'
33

44
const Demo2 = () => {
5-
return <Empty description="无数据" size="small" />
5+
return (
6+
<Empty
7+
title="半屏缺省标题"
8+
description="内容描述内容描述内容描述"
9+
size="small"
10+
/>
11+
)
612
}
713
export default Demo2

0 commit comments

Comments
 (0)