Skip to content

Commit b041594

Browse files
authored
chore: 删除有依赖的 demo (jdf2e#2401)
1 parent 15f2b1c commit b041594

File tree

14 files changed

+160
-131
lines changed

14 files changed

+160
-131
lines changed

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

+8-7
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

+4-3
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

+4-3
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
提交
+23-17
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

+12-11
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

+13-12
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

+3-2
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

+3-2
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

+2-10
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

-27
This file was deleted.

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

+30-12
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,65 @@
1-
import React from 'react'
1+
import React, { CSSProperties } from 'react'
22
import { Row, Col } from '@nutui/nutui-react-taro'
3+
import { pxTransform } from '@tarojs/taro'
34
import { View } from '@tarojs/components'
4-
import '../../demo.scss'
55

66
const Demo1 = () => {
7+
const flexContent: CSSProperties = {
8+
display: 'flex',
9+
flexDirection: 'row',
10+
width: '100%',
11+
height: pxTransform(40),
12+
alignItems: 'center',
13+
justifyContent: 'center',
14+
color: '#fff',
15+
textAlign: 'center',
16+
borderRadius: pxTransform(6),
17+
backgroundColor: '#ff8881',
18+
fontSize: pxTransform(14),
19+
}
20+
const flexContentLight: CSSProperties = {
21+
...flexContent,
22+
backgroundColor: '#ffc7c4',
23+
}
24+
725
return (
826
<>
927
<Row>
1028
<Col span="24">
11-
<View className="flex-content">span:24</View>
29+
<View style={flexContent}>span:24</View>
1230
</Col>
1331
</Row>
1432
<Row>
1533
<Col span="12">
16-
<View className="flex-content">span:12</View>
34+
<View style={flexContent}>span:12</View>
1735
</Col>
1836
<Col span="12">
19-
<View className="flex-content-light">span:12</View>
37+
<View style={flexContentLight}>span:12</View>
2038
</Col>
2139
</Row>
2240
<Row>
2341
<Col span="8">
24-
<View className="flex-content">span:8</View>
42+
<View style={flexContent}>span:8</View>
2543
</Col>
2644
<Col span="8">
27-
<View className="flex-content-light">span:8</View>
45+
<View style={flexContentLight}>span:8</View>
2846
</Col>
2947
<Col span="8">
30-
<View className="flex-content">span:8</View>
48+
<View style={flexContent}>span:8</View>
3149
</Col>
3250
</Row>
3351
<Row>
3452
<Col span="6">
35-
<View className="flex-content">span:6</View>
53+
<View style={flexContent}>span:6</View>
3654
</Col>
3755
<Col span="6">
38-
<View className="flex-content-light">span:6</View>
56+
<View style={flexContentLight}>span:6</View>
3957
</Col>
4058
<Col span="6">
41-
<View className="flex-content">span:6</View>
59+
<View style={flexContent}>span:6</View>
4260
</Col>
4361
<Col span="6">
44-
<View className="flex-content-light">span:6</View>
62+
<View style={flexContentLight}>span:6</View>
4563
</Col>
4664
</Row>
4765
</>

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

+23-6
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,37 @@
1-
import React from 'react'
2-
import { Col, Row } from '@nutui/nutui-react-taro'
1+
import React, { CSSProperties } from 'react'
2+
import { Row, Col } from '@nutui/nutui-react-taro'
3+
import { pxTransform } from '@tarojs/taro'
34
import { View } from '@tarojs/components'
4-
import '../../demo.scss'
55

66
const Demo2 = () => {
7+
const flexContent: CSSProperties = {
8+
display: 'flex',
9+
width: '100%',
10+
height: pxTransform(40),
11+
alignItems: 'center',
12+
justifyContent: 'center',
13+
color: '#fff',
14+
textAlign: 'center',
15+
borderRadius: pxTransform(6),
16+
backgroundColor: '#ff8881',
17+
fontSize: pxTransform(14),
18+
}
19+
const flexContentLight: CSSProperties = {
20+
...flexContent,
21+
backgroundColor: '#ffc7c4',
22+
}
23+
724
return (
825
<>
926
<Row gutter="10">
1027
<Col span="8">
11-
<View className="flex-content">span:8</View>
28+
<View style={flexContent}>span:8</View>
1229
</Col>
1330
<Col span="8">
14-
<View className="flex-content-light">span:8</View>
31+
<View style={flexContentLight}>span:8</View>
1532
</Col>
1633
<Col span="8">
17-
<View className="flex-content">span:8</View>
34+
<View style={flexContent}>span:8</View>
1835
</Col>
1936
</Row>
2037
</>

0 commit comments

Comments
 (0)