Skip to content

Commit 81ea400

Browse files
committed
chore: 删除有依赖的 demo
1 parent 2c62aff commit 81ea400

File tree

14 files changed

+160
-131
lines changed

14 files changed

+160
-131
lines changed

src/packages/avatar/demos/taro/demo5.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
2-
import { Avatar, Badge, Cell } from '@nutui/nutui-react-taro'
2+
// import { Avatar, Badge, Cell } from '@nutui/nutui-react-taro'
3+
import { Avatar, Cell } from '@nutui/nutui-react-taro'
34
import { User } from '@nutui/icons-react-taro'
45
import { harmonyAndRn } from '@/utils/platform-taro'
56

@@ -8,12 +9,12 @@ const Demo5 = () => {
89
<Cell className="cell-avatar">
910
{harmonyAndRn() ? null : (
1011
<>
11-
<Badge value="8">
12-
<Avatar icon={<User />} shape="square" />
13-
</Badge>
14-
<Badge dot>
15-
<Avatar icon={<User />} shape="square" />
16-
</Badge>
12+
{/* <Badge value="8"> */}
13+
<Avatar icon={<User />} shape="square" />
14+
{/* </Badge> */}
15+
{/* <Badge dot> */}
16+
<Avatar icon={<User />} shape="square" />
17+
{/* </Badge> */}
1718
</>
1819
)}
1920
</Cell>

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import React from 'react'
2-
import { ConfigProvider, Cell, Rate, Button } from '@nutui/nutui-react-taro'
3-
import { harmonyAndRn } from '@/utils/platform-taro'
2+
// import { ConfigProvider, Cell, Rate, Button } from '@nutui/nutui-react-taro'
3+
import { ConfigProvider, Cell, Button } from '@nutui/nutui-react-taro'
4+
// import { harmonyAndRn } from '@/utils/platform-taro'
45
// todo rate icon
56
const Demo1 = () => {
67
return (
78
<>
89
<ConfigProvider>
910
<Cell.Group>
10-
<Cell>{harmonyAndRn() ? null : <Rate defaultValue={3} />}</Cell>
11+
{/* <Cell>{harmonyAndRn() ? null : <Rate defaultValue={3} />}</Cell> */}
1112
<Cell>
1213
<Button type="primary" block>
1314
提交

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react'
2-
import { ConfigProvider, Cell, Rate, Button } from '@nutui/nutui-react-taro'
3-
import { harmonyAndRn } from '@/utils/platform-taro'
2+
import { ConfigProvider, Cell, Button } from '@nutui/nutui-react-taro'
3+
// import { ConfigProvider, Cell, Rate, Button } from '@nutui/nutui-react-taro'
4+
// import { harmonyAndRn } from '@/utils/platform-taro'
45

56
const Demo2 = () => {
67
const darkTheme = {
@@ -12,7 +13,7 @@ const Demo2 = () => {
1213
<>
1314
<ConfigProvider theme={darkTheme}>
1415
<Cell.Group>
15-
<Cell>{harmonyAndRn() ? null : <Rate defaultValue={3} />}</Cell>
16+
{/* <Cell>{harmonyAndRn() ? null : <Rate defaultValue={3} />}</Cell> */}
1617
<Cell>
1718
<Button type="primary" block>
1819
提交
Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,32 @@
11
import React, { useState } from 'react'
2-
import { Tabs, TabPane, Empty } from '@nutui/nutui-react-taro'
2+
// import { Tabs, TabPane, Empty } from '@nutui/nutui-react-taro'
3+
import { Empty } from '@nutui/nutui-react-taro'
34

45
const Demo4 = () => {
56
const [tabvalue, setTabvalue] = useState<string | number>('0')
67

78
return (
8-
<Tabs
9-
value={tabvalue}
10-
onChange={(paneKey) => {
11-
setTabvalue(paneKey)
12-
}}
13-
>
14-
<TabPane title="无内容" value="0">
15-
<Empty status="empty" title="无内容" />
16-
</TabPane>
17-
<TabPane title="加载失败/错误" value="1">
18-
<Empty status="error" title="加载失败/错误" />
19-
</TabPane>
20-
<TabPane title="无网络" value="2">
21-
<Empty status="network" title="无网络" />
22-
</TabPane>
23-
</Tabs>
9+
// <Tabs
10+
// value={tabvalue}
11+
// onChange={(paneKey) => {
12+
// setTabvalue(paneKey)
13+
// }}
14+
// >
15+
// <TabPane title="无内容" value="0">
16+
// <Empty status="empty" title="无内容" />
17+
// </TabPane>
18+
// <TabPane title="加载失败/错误" value="1">
19+
// <Empty status="error" title="加载失败/错误" />
20+
// </TabPane>
21+
// <TabPane title="无网络" value="2">
22+
// <Empty status="network" title="无网络" />
23+
// </TabPane>
24+
// </Tabs>
25+
<>
26+
<Empty status="empty" title="无内容" />
27+
<Empty status="error" title="加载失败/错误" />
28+
<Empty status="network" title="无网络" />
29+
</>
2430
)
2531
}
2632
export default Demo4

src/packages/hoverbutton/demos/taro/demo3-rn.tsx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,24 @@
22
* 有底部导航栏的情况
33
*/
44
import React from 'react'
5-
import { HoverButton, Tabbar } from '@nutui/nutui-react-taro'
5+
// import { HoverButton, Tabbar } from '@nutui/nutui-react-taro'
6+
import { HoverButton } from '@nutui/nutui-react-taro'
67
import { View, Icon } from '@tarojs/components'
7-
import { Cart, Category, Find, Home, User } from '@nutui/icons-react-taro'
8+
// import { Cart, Category, Find, Home, User } from '@nutui/icons-react-taro'
89

910
const Demo3 = () => {
1011
return (
1112
<View>
1213
<HoverButton icon={<Icon type="search" />} tabbarHeight={48} />
13-
{process.env.TARO_ENV !== 'rn' && process.env.TARO_ENV !== 'jdrn' && (
14-
<Tabbar fixed>
15-
<Tabbar.Item title="首页" icon={<Home size={18} />} />
16-
<Tabbar.Item title="分类" icon={<Category size={18} />} />
17-
<Tabbar.Item title="发现" icon={<Find size={18} />} />
18-
<Tabbar.Item title="购物车" icon={<Cart size={18} />} />
19-
<Tabbar.Item title="我的" icon={<User size={18} />} />
20-
</Tabbar>
21-
)}
14+
{/* {process.env.TARO_ENV !== 'rn' && process.env.TARO_ENV !== 'jdrn' && ( */}
15+
{/* <Tabbar fixed> */}
16+
{/* <Tabbar.Item title="首页" icon={<Home size={18} />} /> */}
17+
{/* <Tabbar.Item title="分类" icon={<Category size={18} />} /> */}
18+
{/* <Tabbar.Item title="发现" icon={<Find size={18} />} /> */}
19+
{/* <Tabbar.Item title="购物车" icon={<Cart size={18} />} /> */}
20+
{/* <Tabbar.Item title="我的" icon={<User size={18} />} /> */}
21+
{/* </Tabbar> */}
22+
{/* )} */}
2223
</View>
2324
)
2425
}

src/packages/hoverbutton/demos/taro/demo3.tsx

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,24 @@
22
* 有底部导航栏的情况
33
*/
44
import React from 'react'
5-
import { HoverButton, Tabbar } from '@nutui/nutui-react-taro'
5+
// import { HoverButton, Tabbar } from '@nutui/nutui-react-taro'
6+
// import { HoverButton } from '@nutui/nutui-react-taro'
67
import { View } from '@tarojs/components'
7-
import { Cart, Category, Find, Home, User } from '@nutui/icons-react-taro'
8+
// import { Cart, Category, Find, Home, User } from '@nutui/icons-react-taro'
89

910
const Demo3 = () => {
1011
return (
1112
<View>
12-
<HoverButton icon={<Cart />} tabbarHeight={48} />
13-
{process.env.TARO_ENV !== 'rn' && process.env.TARO_ENV !== 'jdrn' && (
14-
<Tabbar fixed>
15-
<Tabbar.Item title="首页" icon={<Home size={18} />} />
16-
<Tabbar.Item title="分类" icon={<Category size={18} />} />
17-
<Tabbar.Item title="发现" icon={<Find size={18} />} />
18-
<Tabbar.Item title="购物车" icon={<Cart size={18} />} />
19-
<Tabbar.Item title="我的" icon={<User size={18} />} />
20-
</Tabbar>
21-
)}
13+
{/* <HoverButton icon={<Cart />} tabbarHeight={48} /> */}
14+
{/* {process.env.TARO_ENV !== 'rn' && process.env.TARO_ENV !== 'jdrn' && ( */}
15+
{/* <Tabbar fixed> */}
16+
{/* <Tabbar.Item title="首页" icon={<Home size={18} />} /> */}
17+
{/* <Tabbar.Item title="分类" icon={<Category size={18} />} /> */}
18+
{/* <Tabbar.Item title="发现" icon={<Find size={18} />} /> */}
19+
{/* <Tabbar.Item title="购物车" icon={<Cart size={18} />} /> */}
20+
{/* <Tabbar.Item title="我的" icon={<User size={18} />} /> */}
21+
{/* </Tabbar> */}
22+
{/* )} */}
2223
</View>
2324
)
2425
}

src/packages/hoverbutton/demos/taro/demo4-rn.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
* 自定义层级
33
*/
44
import React from 'react'
5-
import { HoverButton, SafeArea } from '@nutui/nutui-react-taro'
5+
// import { HoverButton, SafeArea } from '@nutui/nutui-react-taro'
6+
import { HoverButton } from '@nutui/nutui-react-taro'
67
import { View, Icon, Text } from '@tarojs/components'
78
// import { Cart } from '@nutui/icons-react-taro'
89
import Taro, { pxTransform } from '@tarojs/taro'
@@ -30,7 +31,7 @@ const App = () => {
3031
>
3132
这个图层层级为 100
3233
</Text>
33-
<SafeArea position="bottom" />
34+
{/* <SafeArea position="bottom" /> */}
3435
</View>
3536
</View>
3637
)

src/packages/hoverbutton/demos/taro/demo4.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
* 自定义层级
33
*/
44
import React from 'react'
5-
import { HoverButton, SafeArea } from '@nutui/nutui-react-taro'
5+
// import { HoverButton, SafeArea } from '@nutui/nutui-react-taro'
6+
import { HoverButton } from '@nutui/nutui-react-taro'
67
import { View } from '@tarojs/components'
78
import { Cart } from '@nutui/icons-react-taro'
89
import Taro, { pxTransform } from '@tarojs/taro'
@@ -30,7 +31,7 @@ const App = () => {
3031
>
3132
这个图层层级为 100
3233
</View>
33-
<SafeArea position="bottom" />
34+
{/* <SafeArea position="bottom" /> */}
3435
</View>
3536
</View>
3637
)

src/packages/input/demos/taro/demo12.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
import React from 'react'
2-
import { Input, Toast } from '@nutui/nutui-react-taro'
2+
import { Input } from '@nutui/nutui-react-taro'
33

44
const Demo12 = () => {
55
return (
66
<>
7-
<Input
8-
placeholder="事件"
9-
onClick={() =>
10-
Toast.show('click', {
11-
title: 'onClick',
12-
})
13-
}
14-
placeholderTextColor="#757575"
15-
/>
7+
<Input placeholder="事件" placeholderTextColor="#757575" />
168
</>
179
)
1810
}

src/packages/layout/demo.scss

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)