-
Notifications
You must be signed in to change notification settings - Fork 298
fix: 修正steps组件taro版div标签替换成view标签& price多端结构统一 #3401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d7e7d86
532e0e1
c912d43
9a49448
0324919
87c7e2e
929799b
7ee836a
94c5073
5dfd20f
bd12ee6
e47d0d4
e7a4b1f
75057e6
7da9642
08e97b5
3da0ec6
e90b2b2
3cbfe75
e1b4fc9
b6cab32
acaa6c2
7e230c9
88462db
8ce8c51
68c851b
32b4cea
4e6df5d
cf0553a
1509b39
710afd9
2be0323
2379441
e7f84cc
7054cee
93c518f
1b997a4
23dba7a
0354507
dadca5b
77ae33b
01a2bca
3d88959
075b551
884d3bc
b66439e
e9f4a44
63ac053
dc5e96f
83a322d
7c90fbf
4bb94ef
362fd9f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ const zhUG: BaseLang = { | |
| select: 'تاللاڭ', | ||
| edit: 'يحرر', | ||
| reset: 'إعادة ضبط', | ||
| close: 'تاقاش', | ||
| video: { | ||
| errorTip: 'فىلىمنى قويۇش مەغلۇپ بولدى', | ||
| clickRetry: 'قايتا سىناش', | ||
|
|
@@ -138,5 +139,6 @@ const zhUG: BaseLang = { | |
| watermark: { | ||
| errorCanvasTips: 'Canvas نى قوللىمايدۇ', | ||
| }, | ||
| mask: 'mask', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 本地化字段未翻译
🤖 Prompt for AI Agents |
||
| } | ||
| export default zhUG | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,7 +59,9 @@ | |
|
|
||
| &.top { | ||
| top: 0; | ||
| /* #ifndef dynamic*/ | ||
| bottom: inherit; | ||
| /* #endif */ | ||
| } | ||
|
|
||
| &-flex { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,19 +2,18 @@ import React, { CSSProperties, useCallback, useMemo } from 'react' | |
| 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' | ||
| // > | ||
|
Comment on lines
+5
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: cd /tmp && find . -name "button.taro.tsx" -o -name "button*" -type f 2>/dev/null | head -20Repository: jdf2e/nutui-react Length of output: 391 🏁 Script executed: find /repo -name "button.taro.tsx" -type f 2>/dev/nullRepository: jdf2e/nutui-react Length of output: 43 🏁 Script executed: # First, find the file
find . -path "*/packages/button/button.taro.tsx" -o -path "*/button.taro.tsx" 2>/dev/null | head -5Repository: jdf2e/nutui-react Length of output: 98 🏁 Script executed: # Find button component files
rg -l "button.taro" . 2>/dev/null | head -10Repository: jdf2e/nutui-react Length of output: 325 🏁 Script executed: # List files in src/packages/button directory
ls -la src/packages/button/ 2>/dev/null || find . -type d -name button 2>/dev/null | grep -E "packages|components" | head -5Repository: jdf2e/nutui-react Length of output: 984 🏁 Script executed: # Find the button.taro.tsx file
find . -name "button.taro.tsx" 2>/dev/nullRepository: jdf2e/nutui-react Length of output: 98 🏁 Script executed: cat src/packages/button/button.taro.tsx 2>/dev/null | head -50Repository: jdf2e/nutui-react Length of output: 1433 删除已注释的代码,并验证 View 作为按钮容器是否完整支持 Taro 表单功能。 ButtonProps 接口中声明了
NutUI React 采用平台特定文件命名形式(原文件名 + 端类型)来处理不同平台差异,因此此设计可能是有意的。但需验证:
🤖 Prompt for AI Agents |
||
|
|
||
| export type ButtonType = | ||
| | 'default' | ||
|
|
@@ -27,9 +26,11 @@ export type ButtonSize = 'xlarge' | 'large' | 'normal' | 'small' | 'mini' | |
| 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 | ||
|
|
@@ -76,7 +77,7 @@ export const Button = React.forwardRef<HTMLButtonElement, Partial<ButtonProps>>( | |
| children, | ||
| className, | ||
| style, | ||
| formType, | ||
| // formType, | ||
| nativeType, | ||
| onClick, | ||
| ...rest | ||
|
|
@@ -145,17 +146,18 @@ export const Button = React.forwardRef<HTMLButtonElement, Partial<ButtonProps>>( | |
| 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)} | ||
|
|
@@ -175,7 +177,8 @@ export const Button = React.forwardRef<HTMLButtonElement, Partial<ButtonProps>>( | |
| )} | ||
| {rightIcon} | ||
| </View> | ||
| </TaroButton> | ||
| </View> | ||
| // </TaroButton> | ||
| ) | ||
| } | ||
| ) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: jdf2e/nutui-react
Length of output: 92
🏁 Script executed:
# Count lines and read the relevant sections wc -l package.jsonRepository: jdf2e/nutui-react
Length of output: 77
🏁 Script executed:
Repository: jdf2e/nutui-react
Length of output: 809
🏁 Script executed:
Repository: jdf2e/nutui-react
Length of output: 83
🏁 Script executed:
Repository: jdf2e/nutui-react
Length of output: 363
🏁 Script executed:
Repository: jdf2e/nutui-react
Length of output: 167
解决依赖版本不一致问题
@nutui/icons-react-taro在 dependencies 中指定为精确版本3.0.2-cpp.3.beta.3(第 112 行),但在 resolutions 中使用^3.0.2-cpp.1(第 245 行)。这两个版本范围不匹配,resolutions 中的范围可能导致安装不同的版本,破坏依赖一致性。请统一这两处的版本指定。