Skip to content

Commit

Permalink
fix(empty): 修复 harmonycpp 部分未适配问题
Browse files Browse the repository at this point in the history
  • Loading branch information
irisSong committed Oct 29, 2024
1 parent f345048 commit eded372
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/packages/empty/demos/taro/demo1.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { Empty } from '@nutui/nutui-react-taro'
import pxTransform from '@/utils/px-transform'

const Demo1 = () => {
return (
Expand All @@ -12,9 +13,9 @@ const Demo1 = () => {
<Empty
description="无数据"
actions={[{ text: '操作按钮' }]}
style={{ marginTop: '10px' }}
style={{ marginTop: pxTransform(10) }}
/>
<Empty description="无数据" style={{ marginTop: '10px' }} />
<Empty description="无数据" style={{ marginTop: pxTransform(10) }} />
</>
)
}
Expand Down
3 changes: 2 additions & 1 deletion src/packages/empty/demos/taro/demo3.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react'
import { Empty } from '@nutui/nutui-react-taro'
import pxTransform from '@/utils/px-transform'

const Demo3 = () => {
return <Empty description="无数据" imageSize={80} />
return <Empty description="无数据" imageSize={pxTransform(80)} />
}
export default Demo3
3 changes: 2 additions & 1 deletion src/packages/empty/demos/taro/demo6.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React from 'react'
import { Empty, Button } from '@nutui/nutui-react-taro'
import { View } from '@tarojs/components'
import pxTransform from '@/utils/px-transform'

const Demo6 = () => {
return (
<Empty status="error" description="加载失败">
<View style={{ marginTop: '10px' }}>
<View style={{ marginTop: pxTransform(10) }}>
<Button type="primary" size="small">
重试
</Button>
Expand Down

0 comments on commit eded372

Please sign in to comment.