Skip to content

Commit f00da38

Browse files
author
xiaoyatong
committed
fix: merge next conflicts
2 parents 66ffa81 + ad7c890 commit f00da38

40 files changed

+306
-123
lines changed

.github/workflows/ci.yml

+20-20
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
steps:
2020
- uses: actions/checkout@v4
2121

22-
- name: Install pnpm
23-
run: corepack enable
22+
- name: Install pnpm
23+
run: corepack enable pnpm
2424

2525
- uses: actions/setup-node@v4
2626
with:
@@ -36,35 +36,35 @@ jobs:
3636
test:
3737
runs-on: ubuntu-latest
3838
steps:
39-
- uses: actions/checkout@v4
39+
- uses: actions/checkout@v4
4040

41-
- name: Install pnpm
42-
run: corepack enable
41+
- name: Install pnpm
42+
run: corepack enable pnpm
4343

44-
- uses: actions/setup-node@v4
45-
with:
46-
node-version: '18'
47-
cache: 'pnpm'
44+
- uses: actions/setup-node@v4
45+
with:
46+
node-version: '18'
47+
cache: 'pnpm'
4848

49-
- name: Install dependencies
50-
run: pnpm install
49+
- name: Install dependencies
50+
run: pnpm install
5151

52-
- name: Run test
53-
run: npm run test
52+
- name: Run test
53+
run: npm run test
5454

55-
- name: Upload coverage reports to Codecov
56-
if: ${{ always() }}
57-
uses: codecov/codecov-action@v4
58-
env:
59-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
55+
- name: Upload coverage reports to Codecov
56+
if: ${{ always() }}
57+
uses: codecov/codecov-action@v4
58+
env:
59+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
6060

6161
build:
6262
runs-on: ubuntu-latest
6363
steps:
6464
- uses: actions/checkout@v4
6565

66-
- name: Install pnpm
67-
run: corepack enable
66+
- name: Install pnpm
67+
run: corepack enable pnpm
6868

6969
- uses: actions/setup-node@v4
7070
with:

.github/workflows/realease-tag.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
uses: actions/checkout@v4
1515

1616
- name: Install pnpm
17-
run: corepack enable
17+
run: corepack enable pnpm
1818

1919
- uses: actions/setup-node@v4
2020
with:

CHANGELOG.md

