Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
929799b
fix: 为兼容 cpp 版本做的暂时性的牺牲改动 (#3325)
xiaoyatong Aug 7, 2025
7ee836a
Merge branch 'feat_v3.x' into feat_v3.x_cpp
xiaoyatong Aug 15, 2025
94c5073
chore: 升级版本号
xiaoyatong Aug 20, 2025
5dfd20f
feat(popup): 增加上下滑动修改高度
xiaoyatong Aug 20, 2025
bd12ee6
feat: 合并popup功能
xiaoyatong Aug 21, 2025
e47d0d4
feat(popup): 添加自定义顶部
xiaoyatong Aug 21, 2025
e7a4b1f
fix(input): taro 下只读可以点击
xiaoyatong Aug 21, 2025
75057e6
feat(popup): 增加一些新属性,顺便解决了下input的只读无法点击、焦点等问题 (#3342)
xiaoyatong Aug 21, 2025
7da9642
chore: 升级版本号
xiaoyatong Aug 29, 2025
08e97b5
feat: 新样式变量值更新,修订dialog暗黑问题
xiaoyatong Sep 3, 2025
3da0ec6
chore: 修改版本号
xiaoyatong Sep 20, 2025
e90b2b2
feat(popup): 增加top属性,支持自定义节点,,且不popup高度
xiaoyatong Sep 20, 2025
3cbfe75
chore: 修改版本号
xiaoyatong Sep 20, 2025
88462db
feat: 合并3.x 分支
xiaoyatong Sep 29, 2025
8ce8c51
Feat v3 cpp td (#3364)
xiaoyatong Sep 29, 2025
68c851b
feat(dialog): 升级样式规范
xiaoyatong Oct 2, 2025
32b4cea
feat(dialog): 升级样式规范
xiaoyatong Oct 2, 2025
4e6df5d
feat: 修订button在安卓下的问题
xiaoyatong Oct 3, 2025
cf0553a
fix(noticebar): 获取rect异常时不处理
xiaoyatong Oct 4, 2025
1509b39
feat(noticebar): 增加自定义children时的样式,重构部分代码
xiaoyatong Oct 5, 2025
710afd9
feat(input): 去掉lineheight
xiaoyatong Oct 5, 2025
2be0323
feat(checkbox): 增加选中态自定义类名
xiaoyatong Oct 5, 2025
2379441
fix: dialog规范及toast ios和安卓适配问题修订
xiaoyatong Oct 9, 2025
e7f84cc
fix(dialog): 适配ios和安卓,动效暂时屏蔽
xiaoyatong Oct 10, 2025
7054cee
fix(noticebar): 增加ref id
xiaoyatong Oct 13, 2025
93c518f
feat(dialog): demo
xiaoyatong Oct 13, 2025
1b997a4
fix: 去掉不支持的样式
xiaoyatong Oct 13, 2025
23dba7a
fix: 回跨不兼容样式处理
xiaoyatong Oct 14, 2025
0354507
fix: 回跨不兼容样式处理,不能暴露~~
xiaoyatong Oct 14, 2025
dadca5b
fix: setTimeout 改调 Taro.nextTick 调用,保证rect能够获取成功 (#3369)
aniwei Oct 15, 2025
77ae33b
feat: 修订 toast 鸿蒙下折行问题,noticebar 获取宽度问题
xiaoyatong Oct 15, 2025
01a2bca
fix: ios/安卓不支持属性增加判断
xiaoyatong Oct 21, 2025
3d88959
feat: dialog 底部按钮增加角标展示
xiaoyatong Oct 24, 2025
075b551
fix: hack 动效 tabs 安卓
xiaoyatong Oct 24, 2025
2e7cbd2
feat: 添加部分组件无障碍功能支持
yangyanAurora Nov 10, 2025
61863f5
Update checkbox.tsx
yangyanAurora Nov 10, 2025
7d0f814
Update src/packages/countdown/demos/h5/demo10.tsx
yangyanAurora Nov 10, 2025
0cdc8f4
Update demo.taro.tsx
yangyanAurora Nov 10, 2025
30d9fdf
Update demo.tsx
yangyanAurora Nov 10, 2025
76c0e2f
Update src/packages/noticebar/demos/h5/demo12.tsx
yangyanAurora Nov 10, 2025
3ce6c79
fix: update
yangyanAurora Nov 10, 2025
9d0911f
Update src/packages/price/price.taro.tsx
yangyanAurora Nov 10, 2025
7507379
Update price.taro.tsx
yangyanAurora Nov 11, 2025
858715d
Update price.tsx
yangyanAurora Nov 11, 2025
c8b6c1f
Update src/packages/radio/radio.taro.tsx
yangyanAurora Nov 11, 2025
cd4dd52
Update src/packages/radio/radio.tsx
yangyanAurora Nov 11, 2025
72a0e64
fix: update
yangyanAurora Nov 11, 2025
9954f35
fix: update
yangyanAurora Nov 12, 2025
e4f1ed9
Merge remote-tracking branch 'upstream/feat_v3.x_cpp' into feat_v3.x
yangyanAurora Nov 13, 2025
66092f4
feat: 添加组件无障碍支持
yangyanAurora Nov 13, 2025
57ad0d6
fix: update
yangyanAurora Nov 14, 2025
884d3bc
Feat v3.x aria (#3387)
yangyanAurora Nov 14, 2025
b66439e
feat: 无障碍类型检测屏蔽
xiaoyatong Nov 14, 2025
e9f4a44
fix: 无需处理容器维度,系统会无法读取内部的文字
xiaoyatong Nov 17, 2025
01456f9
fix: merge branch 'upstream feat_v3.x_cpp ' to 'feat_v3.x'
yangyanAurora Nov 17, 2025
d32fd32
fix: update merge issue
yangyanAurora Nov 21, 2025
3af56f1
fix: update about ARIA including component:
yangyanAurora Nov 24, 2025
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
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nutui/nutui-react-taro",
"version": "3.0.18",
"version": "3.0.19-cpp.19",
"style": "dist/style.css",
"main": "dist/nutui.react.umd.js",
"module": "dist/es/packages/nutui.react.build.js",
Expand Down Expand Up @@ -109,7 +109,7 @@
"dependencies": {
"@babel/runtime": "^7.23.9",
"@nutui/icons-react": "^3.0.2-beta.5",
"@nutui/icons-react-taro": "^3.0.2-beta.3",
"@nutui/icons-react-taro": "3.0.2-cpp.3.beta.3",
"@nutui/jdesign-icons-react-taro": "1.0.6-beta.2",
"@nutui/touch-emulator": "^1.0.0",
"@nutui/lottie-miniprogram": "^1.0.2",
Expand Down Expand Up @@ -241,6 +241,7 @@
"@types/react-dom": "^18.2.19",
"sass": "1.77.6",
"@tarojs/api": "4.0.12",
"@tarojs/components": "4.0.12"
"@tarojs/components": "4.0.12",
"@nutui/icons-react-taro": "^3.0.2-cpp.1"
}
}
11,550 changes: 6,268 additions & 5,282 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/hooks/taro/use-custom-event.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { useEffect, useRef } from 'react'
import isEqual from 'react-fast-compare'
import { Events, getCurrentInstance } from '@tarojs/taro'
import { eventCenter, getCurrentInstance } from '@tarojs/taro'
import { useForceUpdate } from '@/hooks/use-force-update'

export const customEvents = new Events()
// export const customEvents = new Events()
export const customEvents = eventCenter

export function useCustomEventsPath(selector?: string) {
selector = selector || ''
Expand Down
7 changes: 7 additions & 0 deletions src/locales/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export interface BaseLang {
select: string
edit: string
reset: string
close: string
back: string
video: {
errorTip: string
clickRetry: string
Expand Down Expand Up @@ -140,4 +142,9 @@ export interface BaseLang {
watermark: {
errorCanvasTips: string
}
mask: string
arithmetic: {
plus: string
minus: string
}
}
7 changes: 7 additions & 0 deletions src/locales/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const enUS: BaseLang = {
select: 'Select',
edit: 'Edit',
reset: 'Reset',
close: 'Close',
back: 'Back',
video: {
errorTip: 'Error Tip',
clickRetry: 'Click Retry',
Expand Down Expand Up @@ -139,5 +141,10 @@ const enUS: BaseLang = {
watermark: {
errorCanvasTips: 'Canvas is not supported in the current environment',
},
mask: 'Mask',
arithmetic: {
plus: 'Plus',
minus: 'Minus',
},
}
export default enUS
7 changes: 7 additions & 0 deletions src/locales/id-ID.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const idID: BaseLang = {
select: 'Pilih',
edit: 'Sunting',
reset: 'Mengatur Ulang',
close: 'Tutup',
back: 'Kembali',
video: {
errorTip: 'Terjadi Kesalahan',
clickRetry: 'Coba Lagi',
Expand Down Expand Up @@ -140,5 +142,10 @@ const idID: BaseLang = {
watermark: {
errorCanvasTips: 'Canvas is not supported in the current environment',
},
mask: 'Masker',
arithmetic: {
plus: 'Selain itu',
minus: 'minus',
},
}
export default idID
7 changes: 7 additions & 0 deletions src/locales/tr-TR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const trTR: BaseLang = {
select: 'Seçiniz',
edit: 'düzenlemek',
reset: 'sıfırlama',
close: 'Kapat',
back: 'Geri dön',
video: {
errorTip: 'Video yüklenemedi',
clickRetry: 'Yeniden Tıklayın',
Expand Down Expand Up @@ -148,5 +150,10 @@ const trTR: BaseLang = {
watermark: {
errorCanvasTips: 'Geçerli ortam Canvası desteklemiyor',
},
mask: 'Maske',
arithmetic: {
plus: 'Ayrıca',
minus: 'eksi',
},
}
export default trTR
7 changes: 7 additions & 0 deletions src/locales/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const zhCN: BaseLang = {
select: '请选择',
edit: '编辑',
reset: '重置',
close: '关闭',
back: '返回',
video: {
errorTip: '视频加载失败',
clickRetry: '点击重试',
Expand Down Expand Up @@ -140,5 +142,10 @@ const zhCN: BaseLang = {
watermark: {
errorCanvasTips: '当前环境不支持Canvas',
},
mask: '蒙层',
arithmetic: {
plus: '加',
minus: '减',
},
}
export default zhCN
7 changes: 7 additions & 0 deletions src/locales/zh-TW.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const zhCN: BaseLang = {
select: '請選擇',
edit: '編輯',
reset: '重置',
close: '關閉',
back: '返回',
video: {
errorTip: '視頻加載失敗',
clickRetry: '點擊重試',
Expand Down Expand Up @@ -140,5 +142,10 @@ const zhCN: BaseLang = {
watermark: {
errorCanvasTips: '當前環境不支持Canvas',
},
mask: '蒙層',
arithmetic: {
plus: '加',
minus: '减',
},
}
export default zhCN
7 changes: 7 additions & 0 deletions src/locales/zh-UG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const zhUG: BaseLang = {
select: 'تاللاڭ',
edit: 'يحرر',
reset: 'إعادة ضبط',
close: 'تاقاش',
back: 'ئاۋازقا',
video: {
errorTip: 'فىلىمنى قويۇش مەغلۇپ بولدى',
clickRetry: 'قايتا سىناش',
Expand Down Expand Up @@ -138,5 +140,10 @@ const zhUG: BaseLang = {
watermark: {
errorCanvasTips: 'Canvas نى قوللىمايدۇ',
},
mask: 'mask',
arithmetic: {
plus: 'ئەڭ‌',
minus: 'ئەممە',
},
}
export default zhUG
2 changes: 2 additions & 0 deletions src/packages/actionsheet/actionsheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
&-safe-area {
display: block;
width: 100%;
/* #ifndef dynamic*/
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
/* #endif */
}
}
5 changes: 5 additions & 0 deletions src/packages/animatingnumbers/countup.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
.nut-countup {
&-list {
/* #ifdef dynamic*/
display: flex;
/* #endif */
/* #ifndef dynamic*/
display: inline-flex;
/* #endif */
height: $countup-height;
overflow: hidden;
direction: ltr;
Expand Down
2 changes: 2 additions & 0 deletions src/packages/avatarcropper/avatarcropper.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@

&.top {
top: 0;
/* #ifndef dynamic*/
bottom: inherit;
/* #endif */
}

&-flex {
Expand Down
8 changes: 3 additions & 5 deletions src/packages/avatarcropper/avatarcropper.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
useMemo,
useCallback,
FunctionComponent,
useLayoutEffect,
} from 'react'
import Taro, { createSelectorQuery } from '@tarojs/taro'
import Taro, { useReady, createSelectorQuery } from '@tarojs/taro'
import classNames from 'classnames'
import { Canvas, CommonEventFunction, View } from '@tarojs/components'
import { getWindowInfo } from '@/utils/taro/get-system-info'
Expand Down Expand Up @@ -138,7 +137,7 @@
cropperCanvasContext: null,
})

useLayoutEffect(() => {
useReady(() => {
if (showAlipayCanvas2D) {
const { canvasId } = canvasAll
createSelectorQuery()
Expand All @@ -150,14 +149,14 @@
})
.exec()
}
}, [showAlipayCanvas2D, state.displayHeight, state.displayWidth])
})

useEffect(() => {
setCanvasAll({
...canvasAll,
cropperCanvasContext: Taro.createCanvasContext(canvasAll.canvasId),
})
}, [])

Check warning on line 159 in src/packages/avatarcropper/avatarcropper.taro.tsx

View workflow job for this annotation

GitHub Actions / lint

React Hook useEffect has a missing dependency: 'canvasAll'. Either include it or remove the dependency array. You can also do a functional update 'setCanvasAll(c => ...)' if you only need 'canvasAll' in the 'setCanvasAll' call

Check warning on line 159 in src/packages/avatarcropper/avatarcropper.taro.tsx

View workflow job for this annotation

GitHub Actions / lint

React Hook useEffect has a missing dependency: 'canvasAll'. Either include it or remove the dependency array. You can also do a functional update 'setCanvasAll(c => ...)' if you only need 'canvasAll' in the 'setCanvasAll' call

const touch = useTouch()

Expand All @@ -169,7 +168,7 @@
height,
borderRadius: shape === 'round' ? '50%' : '',
}
}, [pixelRatio, state.cropperWidth])

Check warning on line 171 in src/packages/avatarcropper/avatarcropper.taro.tsx

View workflow job for this annotation

GitHub Actions / lint

React Hook useMemo has a missing dependency: 'shape'. Either include it or remove the dependency array

Check warning on line 171 in src/packages/avatarcropper/avatarcropper.taro.tsx

View workflow job for this annotation

GitHub Actions / lint

React Hook useMemo has a missing dependency: 'shape'. Either include it or remove the dependency array

// 是否是横向
const isAngle = useMemo(() => {
Expand Down Expand Up @@ -251,7 +250,7 @@
ctx.scale(scale, scale)
ctx.drawImage(src as HTMLImageElement, x, y, width, height)
},
[drawImage, state]

Check warning on line 253 in src/packages/avatarcropper/avatarcropper.taro.tsx

View workflow job for this annotation

GitHub Actions / lint

React Hook useCallback has missing dependencies: 'pixelRatio' and 'space'. Either include them or remove the dependency array

Check warning on line 253 in src/packages/avatarcropper/avatarcropper.taro.tsx

View workflow job for this annotation

GitHub Actions / lint

React Hook useCallback has missing dependencies: 'pixelRatio' and 'space'. Either include them or remove the dependency array
)

// web绘制
Expand All @@ -268,7 +267,7 @@
canvas.height = state.displayHeight
const ctx = canvas.getContext('2d') as CanvasRenderingContext2D
canvas2dDraw(ctx)
}, [canvas2dDraw])

Check warning on line 270 in src/packages/avatarcropper/avatarcropper.taro.tsx

View workflow job for this annotation

GitHub Actions / lint

React Hook useCallback has missing dependencies: 'canvasAll.canvasId', 'state.displayHeight', and 'state.displayWidth'. Either include them or remove the dependency array

Check warning on line 270 in src/packages/avatarcropper/avatarcropper.taro.tsx

View workflow job for this annotation

GitHub Actions / lint

React Hook useCallback has missing dependencies: 'canvasAll.canvasId', 'state.displayHeight', and 'state.displayWidth'. Either include them or remove the dependency array

const alipayDraw = useCallback(() => {
const ctx = canvasAll.cropperCanvas.getContext(
Expand Down Expand Up @@ -325,7 +324,7 @@
ctx.scale(scale, scale)
ctx.drawImage(src as string, x, y, width, height)
ctx.draw()
}, [drawImage, state.scale, state.angle, state.moveX, state.moveY])

Check warning on line 327 in src/packages/avatarcropper/avatarcropper.taro.tsx

View workflow job for this annotation

GitHub Actions / lint

React Hook useCallback has missing dependencies: 'alipayDraw', 'canvasAll', 'showAlipayCanvas2D', 'space', 'state', and 'webDraw'. Either include them or remove the dependency array

Check warning on line 327 in src/packages/avatarcropper/avatarcropper.taro.tsx

View workflow job for this annotation

GitHub Actions / lint

React Hook useCallback has missing dependencies: 'alipayDraw', 'canvasAll', 'showAlipayCanvas2D', 'space', 'state', and 'webDraw'. Either include them or remove the dependency array

useEffect(() => {
if (Math.abs(state.moveX) > maxMoveX) {
Expand Down Expand Up @@ -694,5 +693,4 @@
</>
)
}

AvatarCropper.displayName = 'NutAvatarCropper'
12 changes: 11 additions & 1 deletion src/packages/badge/badge.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
.nut-badge {
position: relative;
/* #ifdef dynamic*/
display: flex;
/* #endif */
/* #ifndef dynamic*/
display: inline-flex;
vertical-align: middle;
box-sizing: content-box;
/* #endif */
vertical-align: middle;
width: auto;

&-icon {
Expand Down Expand Up @@ -38,7 +43,12 @@
}

&-sup {
/* #ifdef dynamic*/
display: flex;
/* #endif */
/* #ifndef dynamic*/
display: inline-flex;
/* #endif */
text-align: center;
min-width: $badge-min-width;
padding: $badge-padding;
Expand Down
3 changes: 3 additions & 0 deletions src/packages/button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
transform: translate(-50%, -50%);
opacity: 0;
content: ' ';
/* #ifdef dynamic*/
pointer-events: none;
/* #endif */
}

&::after {
Expand Down
40 changes: 23 additions & 17 deletions src/packages/button/button.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@
import type { MouseEvent } from 'react'
import classNames from 'classnames'
import {
ButtonProps as MiniProgramButtonProps,
// ButtonProps as MiniProgramButtonProps,
View,
Button as TaroButton,
// Button as TaroButton,
} from '@tarojs/components'
import { Loading } from '@nutui/icons-react-taro'
import { getEnv } from '@tarojs/taro'
import { BasicComponent, ComponentDefaults } from '@/utils/typings'
import { harmony } from '@/utils/taro/platform'

type OmitMiniProgramButtonProps = Omit<
MiniProgramButtonProps,
'size' | 'type' | 'onClick' | 'style'
>
// type OmitMiniProgramButtonProps = Omit<
// MiniProgramButtonProps,
// 'size' | 'type' | 'onClick' | 'style'
// >

export type ButtonType =
| 'default'
Expand All @@ -27,9 +26,11 @@
export type ButtonShape = 'square' | 'round'
export type ButtonFill = 'solid' | 'outline' | 'dashed' | 'none'

export interface ButtonProps
extends BasicComponent,
OmitMiniProgramButtonProps {
// export interface ButtonProps
// extends BasicComponent,
// OmitMiniProgramButtonProps {

export interface ButtonProps extends BasicComponent {
color: string
shape: ButtonShape
type: ButtonType
Expand Down Expand Up @@ -76,12 +77,13 @@
children,
className,
style,
formType,
// formType,
nativeType,
onClick,
...rest
} = { ...defaultProps, ...props }

const role = 'button'
const getStyle = useMemo(() => {
const style: CSSProperties = {}
if (color) {
Expand Down Expand Up @@ -145,20 +147,23 @@
className
)

if (getEnv() === 'WEB') {
;(rest as any).type = formType
}
// if (getEnv() === 'WEB') {
// ;(rest as any).type = formType
// }
return (
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
// eslint-disable-next-line react/button-has-type
<TaroButton
// <TaroButton
<View
{...rest}
ref={ref}
formType={formType || nativeType}
// formType={formType || nativeType}
className={buttonClassNames}
style={{ ...getStyle, ...style }}
onClick={(e) => handleClick(e as any)}
ariaRole={role}
ariaDisabled={disabled}

Check failure on line 166 in src/packages/button/button.taro.tsx

View workflow job for this annotation

GitHub Actions / build

Type '{ children: Element; ref: ForwardedRef<HTMLButtonElement>; className: string; style: { [x: `--${string}`]: any; accentColor?: AccentColor | undefined; ... 855 more ...; glyphOrientationVertical?: GlyphOrientationVertical | undefined; }; onClick: (e: ITouchEvent) => void; ariaRole: string; ariaDisabled: boolean | und...' is not assignable to type 'IntrinsicAttributes & ViewProps'.

Check failure on line 166 in src/packages/button/button.taro.tsx

View workflow job for this annotation

GitHub Actions / build

Type '{ children: Element; ref: ForwardedRef<HTMLButtonElement>; className: string; style: { [x: `--${string}`]: any; accentColor?: AccentColor | undefined; ... 855 more ...; glyphOrientationVertical?: GlyphOrientationVertical | undefined; }; onClick: (e: ITouchEvent) => void; ariaRole: string; ariaDisabled: boolean | und...' is not assignable to type 'IntrinsicAttributes & ViewProps'.
>
<View className="nut-button-wrap">
{loading && <Loading className="nut-icon-loading" />}
Expand All @@ -175,7 +180,8 @@
)}
{rightIcon}
</View>
</TaroButton>
</View>
// </TaroButton>
)
}
)
Expand Down
2 changes: 2 additions & 0 deletions src/packages/cascader/cascader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
}

.nut-tabs-titles-item {
/* #ifndef dynamic*/
flex: initial;
min-width: auto;
/* #endif */
width: auto;
padding: $cascader-tabs-item-padding;
white-space: nowrap;
Expand Down
Loading
Loading