Skip to content

Commit 5611f25

Browse files
authored
docs(toast): 修复文档中的函数式例子 (#2957)
1 parent 4c7366b commit 5611f25

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/packages/toast/demo.taro.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from 'react'
22
import Taro from '@tarojs/taro'
3-
import { Toast } from '@nutui/nutui-react-taro'
43
import Header from '@/sites/components/header'
54
import { useTranslate } from '@/sites/assets/locale/taro'
65
import Demo1 from './demos/taro/demo1'
@@ -38,7 +37,6 @@ const ToastDemo = () => {
3837
<h2>{translated.basic}</h2>
3938
<Demo1 />
4039
<h2>{translated.toastFunction}</h2>
41-
<Toast id="test" />
4240
<Demo2 />
4341

4442
<h2>{translated.toastDuration}</h2>

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

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Cell, Toast } from '@nutui/nutui-react-taro'
55
const Demo5 = () => {
66
return (
77
<>
8+
<Toast id="test" />
89
<Cell
910
title="函数调用"
1011
onClick={() => {

0 commit comments

Comments
 (0)