+23
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
# v2.6.8
2+
`2024-05-31`
3+
4+
5+
* :sparkles: feat(button): 新增 button 原始类型属性 (#2195) @Jiankian
6+
* :sparkles: feat(card): add card hide price and shop usage (#2292) @wick
7+
* :bug: fix(cascader): onPathChange is not a function (#2308) @oasis-cloud
8+
* :bug: fix: safearea for ac (#2293) @xiaoyatong
9+
* :bug: fix(InputNumber): 扩大点击区域 (#2302) @xiaoyatong
10+
* :bug: fix(picker): 函数调用之前检查 locale 是否已经定义 (#2259) @Alex-huxiyang
11+
* 🏡 chore(demo): 更新组件引用方式 (#2304) @oasis-cloud
12+
* 🏡 chore: fix typos (#2300) @Snoppy
13+
14+
15+
# v2.6.7
16+
`2024-05-28`
17+
18+
19+
* :sparkles: feat: 签名组件增加当没有签名或已清空的情况下的参数暴露 (#2288) @xiaoyatong
20+
* :bug: fix: ActionSheet 增加安全区处理 (#2286) @xiaoyatong
21+
* :bug: fix(actionsheet): 去掉无意义的 padding,popup 已不再暴露 (#2285) @xiaoyatong
22+
23+
124
# v2.6.6
225
`2024-05-24`
326

src/packages/actionsheet/actionsheet.scss

-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
@import '../popup/popup.scss';
22

33
.nut-actionsheet {
4-
display: block;
5-
padding-bottom: constant(safe-area-inset-bottom);
6-
padding-bottom: env(safe-area-inset-bottom);
74
text-align: center;
85

96
&.nut-popup {

src/packages/button/button.taro.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export interface ButtonProps
3939
disabled: boolean
4040
icon: React.ReactNode
4141
rightIcon: React.ReactNode
42+
nativeType: 'submit' | 'reset' | 'button'
4243
onClick: (e: MouseEvent<HTMLButtonElement>) => void
4344
}
4445

@@ -74,6 +75,7 @@ export const Button = React.forwardRef<HTMLButtonElement, Partial<ButtonProps>>(
7475
children,
7576
className,
7677
style,
78+
nativeType,
7779
onClick,
7880
...rest
7981
} = {
@@ -112,6 +114,7 @@ export const Button = React.forwardRef<HTMLButtonElement, Partial<ButtonProps>>(
112114
<TaroButton
113115
{...rest}
114116
ref={ref}
117+
type={nativeType}
115118
className={classNames(
116119
prefixCls,
117120
`${prefixCls}-${type}`,

src/packages/card/card.taro.tsx

+14-11
Original file line numberDiff line numberDiff line change
@@ -64,25 +64,28 @@ export const Card: FunctionComponent<
6464
<View className={`${classPrefix}-right-title`}>{title}</View>
6565
{description}
6666
<View className={`${classPrefix}-right-price`}>
67-
<Price size="normal" price={price} />
68-
{priceTag || (
69-
<Price
70-
size="normal"
71-
className={`${classPrefix}-right-price-origin`}
72-
price={vipPrice}
73-
/>
74-
)}
67+
{price && <Price size="normal" price={price} />}
68+
{priceTag ||
69+
(vipPrice && (
70+
<Price
71+
size="normal"
72+
className={`${classPrefix}-right-price-origin`}
73+
price={vipPrice}
74+
/>
75+
))}
7576
</View>
7677
<View className={`${classPrefix}-right-other`}>
7778
{tag || (
7879
<>
79-
<Tag type="danger">{shopDescription}</Tag>
80-
<Tag plain>{delivery}</Tag>
80+
{shopDescription && <Tag type="danger">{shopDescription}</Tag>}
81+
{delivery && <Tag plain>{delivery}</Tag>}
8182
</>
8283
)}
8384
</View>
8485
<View className={`${classPrefix}-right-shop`}>
85-
<View className={`${classPrefix}-right-shop-name`}>{shopName}</View>
86+
{shopName && (
87+
<View className={`${classPrefix}-right-shop-name`}>{shopName}</View>
88+
)}
8689
{extra}
8790
</View>
8891
</View>

src/packages/card/card.tsx

+14-11
Original file line numberDiff line numberDiff line change
@@ -63,25 +63,28 @@ export const Card: FunctionComponent<
6363
<div className={`${classPrefix}-right-title`}>{title}</div>
6464
{description}
6565
<div className={`${classPrefix}-right-price`}>
66-
<Price size="normal" price={price} />
67-
{priceTag || (
68-
<Price
69-
size="normal"
70-
className={`${classPrefix}-right-price-origin`}
71-
price={vipPrice}
72-
/>
73-
)}
66+
{price && <Price size="normal" price={price} />}
67+
{priceTag ||
68+
(vipPrice && (
69+
<Price
70+
size="normal"
71+
className={`${classPrefix}-right-price-origin`}
72+
price={vipPrice}
73+
/>
74+
))}
7475
</div>
7576
<div className={`${classPrefix}-right-other`}>
7677
{tag || (
7778
<>
78-
<Tag type="danger">{shopDescription}</Tag>
79-
<Tag plain>{delivery}</Tag>
79+
{shopDescription && <Tag type="danger">{shopDescription}</Tag>}
80+
{delivery && <Tag plain>{delivery}</Tag>}
8081
</>
8182
)}
8283
</div>
8384
<div className={`${classPrefix}-right-shop`}>
84-
<div className={`${classPrefix}-right-shop-name`}>{shopName}</div>
85+
{shopName && (
86+
<div className={`${classPrefix}-right-shop-name`}>{shopName}</div>
87+
)}
8588
{extra}
8689
</div>
8790
</div>

src/packages/card/demo.taro.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Demo2 from './demos/taro/demo2'
99
import Demo3 from './demos/taro/demo3'
1010
import Demo4 from './demos/taro/demo4'
1111
import Demo5 from './demos/taro/demo5'
12+
import Demo6 from './demos/taro/demo6'
1213

1314
const CardDemo = () => {
1415
const [translated] = useTranslate({
@@ -17,18 +18,21 @@ const CardDemo = () => {
1718
customProduct: '自定义商品标签',
1819
customShop: '自定义店铺介绍',
1920
customFooter: '自定义右下角内容',
21+
customerWithoutPrice: '不显示价格和店铺',
2022
},
2123
'zh-TW': {
2224
basic: '基础用法',
2325
customProduct: '自定義商品標簽',
2426
customShop: '自定義店鋪介紹',
2527
customFooter: '自定義右下角內容',
28+
customerWithoutPrice: '不顯示價格和店鋪',
2629
},
2730
'en-US': {
2831
basic: 'Basic Usage',
2932
customProduct: 'Custom prolist',
3033
customShop: 'Custom Content',
3134
customFooter: 'Customize bottom right content',
35+
customerWithoutPrice: 'Hide price and shop',
3236
},
3337
})
3438
return (
@@ -45,6 +49,8 @@ const CardDemo = () => {
4549
<Demo4 />
4650
<View className="h2">{translated.customFooter}</View>
4751
<Demo5 />
52+
<View className="h2">{translated.customerWithoutPrice}</View>
53+
<Demo6 />
4854
</ScrollView>
4955
</>
5056
)

src/packages/card/demo.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Demo2 from './demos/h5/demo2'
66
import Demo3 from './demos/h5/demo3'
77
import Demo4 from './demos/h5/demo4'
88
import Demo5 from './demos/h5/demo5'
9+
import Demo6 from './demos/h5/demo6'
910

1011
const CardDemo = () => {
1112
const [translated] = useTranslate({
@@ -15,20 +16,23 @@ const CardDemo = () => {
1516
customShop: '自定义店铺介绍',
1617
customPriceIcon: '价格后自定义标签',
1718
customFooter: '自定义右下角内容',
19+
customerWithoutPrice: '不显示价格和店铺',
1820
},
1921
'zh-TW': {
2022
basic: '基础用法',
2123
customProduct: '自定義商品標簽',
2224
customShop: '自定義店鋪介紹',
2325
customPriceIcon: '價格後自定義標簽',
2426
customFooter: '自定義右下角內容',
27+
customerWithoutPrice: '不顯示價格和店鋪',
2528
},
2629
'en-US': {
2730
basic: 'Basic Usage',
2831
customProduct: 'Custom prolist',
2932
customShop: 'Custom Content',
3033
customPriceIcon: 'Price after custom tag',
3134
customFooter: 'Customize bottom right content',
35+
customerWithoutPrice: 'Hide price and shop',
3236
},
3337
})
3438
return (
@@ -44,6 +48,8 @@ const CardDemo = () => {
4448
<Demo4 />
4549
<h2>{translated.customFooter}</h2>
4650
<Demo5 />
51+
<h2>{translated.customerWithoutPrice}</h2>
52+
<Demo6 />
4753
</div>
4854
</>
4955
)

src/packages/card/demos/h5/demo6.tsx

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import React from 'react'
2+
import { Card } from '@nutui/nutui-react'
3+
4+
const Demo6 = () => {
5+
const state = {
6+
src: '//img10.360buyimg.com/n2/s240x240_jfs/t1/210890/22/4728/163829/6163a590Eb7c6f4b5/6390526d49791cb9.jpg!q70.jpg',
7+
title:
8+
'【活蟹】湖塘煙雨 阳澄湖大闸蟹公 4.5 两 母 3.5 两 4 对 8 只 鲜活生鲜螃蟹现货水产礼盒海鲜水',
9+
}
10+
11+
return (
12+
<Card
13+
src={state.src}
14+
title={state.title}
15+
description={
16+
<div style={{ fontSize: '14px', padding: '10px 0', color: '#999' }}>
17+
阳澄湖大闸蟹鲜活生鲜螃蟹现货水产礼盒海鲜水
18+
</div>
19+
}
20+
/>
21+
)
22+
}
23+
export default Demo6
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import React from 'react'
2+
import { Card } from '@nutui/nutui-react-taro'
3+
4+
const Demo6 = () => {
5+
const state = {
6+
src: '//img10.360buyimg.com/n2/s240x240_jfs/t1/210890/22/4728/163829/6163a590Eb7c6f4b5/6390526d49791cb9.jpg!q70.jpg',
7+
title:
8+
'【活蟹】湖塘煙雨 阳澄湖大闸蟹公 4.5 两 母 3.5 两 4 对 8 只 鲜活生鲜螃蟹现货水产礼盒海鲜水',
9+
}
10+
11+
return (
12+
<Card
13+
src={state.src}
14+
title={state.title}
15+
description={
16+
<div style={{ fontSize: '14px', padding: '10px 0', color: '#999' }}>
17+
阳澄湖大闸蟹鲜活生鲜螃蟹现货水产礼盒海鲜水
18+
</div>
19+
}
20+
/>
21+
)
22+
}
23+
export default Demo6

src/packages/card/doc.en-US.md

+8
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ import { Card, Price, Tag } from '@nutui/nutui-react'
5252

5353
:::
5454

55+
### Hide price and shop
56+
57+
:::demo
58+
59+
<CodeBlock src='h5/demo6.tsx'></CodeBlock>
60+
61+
:::
62+
5563
## Card
5664

5765
### Props

src/packages/card/doc.md

+8
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ import { Card, Price, Tag } from '@nutui/nutui-react'
5252

5353
:::
5454

55+
### 不显示价格和店铺
56+
57+
:::demo
58+
59+
<CodeBlock src='h5/demo6.tsx'></CodeBlock>
60+
61+
:::
62+
5563
## Card
5664

5765
### Props

src/packages/card/doc.taro.md

+8
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ import { Card, Price, Tag } from '@nutui/nutui-react-taro'
5252

5353
:::
5454

55+
### 不显示价格和店铺
56+
57+
:::demo
58+
59+
<CodeBlock src='h5/demo6.tsx'></CodeBlock>
60+
61+
:::
62+
5563
## Card
5664

5765
### Props

0 commit comments

Comments
 (0)