Skip to content

Commit

Permalink
fix: toast in taro environment
Browse files Browse the repository at this point in the history
  • Loading branch information
oasis-cloud committed Dec 11, 2024
1 parent fb9e2f0 commit 87dff85
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions src/packages/empty/demos/taro/demo7.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
import React from 'react'
import { Empty, Toast } from '@nutui/nutui-react'
import { Empty, Toast } from '@nutui/nutui-react-taro'

const Demo7 = () => {
return (
<Empty
status="error"
description="加载失败"
style={{ marginBottom: '20px' }}
actions={[
{
text: 'Action',
type: 'info',
onClick: () => {
Toast.show({ title: 'Action Click!' })
<>
<Toast id="toast-empty" />
<Empty
status="error"
description="加载失败"
style={{ marginBottom: '20px' }}
actions={[
{
text: 'Action',
type: 'info',
onClick: () => {
Toast.show('toast-empty', { title: 'Action Click!' })
},
},
},
]}
/>
]}
/>
</>
)
}
export default Demo7

0 comments on commit 87dff85

Please sign in to comment.