Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@
"show": true,
"taro": true,
"author": "swag~jun",
"dd": false
"dd": true
},
{
"version": "3.0.0",
Expand Down
6 changes: 0 additions & 6 deletions src/packages/avatar/demo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,4 @@
.avatar-demo .nut-cell {
align-items: flex-end;
border-radius: 0;

& > div,
& > taro-view-core,
& > view {
margin-inline-end: 30px;
}
}
3 changes: 3 additions & 0 deletions src/packages/avatar/demos/h5/demo1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@ import React from 'react'
import { Avatar, Cell } from '@nutui/nutui-react'

const Demo1 = () => {
const styles = { marginRight: '30px' }
return (
<Cell align="flex-end">
<Avatar
size="large"
src="https://img12.360buyimg.com/imagetools/jfs/t1/143702/31/16654/116794/5fc6f541Edebf8a57/4138097748889987.png"
style={styles}
/>
<Avatar
size="normal"
src="https://img12.360buyimg.com/imagetools/jfs/t1/143702/31/16654/116794/5fc6f541Edebf8a57/4138097748889987.png"
style={styles}
/>
<Avatar
size="small"
Expand Down
3 changes: 2 additions & 1 deletion src/packages/avatar/demos/h5/demo2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { Avatar, Cell } from '@nutui/nutui-react'
import { User } from '@nutui/icons-react'

const Demo2 = () => {
const styles = { marginRight: '30px' }
return (
<Cell>
<Avatar icon={<User />} shape="square" />
<Avatar icon={<User />} shape="square" style={styles} />
<Avatar icon={<User />} shape="round" />
</Cell>
)
Expand Down
8 changes: 6 additions & 2 deletions src/packages/avatar/demos/h5/demo3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ import { Avatar, Cell } from '@nutui/nutui-react'
import { User } from '@nutui/icons-react'

const Demo3 = () => {
const styles = { marginRight: '30px' }
return (
<Cell>
<Avatar src="https://img12.360buyimg.com/imagetools/jfs/t1/143702/31/16654/116794/5fc6f541Edebf8a57/4138097748889987.png" />
<Avatar icon={<User />} />
<Avatar
src="https://img12.360buyimg.com/imagetools/jfs/t1/143702/31/16654/116794/5fc6f541Edebf8a57/4138097748889987.png"
style={styles}
/>
<Avatar icon={<User />} style={styles} />
<Avatar>N</Avatar>
</Cell>
)
Expand Down
2 changes: 2 additions & 0 deletions src/packages/avatar/demos/h5/demo4.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import { Avatar, Cell } from '@nutui/nutui-react'
import { User } from '@nutui/icons-react'

const Demo4 = () => {
const styles = { marginRight: '30px' }
return (
<Cell>
<Avatar
color="#fff"
background="var(--nutui-color-primary)"
icon={<User />}
style={styles}
/>
<Avatar
color="var(--nutui-color-primary)"
Expand Down
3 changes: 2 additions & 1 deletion src/packages/avatar/demos/h5/demo5.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { Avatar, Badge, Cell } from '@nutui/nutui-react'
import { User } from '@nutui/icons-react'

const Demo5 = () => {
const styles = { marginRight: '30px' }
return (
<Cell>
<Badge value="8">
<Badge value="8" style={styles}>
<Avatar icon={<User />} shape="square" />
</Badge>
<Badge dot>
Expand Down
7 changes: 6 additions & 1 deletion src/packages/avatar/demos/taro/demo1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ import React from 'react'
import { Avatar, Cell } from '@nutui/nutui-react-taro'

const Demo1 = () => {
const styles = { marginRight: 30 }
return (
<Cell className="cell-avatar" align="flex-end">
<Avatar
size="60"
src="https://img12.360buyimg.com/imagetools/jfs/t1/143702/31/16654/116794/5fc6f541Edebf8a57/4138097748889987.png"
style={styles}
/>
<Avatar
style={styles}
src="https://img12.360buyimg.com/imagetools/jfs/t1/143702/31/16654/116794/5fc6f541Edebf8a57/4138097748889987.png"
/>
<Avatar src="https://img12.360buyimg.com/imagetools/jfs/t1/143702/31/16654/116794/5fc6f541Edebf8a57/4138097748889987.png" />
<Avatar
size="32"
src="https://img12.360buyimg.com/imagetools/jfs/t1/143702/31/16654/116794/5fc6f541Edebf8a57/4138097748889987.png"
Expand Down
3 changes: 2 additions & 1 deletion src/packages/avatar/demos/taro/demo2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { Avatar, Cell } from '@nutui/nutui-react-taro'
import { User } from '@nutui/icons-react-taro'

const Demo2 = () => {
const styles = { marginRight: 30 }
return (
<Cell className="cell-avatar">
<Avatar icon={<User />} shape="square" />
<Avatar icon={<User />} shape="square" style={styles} />
<Avatar icon={<User />} shape="round" />
</Cell>
)
Expand Down
8 changes: 6 additions & 2 deletions src/packages/avatar/demos/taro/demo3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ import { Avatar, Cell } from '@nutui/nutui-react-taro'
import { User } from '@nutui/icons-react-taro'

const Demo3 = () => {
const styles = { marginRight: 30 }
return (
<Cell className="cell-avatar">
<Avatar src="https://img12.360buyimg.com/imagetools/jfs/t1/143702/31/16654/116794/5fc6f541Edebf8a57/4138097748889987.png" />
<Avatar icon={<User />} />
<Avatar
style={styles}
src="https://img12.360buyimg.com/imagetools/jfs/t1/143702/31/16654/116794/5fc6f541Edebf8a57/4138097748889987.png"
/>
<Avatar style={styles} icon={<User />} />
<Avatar>N</Avatar>
</Cell>
)
Expand Down
2 changes: 2 additions & 0 deletions src/packages/avatar/demos/taro/demo4.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import { User } from '@nutui/icons-react-taro'
import { harmony } from '@/utils/platform-taro'

const Demo4 = () => {
const styles = { marginRight: 30 }
return (
<Cell className="cell-avatar">
<Avatar
color="#ffffff"
background={`${harmony() ? '#ff0f23' : 'var(--nutui-color-primary)'}`}
icon={<User />}
style={styles}
/>
<Avatar
color={`${harmony() ? '#ff0f23' : 'var(--nutui-color-primary)'}`}
Expand Down
21 changes: 8 additions & 13 deletions src/packages/avatar/demos/taro/demo5.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
import React from 'react'
// import { Avatar, Badge, Cell } from '@nutui/nutui-react-taro'
import { Avatar, Cell } from '@nutui/nutui-react-taro'
import { Avatar, Badge, Cell } from '@nutui/nutui-react-taro'
import { User } from '@nutui/icons-react-taro'
import { harmony } from '@/utils/platform-taro'

const Demo5 = () => {
const styles = { marginRight: 30 }
return (
<Cell className="cell-avatar">
{harmony() ? null : (
<>
{/* <Badge value="8"> */}
<Avatar icon={<User />} shape="square" />
{/* </Badge> */}
{/* <Badge dot> */}
<Avatar icon={<User />} shape="square" />
{/* </Badge> */}
</>
)}
<Badge value="8" style={styles}>
<Avatar icon={<User />} shape="square" />
</Badge>
<Badge dot>
<Avatar icon={<User />} shape="square" />
</Badge>
</Cell>
)
}
Expand Down
17 changes: 7 additions & 10 deletions src/packages/hoverbutton/demos/taro/demo3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,18 @@ import React from 'react'
import { HoverButton, Tabbar } from '@nutui/nutui-react-taro'
import { View } from '@tarojs/components'
import { Cart, Category, Hi, Home, User } from '@nutui/icons-react-taro'
import { harmony } from '@/utils/platform-taro'

const Demo3 = () => {
return (
<View>
<HoverButton icon={<Cart />} tabbarHeight={48} />
{harmony() ? null : (
<Tabbar fixed>
<Tabbar.Item title="首页" icon={<Home size={18} />} />
<Tabbar.Item title="分类" icon={<Category size={18} />} />
<Tabbar.Item title="逛" icon={<Hi size={18} />} />
<Tabbar.Item title="购物车" icon={<Cart size={18} />} />
<Tabbar.Item title="我的" icon={<User size={18} />} />
</Tabbar>
)}
<Tabbar fixed>
<Tabbar.Item title="首页" icon={<Home size={18} />} />
<Tabbar.Item title="分类" icon={<Category size={18} />} />
<Tabbar.Item title="逛" icon={<Hi size={18} />} />
<Tabbar.Item title="购物车" icon={<Cart size={18} />} />
<Tabbar.Item title="我的" icon={<User size={18} />} />
</Tabbar>
</View>
)
}
Expand Down
7 changes: 4 additions & 3 deletions src/packages/hoverbutton/demos/taro/demo5.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React from 'react'
import { HoverButton, ConfigProvider } from '@nutui/nutui-react-taro'
import { Cart } from '@nutui/icons-react-taro'
import pxTransform from '@/utils/px-transform'

const customSpacing = {
nutuiHoverbuttonSpacing: '40px',
nutuiHoverbuttonPositionBottom: '100px',
nutuiHoverbuttonPositionRight: '50px',
nutuiHoverbuttonSpacing: pxTransform(40),
nutuiHoverbuttonPositionBottom: pxTransform(100),
nutuiHoverbuttonPositionRight: pxTransform(50),
nutuiHoverbuttonItemBorderColor: '#FA2C19',
nutuiHoverbuttonItemBackground: '#FFEAE8',
nutuiHoverbuttonItemBackgroundActive: '#FEC3BE',
Expand Down
2 changes: 0 additions & 2 deletions src/packages/hoverbutton/demos/taro/demo6.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import React from 'react'
import { HoverButton } from '@nutui/nutui-react-taro'
import { View } from '@tarojs/components'
import pxTransform from '@/utils/px-transform'

const Demo1 = () => {
return (
Expand Down Expand Up @@ -42,7 +41,6 @@ const Demo1 = () => {
<View
style={{
fontSize: 10,
lineHeight: pxTransform(9),
fontFamily: 'JD',
}}
>
Expand Down
1 change: 0 additions & 1 deletion src/packages/icon/demo.taro.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useState } from 'react'
import Taro from '@tarojs/taro'
import { ScrollView, View } from '@tarojs/components'
// import '@nutui/icons-react-taro/dist/style_iconfont.css'
import { Toast } from '@nutui/nutui-react-taro'
import { useTranslate } from '@/sites/assets/locale/taro'
import Header from '@/sites/components/header'
Expand Down
6 changes: 3 additions & 3 deletions src/packages/icon/demos/taro/demo1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { Add, Dongdong, UserAdd, Minus } from '@nutui/icons-react-taro'
const Demo1 = () => {
return (
<Cell>
<Add color="red" style={{ marginRight: '10px' }} />
<UserAdd style={{ marginRight: '10px' }} />
<Dongdong style={{ marginRight: '10px' }} />
<Add color="red" style={{ marginRight: 10 }} />
<UserAdd style={{ marginRight: 10 }} />
<Dongdong style={{ marginRight: 10 }} />
<Minus />
</Cell>
)
Expand Down
4 changes: 2 additions & 2 deletions src/packages/icon/demos/taro/demo2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { IconFont } from '@nutui/icons-react-taro'
const Demo2 = () => {
return (
<Cell>
<IconFont name="dongdong" style={{ marginRight: '10px' }} />
<IconFont name="add" style={{ marginRight: '10px' }} />
<IconFont name="dongdong" style={{ marginRight: 10 }} />
<IconFont name="add" style={{ marginRight: 10 }} />
<IconFont name="minus" />
</Cell>
)
Expand Down
4 changes: 2 additions & 2 deletions src/packages/icon/demos/taro/demo4.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { Dongdong } from '@nutui/icons-react-taro'
const Demo4 = () => {
return (
<Cell>
<Dongdong color="#FF0F23" style={{ marginRight: '10px' }} />
<Dongdong color="#64b578" style={{ marginRight: '10px' }} />
<Dongdong color="#FF0F23" style={{ marginRight: 10 }} />
<Dongdong color="#64b578" style={{ marginRight: 10 }} />
<Dongdong color="#ffd700" />
</Cell>
)
Expand Down
4 changes: 2 additions & 2 deletions src/packages/icon/demos/taro/demo5.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { Dongdong } from '@nutui/icons-react-taro'
const Demo5 = () => {
return (
<Cell style={{ alignItems: 'center' }}>
<Dongdong size="16" style={{ marginRight: '10px' }} />
<Dongdong size="20" style={{ marginRight: '10px' }} />
<Dongdong size="16" style={{ marginRight: 10 }} />
<Dongdong size="20" style={{ marginRight: 10 }} />
<Dongdong size="24" />
</Cell>
)
Expand Down
2 changes: 1 addition & 1 deletion src/packages/icon/demos/taro/demo6.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const Demo6 = () => {
}}
style={{
maxWidth: '25%',
height: '60px',
height: 60,
display: 'flex',
flex: '0 0 25%',
flexDirection: 'column',
Expand Down
2 changes: 1 addition & 1 deletion src/packages/icon/demos/taro/demo7.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const Demo7 = () => {
}}
style={{
maxWidth: '25%',
height: '60px',
height: 60,
display: 'flex',
flex: '0 0 25%',
flexDirection: 'column',
Expand Down
7 changes: 6 additions & 1 deletion src/packages/progress/demos/taro/demo6.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react'
import { Progress, Cell } from '@nutui/nutui-react-taro'
import { Checked, Tips } from '@nutui/icons-react-taro'
import { harmony } from '@/utils/platform-taro'
import pxTransform from '@/utils/px-transform'

const Demo6 = () => {
Expand All @@ -9,6 +10,9 @@ const Demo6 = () => {
marginLeft: pxTransform(5),
marginRight: pxTransform(5),
}
const progressStyle = {
width: harmony() ? '95%' : '100%',
}
return (
<>
<Cell>
Expand All @@ -19,14 +23,15 @@ const Demo6 = () => {
/>
</Cell>
<Cell align="center">
<Progress percent={100} />
<Progress percent={100} style={progressStyle} />
<Checked color="green" style={iconStyle} />
</Cell>
<Cell align="center">
<Progress
percent={100}
color="linear-gradient(90deg, rgba(180,236,81,1) 0%,rgba(66,147,33,1) 100%)"
strokeWidth="15"
style={progressStyle}
/>
<Tips color="#FF0000" style={iconStyle} />
</Cell>
Expand Down
Loading
Loading