Skip to content
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

feat(inputNumber): v14 multi-platform adaption #2823

Merged
merged 13 commits into from
Dec 11, 2024

Conversation

Alex-huxiyang
Copy link
Collaborator

@Alex-huxiyang Alex-huxiyang commented Dec 4, 2024

🤔 这个变动的性质是?

  • 新特性提交
  • 日常 bug 修复
  • 站点、文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • TypeScript 定义更新
  • 包体积优化
  • 性能优化
  • 功能增强
  • 国际化改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他改动(是关于什么的改动?)

🔗 相关 Issue

💡 需求背景和解决方案

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • fork仓库代码是否为最新避免文件冲突
  • Files changed 没有 package.json lock 等无关文件

Summary by CodeRabbit

  • 新功能
    • 添加了 Toast 组件,用于在 InputNumber 组件超出限制时显示通知。
    • 更新了 InputNumber 组件的默认值和限制,提高了用户输入的灵活性和反馈。
  • 样式
    • 更新了 InputNumber 组件的样式变量,改善了视觉效果和响应能力。
  • 文档
    • 更新了 InputNumber 组件的文档,提供了更清晰的使用说明和样式变量的更改。

Copy link

coderabbitai bot commented Dec 4, 2024

Walkthrough

此拉取请求对InputNumber组件进行了多个修改,涉及到功能和样式的更新。主要更改包括调整InputNumber的默认值、最小值和最大值,集成Toast组件以提供用户反馈,以及更新样式变量以提高组件的视觉一致性和响应能力。此外,文档也进行了相应更新,以反映这些更改。

Changes

文件路径 更改摘要
src/packages/inputnumber/demos/taro/demo9.tsx 移除了ConfigProvider的导入,更新了两个InputNumber组件的属性,激活了Toast组件的使用。
src/packages/inputnumber/inputnumber.scss 修改了.nut-inputnumber组件的样式,包括display属性、widthbackground-color等。
src/packages/inputnumber/inputnumber.taro.tsx 移除了createSelectorQuery的导入,添加了refRandomId以生成随机ID,增强了输入框宽度的动态调整。
src/packages/inputnumber/inputnumber.tsx 添加了新的useEffect钩子以处理async行为,更新了handleInputChangeclampValue函数。
src/styles/variables.scss 更新了多个颜色和尺寸变量的默认值,标准化了输入组件的样式。
src/packages/inputnumber/doc.en-US.md 更新了文档中的CSS变量,反映了样式的更改。
src/packages/inputnumber/doc.md 更新了文档中的CSS变量,反映了样式的更改。
src/packages/inputnumber/doc.taro.md 对文档进行了重组和清晰化,更新了CSS变量的默认值,移除了冗余行。
src/packages/inputnumber/doc.zh-TW.md 对文档进行了全面修订,更新了CSS变量的默认值,添加了新的属性。
src/packages/inputnumber/demos/taro/demo3.tsx 添加了Toast组件,更新了Demo3组件以支持超出限制时的通知功能。
src/packages/inputnumber/demos/taro/demo8.tsx 集成了Toast组件,更新了状态管理以动态显示通知,增强了用户交互反馈。

Possibly related PRs

Suggested labels

size/L

Suggested reviewers

  • xiaoyatong
  • oasis-cloud

兔子在草地上跳跃,
输入数字真奇妙。
组件更新样式新,
Toast来报喜声声响。
用户体验更流畅,
代码如诗,乐无穷! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the 3.x Target branch 3.x label Dec 4, 2024
Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.14%. Comparing base (932ff28) to head (9ae8aa5).
Report is 7 commits behind head on feat_v3.x.

Additional details and impacted files
@@            Coverage Diff             @@
##           feat_v3.x    #2823   +/-   ##
==========================================
  Coverage      84.14%   84.14%           
==========================================
  Files            273      273           
  Lines          18103    18103           
  Branches        2690     2690           
==========================================
  Hits           15232    15232           
  Misses          2866     2866           
  Partials           5        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (6)
src/packages/inputnumber/demos/taro/demo9.tsx (1)

30-32: 建议清理未使用的代码

  1. 建议移除未使用的Toast相关代码和状态
  2. 第二个InputNumber的defaultValue与H5版本不一致(1 vs 5)

建议应用以下更改:

- const [toastType, SetToastType] = useState('text')
- const [show, SetShow] = useState(false)
- const [toastMsg, SetToastMsg] = useState('')
src/packages/inputnumber/inputnumber.scss (2)

19-22: 建议优化响应式设计

关于输入框宽度的处理:

  1. 建议考虑使用CSS变量来定义最大和最小宽度,提高可配置性
  2. 图标尺寸的硬编码值(20px)建议改用变量定义

建议添加以下变量到variables.scss:

$inputnumber-icon-size: 20px;
$inputnumber-input-max-width: 23px;
$inputnumber-input-min-width: 12px;

Also applies to: 39-41


46-48: 建议优化间距处理

目前左右margin分开设置,建议:

  1. 考虑使用简写形式
  2. 确保在RTL布局下的适配
- margin-left: $inputnumber-input-margin;
- margin-right: $inputnumber-input-margin;
+ margin-inline: $inputnumber-input-margin;
src/packages/inputnumber/inputnumber.tsx (2)

139-143: 建议优化动态宽度调整的实现

当前实现方案存在以下可以改进的地方:

  1. 直接使用 window.getComputedStyle 可能在某些环境下不可用
  2. 字符宽度计算可能需要考虑不同字符的宽度差异

建议考虑以下优化方案:

  useEffect(() => {
    if (inputRef.current) {
-     inputRef.current.style.width = `${inputValue.length * parseInt(window.getComputedStyle(inputRef.current).fontSize)}px`
+     const computedStyle = window.getComputedStyle(inputRef.current)
+     const canvas = document.createElement('canvas')
+     const context = canvas.getContext('2d')
+     if (context) {
+       context.font = `${computedStyle.fontSize} ${computedStyle.fontFamily}`
+       const width = context.measureText(inputValue).width
+       inputRef.current.style.width = `${Math.ceil(width)}px`
+     }
    }
  }, [inputValue])

Line range hint 191-203: 建议添加注释说明或考虑移除未使用的代码

当前代码中存在被注释的 onOverlimit 处理逻辑,建议:

  1. 添加详细注释说明为什么在输入时不触发 onOverlimit
  2. 如果确定不需要,可以移除相关代码

建议添加如下注释:

  const handleValueChange = (
    valueStr: string | null,
    e: React.ChangeEvent<HTMLInputElement>
  ) => {
    const val = clampValue(valueStr)
+   // 说明:输入过程中不触发 onOverlimit 回调,避免频繁触发
+   // 仅在点击加减按钮时触发 onOverlimit
    // if (val !== Number(e.target.value)) {
    //   onOverlimit?.(e)
    // }
    if (val !== Number(shadowValue)) {
      onChange?.(val, e)
    }
  }
src/packages/inputnumber/inputnumber.taro.tsx (1)

146-161: 建议优化 Taro 环境下的宽度计算逻辑

当前实现在 Taro 环境下使用 createSelectorQuery 计算宽度,建议增加以下优化:

  1. 添加错误处理
  2. 考虑缓存查询结果提升性能
  useEffect(() => {
+   let fontSize: string | null = null
    createSelectorQuery()
      .select(`#root${refRandomId.current} .nut-inputnumber-input`)
      .fields(
        {
          computedStyle: ['fontSize'],
        },
        (res) => {
          if (!res) return
+         try {
            if (inputRef.current) {
+             fontSize = fontSize || res.fontSize
              inputRef.current.style.width = `${inputValue.length * parseInt(res.fontSize)}px`
            }
+         } catch (error) {
+           console.error('Failed to calculate input width:', error)
+         }
        }
      )
      .exec()
  }, [inputValue])
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between b635275 and 93a6c25.

📒 Files selected for processing (6)
  • src/packages/inputnumber/demos/h5/demo9.tsx (2 hunks)
  • src/packages/inputnumber/demos/taro/demo9.tsx (2 hunks)
  • src/packages/inputnumber/inputnumber.scss (4 hunks)
  • src/packages/inputnumber/inputnumber.taro.tsx (4 hunks)
  • src/packages/inputnumber/inputnumber.tsx (2 hunks)
  • src/styles/variables.scss (2 hunks)
🔇 Additional comments (5)
src/packages/inputnumber/demos/h5/demo9.tsx (2)

28-31: 确认格式化显示的兼容性

数值范围的显著减小(最大值从100改为10)可能会影响百分比格式化的展示效果。建议:

  1. 验证所有可能的数值在格式化后的显示是否正常
  2. 确保UI布局在各种数值下保持一致

15-17: 建议验证数值范围的调整是否符合业务需求

将默认值从1000改为5,最大值从15020改为10,这个改动幅度较大。请确认:

  1. 这些新的限制值是否满足实际业务场景
  2. 是否会影响现有的使用场景
src/packages/inputnumber/inputnumber.scss (1)

2-10: 优化布局和视觉表现

  1. 将display从flex改为inline-flex是个很好的改进,使组件能更好地融入内联布局
  2. 新增的max-width计算方式合理,考虑了所有相关组件的尺寸
  3. 添加了背景色和圆角,提升了视觉体验
src/packages/inputnumber/inputnumber.taro.tsx (1)

17-17: 平台兼容性处理合理

引入 createSelectorQuery 和平台相关工具,有效支持了多平台适配。

Also applies to: 20-20

src/styles/variables.scss (1)

616-616: 样式变量调整合理

对 InputNumber 组件的样式变量进行了以下调整:

  1. 输入框高度从 24px 调整为 20px
  2. 字体大小调整为 12px
  3. 边框圆角调整为 4px
  4. 新增了边距和按钮尺寸的变量

这些调整使组件更加紧凑和现代化。

Also applies to: 627-627, 632-632, 634-634, 635-635, 638-638

@pull-request-size pull-request-size bot added size/XL and removed size/L labels Dec 4, 2024
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (3)
src/packages/inputnumber/doc.md (1)

142-150: CSS 变量值已更新,但需要确保描述的一致性

以下几点建议:

  1. 建议统一使用 "输入框" 而不是 "input" 来描述组件
  2. 变量命名与描述文字应保持一致性,特别是在描述相同属性时

建议按照以下方式修改描述:

-| \--nutui-inputnumber-input-height | 数字输入框中input的高度 | `20px` |
+| \--nutui-inputnumber-input-height | 数字输入框的高度 | `20px` |
-| \--nutui-inputnumber-input-margin | 数字输入框中input的margin值 | `2px` |
+| \--nutui-inputnumber-input-margin | 数字输入框的外边距 | `2px` |
🧰 Tools
🪛 LanguageTool

[locale-violation] ~142-~142: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-height | 数字输入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~143-~143: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~143-~143: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~143-~143: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 数字输入框中input的背景颜色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 数字输入框中input的字号颜色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~145-~145: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 数字输入框中input的字号大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~146-~146: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字号大小 | 12px | | --nutui-inputnumber-input-border | 数字输入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~147-~147: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 数字输入框中input的圆角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~148-~148: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圆角 | 4px | | --nutui-inputnumber-input-margin | 数字输入框中input的margin值 | 2px | ...

(GL_BARBARISM_REPLACE)

src/packages/inputnumber/doc.taro.md (2)

134-146: 文档更新准确反映了样式变更

文档中的CSS变量表格清晰地展示了所有的样式调整。建议补充以下内容以提升文档完整性:

  1. 为新的尺寸变化添加设计考虑说明
  2. 提供一个展示不同尺寸对比的示例

建议在"示例代码"部分添加以下内容:

+ ### 自定义尺寸
+ 
+ 通过CSS变量可以自定义输入框的尺寸
+ 
+ :::demo
+ 
+ <CodeBlock src='taro/demo10.tsx'></CodeBlock>
+ 
+ :::
🧰 Tools
🪛 LanguageTool

[locale-violation] ~134-~134: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-height | 数字输入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 数字输入框中input的背景颜色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 数字输入框中input的字号颜色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~137-~137: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 数字输入框中input的字号大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~138-~138: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字号大小 | 12px | | --nutui-inputnumber-input-border | 数字输入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~139-~139: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 数字输入框中input的圆角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~140-~140: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圆角 | 4px | | --nutui-inputnumber-input-margin | 数字输入框中input的margin值 | 2px | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~143-~143: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ... 20px | | --nutui-inputnumber-button-background-color | 数字输入框左右按钮的背景色 | transparent |...

(GL_BARBARISM_REPLACE)


105-124: 建议完善Props表格的类型说明

Props表格内容完整,建议对以下属性做补充说明:

  1. formatter 属性的类型说明可以更详细,包括参数和返回值的具体类型约束
  2. onChange 事件的参数类型可以添加示例说明

建议更新formatter属性的说明如下:

- | formatter | 指定输入框展示值的格式 | `function(value: number \| string): string` | `-` |
+ | formatter | 指定输入框展示值的格式 | `(value: number \| string) => string` | `-` |
🧰 Tools
🪛 LanguageTool

[locale-violation] ~112-~112: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...string\|number|9999| | type | input 的类型 |digit\|number|digit` | |...

(GL_BARBARISM_REPLACE)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 93a6c25 and 33ac3d6.

📒 Files selected for processing (5)
  • src/packages/inputnumber/doc.en-US.md (1 hunks)
  • src/packages/inputnumber/doc.md (1 hunks)
  • src/packages/inputnumber/doc.taro.md (1 hunks)
  • src/packages/inputnumber/doc.zh-TW.md (1 hunks)
  • src/styles/variables.scss (2 hunks)
🧰 Additional context used
🪛 LanguageTool
src/packages/inputnumber/doc.md

[locale-violation] ~142-~142: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-height | 数字输入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~143-~143: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~143-~143: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~143-~143: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 数字输入框中input的背景颜色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 数字输入框中input的字号颜色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~145-~145: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 数字输入框中input的字号大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~146-~146: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字号大小 | 12px | | --nutui-inputnumber-input-border | 数字输入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~147-~147: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 数字输入框中input的圆角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~148-~148: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圆角 | 4px | | --nutui-inputnumber-input-margin | 数字输入框中input的margin值 | 2px | ...

(GL_BARBARISM_REPLACE)

src/packages/inputnumber/doc.zh-TW.md

[locale-violation] ~133-~133: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-height | 數字輸入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~134-~134: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 數字輸入框中input的背景顏色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~134-~134: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 數字輸入框中input的背景顏色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~134-~134: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 數字輸入框中input的背景顏色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 數字輸入框中input的字號顏色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 數字輸入框中input的字號大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~137-~137: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字號大小 | 12px | | --nutui-inputnumber-input-border | 數字輸入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~138-~138: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 數字輸入框中input的圓角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~139-~139: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圓角 | 4px | | --nutui-inputnumber-input-margin | 數字輸入框中input的margin值 | 2px | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~142-~142: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ... 20px | | --nutui-inputnumber-button-background-color | 數字輸入框左右按鈕的背景色 | transparent |...

(GL_BARBARISM_REPLACE)

src/packages/inputnumber/doc.taro.md

[locale-violation] ~112-~112: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...string\|number|9999| | type | input 的类型 |digit\|number|digit` | |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~134-~134: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-height | 数字输入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 数字输入框中input的背景颜色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 数字输入框中input的字号颜色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~137-~137: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 数字输入框中input的字号大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~138-~138: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字号大小 | 12px | | --nutui-inputnumber-input-border | 数字输入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~139-~139: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 数字输入框中input的圆角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~140-~140: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圆角 | 4px | | --nutui-inputnumber-input-margin | 数字输入框中input的margin值 | 2px | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~143-~143: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ... 20px | | --nutui-inputnumber-button-background-color | 数字输入框左右按钮的背景色 | transparent |...

(GL_BARBARISM_REPLACE)

🪛 Markdownlint (0.35.0)
src/packages/inputnumber/doc.zh-TW.md

129-129: null
Link fragments should be valid

(MD051, link-fragments)

src/packages/inputnumber/doc.taro.md

130-130: null
Link fragments should be valid

(MD051, link-fragments)

🔇 Additional comments (1)
src/styles/variables.scss (1)

Line range hint 615-644: 请验证数字输入框样式调整的可用性影响

样式变量的调整使组件更加紧凑,但需要确认以下几点:

  1. 减小的输入框高度(20px)和字体大小(12px)是否影响用户输入体验
  2. 增加的按钮宽度(20px)是否提升了按钮的可点击性
  3. 新的尺寸是否与设计规范中的其他表单组件保持一致
✅ Verification successful

Let me gather more information about form-related components to verify the consistency of these style changes.


Let me check one final thing about the base font size to understand the complete context.


Let me try one more search with a different pattern to find the base font size.


数字输入框样式调整符合设计规范

根据代码分析结果,当前的样式调整是合理的:

  • 20px 高度与多个基础组件保持一致,包括 Cell、Icon、Switch 等
  • 12px 字体大小对应系统的 $font-size-s,适用于次要信息展示
  • 20px 的按钮宽度增加提升了可点击区域,优化了触控体验
  • 4px 的圆角与 Card、Countup 等组件保持视觉一致性
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 检查其他表单组件是否使用相似的尺寸
echo "检查其他表单组件的样式变量..."
rg "font-size.*12px|height.*20px" src/styles/variables.scss

Length of output: 952


Script:

#!/bin/bash
# 检查表单相关组件的按钮宽度和边框圆角设置
echo "检查表单组件的按钮宽度和边框圆角..."
rg "button-width|border-radius.*4px" src/styles/variables.scss

# 检查其他表单输入组件的字体大小
echo -e "\n检查表单输入组件的字体大小..."
rg "input.*font-size|textarea.*font-size" src/styles/variables.scss

Length of output: 990


Script:

#!/bin/bash
# 检查基础字体大小变量
echo "检查基础字体大小设置..."
rg "\$font-size-base" src/styles/variables.scss

Length of output: 196


Script:

#!/bin/bash
# 检查字体大小相关的所有变量
echo "检查所有字体大小相关变量..."
rg "font-size.*px" src/styles/variables.scss

Length of output: 1262

Copy link
Collaborator

@xiaoyatong xiaoyatong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

关注下使用到了 toast 或其他组件的demo,已经适配过鸿蒙的,可以放出来了~
比如 demo3、demo8、demo9

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (5)
src/packages/inputnumber/doc.md (1)

Line range hint 129-129: 修复文档链接

链接 [ConfigProvider 组件](#/zh-CN/component/configprovider) 使用了错误的语言代码。建议更新为:

-[ConfigProvider 组件](#/zh-CN/component/configprovider)
+[ConfigProvider 组件](#/zh-CN/component/configprovider)
🧰 Tools
🪛 LanguageTool

[locale-violation] ~142-~142: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-max-width | 数字输入框中input的最大宽度 | 23px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~143-~143: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的最大宽度 | 23px | | --nutui-inputnumber-input-min-width | 数字输入框中input的最小宽度 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的最小宽度 | 12px | | --nutui-inputnumber-input-height | 数字输入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~145-~145: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~145-~145: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~145-~145: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 数字输入框中input的背景颜色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~146-~146: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 数字输入框中input的字号颜色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~147-~147: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 数字输入框中input的字号大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~148-~148: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字号大小 | 12px | | --nutui-inputnumber-input-border | 数字输入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~149-~149: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 数字输入框中input的圆角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~150-~150: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圆角 | 4px | | --nutui-inputnumber-input-margin | 数字输入框中input的margin值 | 2px | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~153-~153: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ... 20px | | --nutui-inputnumber-button-background-color | 数字输入框左右按钮的背景色 | transparent |...

(GL_BARBARISM_REPLACE)

src/packages/inputnumber/doc.zh-TW.md (1)

129-129: 修复繁体中文文档链接

链接 [ConfigProvider 組件](#/zh-CN/component/configprovider) 使用了错误的语言代码。建议更新为:

-[ConfigProvider 組件](#/zh-CN/component/configprovider)
+[ConfigProvider 組件](#/zh-TW/component/configprovider)
🧰 Tools
🪛 Markdownlint (0.35.0)

129-129: null
Link fragments should be valid

(MD051, link-fragments)

src/packages/inputnumber/doc.taro.md (2)

112-112: 补充类型属性说明

type 属性是Taro特有的,建议添加更详细的说明,解释 digitnumber 类型的区别及使用场景。

🧰 Tools
🪛 LanguageTool

[locale-violation] ~112-~112: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...string\|number|9999| | type | input 的类型 |digit\|number|digit` | |...

(GL_BARBARISM_REPLACE)


130-130: 修复文档链接

链接 [ConfigProvider 组件](#/zh-CN/component/configprovider) 使用了错误的语言代码。建议更新为:

-[ConfigProvider 组件](#/zh-CN/component/configprovider)
+[ConfigProvider 组件](#/zh-CN/component/configprovider)
🧰 Tools
🪛 Markdownlint (0.35.0)

130-130: null
Link fragments should be valid

(MD051, link-fragments)

src/styles/variables.scss (1)

Line range hint 615-645: 建议使用设计标准化的 Token

当前数值都是写死的具体数值,建议使用基础设计 token 来替代,以提高样式的一致性和可维护性。

例如:

$inputnumber-input-max-width: var(
  --nutui-inputnumber-input-max-width,
-  23px
+  $spacing-xxxl + 5px
) !default;

$inputnumber-input-height: var(
  --nutui-inputnumber-input-height,
-  20px
+  $button-mini-height
) !default;
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 33ac3d6 and ed09115.

📒 Files selected for processing (6)
  • src/packages/inputnumber/doc.en-US.md (1 hunks)
  • src/packages/inputnumber/doc.md (1 hunks)
  • src/packages/inputnumber/doc.taro.md (1 hunks)
  • src/packages/inputnumber/doc.zh-TW.md (1 hunks)
  • src/packages/inputnumber/inputnumber.scss (4 hunks)
  • src/styles/variables.scss (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/packages/inputnumber/inputnumber.scss
🧰 Additional context used
🪛 LanguageTool
src/packages/inputnumber/doc.zh-TW.md

[locale-violation] ~133-~133: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-max-width | 數字輸入框中input的最大寬度 | 23px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~134-~134: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的最大寬度 | 23px | | --nutui-inputnumber-input-min-width | 數字輸入框中input的最小寬度 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的最小寬度 | 12px | | --nutui-inputnumber-input-height | 數字輸入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 數字輸入框中input的背景顏色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 數字輸入框中input的背景顏色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 數字輸入框中input的背景顏色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~137-~137: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 數字輸入框中input的字號顏色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~138-~138: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 數字輸入框中input的字號大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~139-~139: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字號大小 | 12px | | --nutui-inputnumber-input-border | 數字輸入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~140-~140: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 數字輸入框中input的圓角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~141-~141: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圓角 | 4px | | --nutui-inputnumber-input-margin | 數字輸入框中input的margin值 | 2px | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ... 20px | | --nutui-inputnumber-button-background-color | 數字輸入框左右按鈕的背景色 | transparent |...

(GL_BARBARISM_REPLACE)

src/packages/inputnumber/doc.md

[locale-violation] ~142-~142: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-max-width | 数字输入框中input的最大宽度 | 23px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~143-~143: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的最大宽度 | 23px | | --nutui-inputnumber-input-min-width | 数字输入框中input的最小宽度 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的最小宽度 | 12px | | --nutui-inputnumber-input-height | 数字输入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~145-~145: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~145-~145: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~145-~145: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 数字输入框中input的背景颜色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~146-~146: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 数字输入框中input的字号颜色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~147-~147: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 数字输入框中input的字号大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~148-~148: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字号大小 | 12px | | --nutui-inputnumber-input-border | 数字输入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~149-~149: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 数字输入框中input的圆角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~150-~150: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圆角 | 4px | | --nutui-inputnumber-input-margin | 数字输入框中input的margin值 | 2px | ...

(GL_BARBARISM_REPLACE)

src/packages/inputnumber/doc.taro.md

[locale-violation] ~112-~112: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...string\|number|9999| | type | input 的类型 |digit\|number|digit` | |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~134-~134: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-max-width | 数字输入框中input的最大宽度 | 23px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的最大宽度 | 23px | | --nutui-inputnumber-input-min-width | 数字输入框中input的最小宽度 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的最小宽度 | 12px | | --nutui-inputnumber-input-height | 数字输入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~137-~137: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~137-~137: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~137-~137: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 数字输入框中input的背景颜色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~138-~138: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 数字输入框中input的字号颜色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~139-~139: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 数字输入框中input的字号大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~140-~140: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字号大小 | 12px | | --nutui-inputnumber-input-border | 数字输入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~141-~141: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 数字输入框中input的圆角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~142-~142: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圆角 | 4px | | --nutui-inputnumber-input-margin | 数字输入框中input的margin值 | 2px | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~145-~145: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ... 20px | | --nutui-inputnumber-button-background-color | 数字输入框左右按钮的背景色 | transparent |...

(GL_BARBARISM_REPLACE)

🪛 Markdownlint (0.35.0)
src/packages/inputnumber/doc.zh-TW.md

129-129: null
Link fragments should be valid

(MD051, link-fragments)

src/packages/inputnumber/doc.taro.md

130-130: null
Link fragments should be valid

(MD051, link-fragments)

🔇 Additional comments (2)
src/packages/inputnumber/doc.en-US.md (2)

142-143: 新增的宽度变量定义清晰明确

新增的最大和最小宽度变量有助于在多平台场景下更好地控制输入框的尺寸范围。


150-150: 描述文案需要修正

变量 --nutui-inputnumber-input-margin 的描述与其实际用途不符。

-| \--nutui-inputnumber-input-margin | The rounded corners of the input in the number input box | `2px` |
+| \--nutui-inputnumber-input-margin | The margin of the input in the number input box | `2px` |

@irisSong irisSong removed their request for review December 5, 2024 03:49
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (4)
src/packages/inputnumber/demos/taro/demo3.tsx (2)

Line range hint 5-7: 状态声明顺序问题和类型改进建议

  1. overlimit 函数在状态声明之前使用了 toastShow,建议调整声明顺序。
  2. type 参数可以使用更严格的类型定义。

建议按照以下方式修改:

+ const [show, SetShow] = useState(false)
+ const [toastMsg, SetToastMsg] = useState('')
+ const [toastType, SetToastType] = useState<'text' | 'success' | 'loading' | 'warn'>('text')

+ const toastShow = (msg: string, type: 'text' | 'success' | 'loading' | 'warn') => {
+   SetToastMsg(msg)
+   SetToastType(type)
+   SetShow(true)
+ }

  const overlimit = () => {
    toastShow('超出限制事件触发', 'warn')
  }

- const [show, SetShow] = useState(false)
- const [toastMsg, SetToastMsg] = useState('')
- const [toastType, SetToastType] = useState('text')

- const toastShow = (msg: any, type: string) => {
-   SetToastMsg(msg)
-   SetToastType(type)
-   SetShow(true)
- }

Also applies to: 11-15


31-38: Toast 组件可访问性和性能优化建议

  1. Toast 组件缺少 aria-live 属性,影响可访问性
  2. 建议添加 destroyOnClose 属性以优化性能

建议添加以下属性:

  <Toast
    type={toastType}
    visible={show}
    content={toastMsg}
+   aria-live="polite"
+   destroyOnClose
    onClose={() => {
      SetShow(false)
    }}
  />
src/packages/inputnumber/demos/taro/demo8.tsx (1)

Line range hint 18-25: 异步处理优化建议

  1. 缺少清理定时器,可能导致内存泄漏
  2. overlimit 函数未使用,建议移除
  3. 存在潜在的竞态条件

建议按照以下方式优化:

+ const [timer, setTimer] = useState<number | null>(null)

  const onChange = (value: string | number) => {
    toastShow('异步演示 2 秒后更改', 'loading')
    console.log('onChange', value)
-   setTimeout(() => {
+   if (timer) clearTimeout(timer)
+   const newTimer = setTimeout(() => {
      setInputValue(Number(value))
      SetShow(false)
    }, 2000)
+   setTimer(newTimer)
  }

+ // 组件卸载时清理定时器
+ useEffect(() => {
+   return () => {
+     if (timer) clearTimeout(timer)
+   }
+ }, [timer])

- const overlimit = (e: any) => {
-   console.log('超出限制事件触发', e)
- }
src/packages/inputnumber/demos/taro/demo9.tsx (1)

Line range hint 22-25: 格式化函数性能优化建议

建议使用 useMemo 缓存格式化函数,避免不必要的重新创建。

+ const currencyFormatter = useMemo(() => 
+   (value: number | string) => `$ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ','),
+ [])

+ const percentageFormatter = useMemo(() => 
+   (value: number | string) => `${value}%`,
+ [])

  <InputNumber
    className="format-width"
    defaultValue={1000}
    min={10}
    max={15020}
-   formatter={(value) =>
-     `$ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')
-   }
+   formatter={currencyFormatter}
  />

  <InputNumber
    className="format-width"
    defaultValue={100}
    min={0}
    max={100}
-   formatter={(value) => `${value}%`}
+   formatter={percentageFormatter}
  />

Also applies to: 34-36

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between ed09115 and 4e78bd6.

📒 Files selected for processing (11)
  • src/packages/inputnumber/demos/taro/demo3.tsx (2 hunks)
  • src/packages/inputnumber/demos/taro/demo8.tsx (2 hunks)
  • src/packages/inputnumber/demos/taro/demo9.tsx (3 hunks)
  • src/packages/inputnumber/doc.en-US.md (1 hunks)
  • src/packages/inputnumber/doc.md (1 hunks)
  • src/packages/inputnumber/doc.taro.md (1 hunks)
  • src/packages/inputnumber/doc.zh-TW.md (1 hunks)
  • src/packages/inputnumber/inputnumber.scss (4 hunks)
  • src/packages/inputnumber/inputnumber.taro.tsx (3 hunks)
  • src/packages/inputnumber/inputnumber.tsx (1 hunks)
  • src/styles/variables.scss (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • src/packages/inputnumber/inputnumber.tsx
  • src/packages/inputnumber/inputnumber.scss
  • src/packages/inputnumber/inputnumber.taro.tsx
  • src/packages/inputnumber/doc.en-US.md
  • src/styles/variables.scss
🧰 Additional context used
🪛 LanguageTool
src/packages/inputnumber/doc.md

[locale-violation] ~142-~142: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-width | 数字输入框中input的宽度 | 23px | | --...

(GL_BARBARISM_REPLACE)


[locale-violation] ~143-~143: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的宽度 | 23px | | --nutui-inputnumber-input-height | 数字输入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 数字输入框中input的背景颜色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~145-~145: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 数字输入框中input的字号颜色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~146-~146: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 数字输入框中input的字号大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~147-~147: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字号大小 | 12px | | --nutui-inputnumber-input-border | 数字输入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~148-~148: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 数字输入框中input的圆角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~149-~149: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圆角 | 4px | | --nutui-inputnumber-input-margin | 数字输入框中input的margin值 | 2px | ...

(GL_BARBARISM_REPLACE)

src/packages/inputnumber/doc.taro.md

[locale-violation] ~112-~112: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...string\|number|9999| | type | input 的类型 |digit\|number|digit` | |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~134-~134: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-width | 数字输入框中input的宽度 | 23px | | --...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的宽度 | 23px | | --nutui-inputnumber-input-height | 数字输入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 数字输入框中input的背景颜色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~137-~137: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 数字输入框中input的字号颜色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~138-~138: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 数字输入框中input的字号大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~139-~139: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字号大小 | 12px | | --nutui-inputnumber-input-border | 数字输入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~140-~140: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 数字输入框中input的圆角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~141-~141: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圆角 | 4px | | --nutui-inputnumber-input-margin | 数字输入框中input的margin值 | 2px | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ... 20px | | --nutui-inputnumber-button-background-color | 数字输入框左右按钮的背景色 | transparent |...

(GL_BARBARISM_REPLACE)

src/packages/inputnumber/doc.zh-TW.md

[locale-violation] ~133-~133: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-width | 數字輸入框中input的寬度 | 23px | | --...

(GL_BARBARISM_REPLACE)


[locale-violation] ~134-~134: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的寬度 | 23px | | --nutui-inputnumber-input-height | 數字輸入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 數字輸入框中input的背景顏色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 數字輸入框中input的背景顏色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 數字輸入框中input的背景顏色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 數字輸入框中input的字號顏色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~137-~137: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 數字輸入框中input的字號大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~138-~138: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字號大小 | 12px | | --nutui-inputnumber-input-border | 數字輸入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~139-~139: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 數字輸入框中input的圓角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~140-~140: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圓角 | 4px | | --nutui-inputnumber-input-margin | 數字輸入框中input的margin值 | 2px | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~143-~143: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ... 20px | | --nutui-inputnumber-button-background-color | 數字輸入框左右按鈕的背景色 | transparent |...

(GL_BARBARISM_REPLACE)

🪛 Markdownlint (0.35.0)
src/packages/inputnumber/doc.taro.md

130-130: null
Link fragments should be valid

(MD051, link-fragments)

src/packages/inputnumber/doc.zh-TW.md

129-129: null
Link fragments should be valid

(MD051, link-fragments)

🔇 Additional comments (4)
src/packages/inputnumber/demos/taro/demo9.tsx (1)

Line range hint 17-25: 与 H5 版本保持一致性

当前默认值配置与 H5 版本不一致,需要统一配置。

建议修改默认值:

  <InputNumber
    className="format-width"
-   defaultValue={1000}
+   defaultValue={5}
-   min={10}
+   min={1}
-   max={15020}
+   max={10}
    formatter={(value) =>
      `$ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')
    }
  />
src/packages/inputnumber/doc.zh-TW.md (1)

129-129: ⚠️ Potential issue

文档链接需要更新

ConfigProvider组件的链接使用了错误的语言代码。

请应用以下修改:

-[ConfigProvider 組件](#/zh-CN/component/configprovider)
+[ConfigProvider 組件](#/zh-TW/component/configprovider)

Likely invalid or redundant comment.

🧰 Tools
🪛 Markdownlint (0.35.0)

129-129: null
Link fragments should be valid

(MD051, link-fragments)

src/packages/inputnumber/doc.taro.md (2)

130-130: ⚠️ Potential issue

文档链接需要更新

ConfigProvider组件的链接使用了错误的语言代码。

请应用以下修改:

-[ConfigProvider 组件](#/zh-CN/component/configprovider)
+[ConfigProvider 组件](#/zh-CN/component/configprovider)
🧰 Tools
🪛 Markdownlint (0.35.0)

130-130: null
Link fragments should be valid

(MD051, link-fragments)


112-112: 请验证type属性的文档说明

Taro版本特有的type属性需要确认其默认值和支持的类型是否准确。

运行以下脚本检查type属性的实现:

✅ Verification successful

type属性的文档说明准确无误

根据代码实现验证:

  • inputnumber.taro.tsx中,type属性的类型定义为:Extract<InputProps['type'], 'number' | 'digit'>
  • 默认值确实设置为'digit'
  • 文档中描述的类型选项digit | number和默认值digit与实际实现完全一致
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 描述:验证InputNumber组件在Taro版本中type属性的实现

# 搜索type属性的定义和使用
ast-grep --pattern 'type: {
  $$$
}'

Length of output: 38


Script:

#!/bin/bash
# 搜索InputNumber组件中type属性的定义和使用
rg -A 5 "type.*(?:digit|number)" src/packages/inputnumber

# 搜索Props或Interface定义中的type属性
ast-grep --pattern 'interface $_Props {
  $$$
  type?: $_
  $$$
}'

# 搜索默认值设置
rg "defaultProps.*type.*(?:digit|number)" src/packages/inputnumber

Length of output: 2319

🧰 Tools
🪛 LanguageTool

[locale-violation] ~112-~112: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...string\|number|9999| | type | input 的类型 |digit\|number|digit` | |...

(GL_BARBARISM_REPLACE)

@xiaoyatong
Copy link
Collaborator

image

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (2)
src/packages/inputnumber/doc.md (1)

142-151: 建议补充样式变量的使用示例

当前文档中列出了所有可用的样式变量,但缺少具体的使用示例。建议:

  1. 添加一个使用ConfigProvider自定义样式的完整示例
  2. 展示如何组合使用这些变量来实现不同的视觉效果
 ### 设置按钮样式
 
 可使用`ConfigProvider`组件来设置按钮样式。
 
+示例:自定义输入框和按钮尺寸
+```tsx
+<ConfigProvider
+  theme={{
+    nutuiInputnumberInputWidth: '30px',
+    nutuiInputnumberButtonWidth: '24px',
+    nutuiInputnumberButtonHeight: '24px',
+  }}
+>
+  <InputNumber />
+</ConfigProvider>
+```
🧰 Tools
🪛 LanguageTool

[locale-violation] ~142-~142: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-width | 数字输入框中input的宽度 | 26px | | --...

(GL_BARBARISM_REPLACE)


[locale-violation] ~143-~143: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的宽度 | 26px | | --nutui-inputnumber-input-height | 数字输入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 数字输入框中input的背景颜色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~145-~145: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 数字输入框中input的字号颜色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~146-~146: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 数字输入框中input的字号大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~147-~147: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字号大小 | 12px | | --nutui-inputnumber-input-border | 数字输入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~148-~148: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 数字输入框中input的圆角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~149-~149: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圆角 | 4px | | --nutui-inputnumber-input-margin | 数字输入框中input的margin值 | 2px | ...

(GL_BARBARISM_REPLACE)

src/packages/inputnumber/doc.taro.md (1)

112-112: 补充 type 属性的说明

建议为 type 属性添加更详细的说明,解释 digitnumber 类型的区别及其在小程序中的具体表现。

-| type | input 的类型 | `digit` \| `number` | `digit` |
+| type | input 的类型,`digit` 类型支持小数点,`number` 类型不支持小数点 | `digit` \| `number` | `digit` |
🧰 Tools
🪛 LanguageTool

[locale-violation] ~112-~112: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...string\|number|9999| | type | input 的类型 |digit\|number|digit` | |...

(GL_BARBARISM_REPLACE)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 1b70e9f and 4236ddc.

📒 Files selected for processing (5)
  • src/packages/inputnumber/doc.en-US.md (1 hunks)
  • src/packages/inputnumber/doc.md (1 hunks)
  • src/packages/inputnumber/doc.taro.md (1 hunks)
  • src/packages/inputnumber/doc.zh-TW.md (1 hunks)
  • src/styles/variables.scss (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/packages/inputnumber/doc.en-US.md
  • src/styles/variables.scss
🧰 Additional context used
🪛 LanguageTool
src/packages/inputnumber/doc.md

[locale-violation] ~142-~142: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-width | 数字输入框中input的宽度 | 26px | | --...

(GL_BARBARISM_REPLACE)


[locale-violation] ~143-~143: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的宽度 | 26px | | --nutui-inputnumber-input-height | 数字输入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 数字输入框中input的背景颜色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~145-~145: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 数字输入框中input的字号颜色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~146-~146: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 数字输入框中input的字号大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~147-~147: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字号大小 | 12px | | --nutui-inputnumber-input-border | 数字输入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~148-~148: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 数字输入框中input的圆角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~149-~149: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圆角 | 4px | | --nutui-inputnumber-input-margin | 数字输入框中input的margin值 | 2px | ...

(GL_BARBARISM_REPLACE)

src/packages/inputnumber/doc.taro.md

[locale-violation] ~112-~112: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...string\|number|9999| | type | input 的类型 |digit\|number|digit` | |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~134-~134: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-width | 数字输入框中input的宽度 | 26px | | --...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的宽度 | 26px | | --nutui-inputnumber-input-height | 数字输入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 数字输入框中input的背景颜色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~137-~137: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 数字输入框中input的字号颜色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~138-~138: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 数字输入框中input的字号大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~139-~139: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字号大小 | 12px | | --nutui-inputnumber-input-border | 数字输入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~140-~140: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 数字输入框中input的圆角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~141-~141: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圆角 | 4px | | --nutui-inputnumber-input-margin | 数字输入框中input的margin值 | 2px | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ... 20px | | --nutui-inputnumber-button-background-color | 数字输入框左右按钮的背景色 | transparent |...

(GL_BARBARISM_REPLACE)

src/packages/inputnumber/doc.zh-TW.md

[locale-violation] ~133-~133: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-width | 數字輸入框中input的寬度 | 26px | | --...

(GL_BARBARISM_REPLACE)


[locale-violation] ~134-~134: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的寬度 | 26px | | --nutui-inputnumber-input-height | 數字輸入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 數字輸入框中input的背景顏色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 數字輸入框中input的背景顏色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 數字輸入框中input的背景顏色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 數字輸入框中input的字號顏色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~137-~137: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 數字輸入框中input的字號大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~138-~138: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字號大小 | 12px | | --nutui-inputnumber-input-border | 數字輸入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~139-~139: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 數字輸入框中input的圓角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~140-~140: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圓角 | 4px | | --nutui-inputnumber-input-margin | 數字輸入框中input的margin值 | 2px | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~143-~143: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ... 20px | | --nutui-inputnumber-button-background-color | 數字輸入框左右按鈕的背景色 | transparent |...

(GL_BARBARISM_REPLACE)

🪛 Markdownlint (0.35.0)
src/packages/inputnumber/doc.taro.md

130-130: null
Link fragments should be valid

(MD051, link-fragments)

src/packages/inputnumber/doc.zh-TW.md

129-129: null
Link fragments should be valid

(MD051, link-fragments)

🔇 Additional comments (5)
src/packages/inputnumber/doc.md (2)

150-151: 请确认按钮尺寸的设计规范

按钮尺寸从之前的14x16px调整为20x20px,这是一个显著的变化:

  • 按钮变得更大且成为正方形
  • 新的尺寸可能会影响整体布局和对齐

建议:

  1. 确认这个改动是否符合设计规范
  2. 验证在不同设备尺寸下的显示效果

142-143: 请确认输入框样式变量的一致性

根据之前的审查发现,输入框的样式在不同主题中存在差异:

  • 文档中定义:宽度26px,高度20px,字号12px
  • JRKF/JMAPP主题:宽度40px,高度24px,字号14px

建议:

  1. 确认这些新的尺寸值是否为最终确定的设计规范
  2. 如果是,需要同步更新其他主题文件中的对应值

Also applies to: 146-146, 148-149

✅ Verification successful

Let me explain: The previous command failed because rg didn't recognize the scss type. I've modified the command to search for these variables across all CSS-like file types and also added a search for theme-related files in the inputnumber package directory.


Let me explain: We need to verify the actual implementation in the component's SCSS file and check recent changes to understand if these inconsistencies are being addressed or are intentional.


主题样式差异确认

经验证,不同主题确实存在有意的样式差异:

  • 默认主题:输入框宽度26px(最近从23px调整),高度20px
  • JRKF/JMAPP主题:输入框宽度40px,高度24px

这些差异是刻意设计的,用于适配不同场景的视觉需求,文档中的值正确反映了默认主题的配置。建议:

  1. 在文档中补充说明不同主题的尺寸差异
  2. 添加主题配置示例,方便开发者参考
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 验证所有主题文件中的样式变量值
rg --type scss "nutui-inputnumber-(input|button)-(width|height|font-size)"

Length of output: 105


Script:

#!/bin/bash
# Search for CSS variable definitions in all files
rg --type css --type less --type sass "nutui-inputnumber-(input|button)-(width|height|font-size)"

# Also try finding theme-related files
fd -e css -e less -e scss -e sass . src/packages/inputnumber/

Length of output: 1601


Script:

#!/bin/bash
# Let's check the actual implementation in inputnumber.scss
cat src/packages/inputnumber/inputnumber.scss

# Also check if there are any recent changes to these files
git diff HEAD~1 src/styles/variables*.scss src/packages/inputnumber/inputnumber.scss

Length of output: 2401

🧰 Tools
🪛 LanguageTool

[locale-violation] ~142-~142: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-width | 数字输入框中input的宽度 | 26px | | --...

(GL_BARBARISM_REPLACE)


[locale-violation] ~143-~143: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的宽度 | 26px | | --nutui-inputnumber-input-height | 数字输入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)

src/packages/inputnumber/doc.zh-TW.md (2)

129-129: ⚠️ Potential issue

修复文档链接

ConfigProvider 组件的链接使用了错误的语言代码,应该使用 zh-TW 而不是 zh-CN。

-[ConfigProvider 組件](#/zh-CN/component/configprovider)
+[ConfigProvider 組件](#/zh-TW/component/configprovider)

Likely invalid or redundant comment.

🧰 Tools
🪛 Markdownlint (0.35.0)

129-129: null
Link fragments should be valid

(MD051, link-fragments)


133-146: 确认样式变量的更新影响

样式变量的默认值发生了以下变化:

  • input 高度从 24px 减小到 20px
  • 字体大小从 14px 减小到 12px
  • 边距从 0 增加到 2px
  • 按钮宽度从 14px 增加到 20px

请确认这些改动是否:

  1. 已在设计系统中得到确认
  2. 对现有组件的布局没有负面影响
  3. 在所有支持的平台上都能正常显示
🧰 Tools
🪛 LanguageTool

[locale-violation] ~133-~133: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-width | 數字輸入框中input的寬度 | 26px | | --...

(GL_BARBARISM_REPLACE)


[locale-violation] ~134-~134: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的寬度 | 26px | | --nutui-inputnumber-input-height | 數字輸入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 數字輸入框中input的背景顏色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 數字輸入框中input的背景顏色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 數字輸入框中input的背景顏色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 數字輸入框中input的字號顏色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~137-~137: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 數字輸入框中input的字號大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~138-~138: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字號大小 | 12px | | --nutui-inputnumber-input-border | 數字輸入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~139-~139: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 數字輸入框中input的圓角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~140-~140: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圓角 | 4px | | --nutui-inputnumber-input-margin | 數字輸入框中input的margin值 | 2px | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~143-~143: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ... 20px | | --nutui-inputnumber-button-background-color | 數字輸入框左右按鈕的背景色 | transparent |...

(GL_BARBARISM_REPLACE)

src/packages/inputnumber/doc.taro.md (1)

134-147: 确认 Taro 环境下样式变量的兼容性

请确认更新后的样式变量在各类小程序平台(微信、支付宝等)中是否都能正常工作。特别注意:

  1. 小程序对 CSS 变量的支持程度
  2. 不同设备下的显示效果
✅ Verification successful

CSS变量在小程序环境中可以安全使用

基于代码分析结果,可以确认:

  1. InputNumber组件使用的所有CSS变量都有合适的降级默认值
  2. 样式实现采用标准的CSS语法,未使用特定平台的专有特性
  3. 通过ConfigProvider组件提供的主题定制方案,确保了跨平台兼容性
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 检查 Taro 特定的样式覆盖
rg --type css "inputnumber.*taro" -A 2

Length of output: 40


Script:

#!/bin/bash
# 搜索 Taro 相关的样式文件
fd -e scss -e css -e less . src/packages/inputnumber

# 检查 Taro 相关的样式实现
rg -t css "var\(--nutui-inputnumber" 

# 查找 Taro 相关的平台适配代码
fd . -e tsx -e jsx -e ts -e js --exec rg -l "process\.env\.TARO_ENV"

Length of output: 2108


Script:

#!/bin/bash
# 检查 InputNumber 组件的 Taro 实现
cat src/packages/inputnumber/inputnumber.scss

# 检查是否有特定平台的样式覆盖
fd . src/packages/inputnumber --exec rg -l "TARO_ENV|process\.env\.TARO"

# 检查组件的使用示例
cat src/packages/inputnumber/doc.taro.md

Length of output: 5028

🧰 Tools
🪛 LanguageTool

[locale-violation] ~134-~134: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-width | 数字输入框中input的宽度 | 26px | | --...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的宽度 | 26px | | --nutui-inputnumber-input-height | 数字输入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 数字输入框中input的背景颜色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~137-~137: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 数字输入框中input的字号颜色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~138-~138: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 数字输入框中input的字号大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~139-~139: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字号大小 | 12px | | --nutui-inputnumber-input-border | 数字输入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~140-~140: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 数字输入框中input的圆角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~141-~141: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圆角 | 4px | | --nutui-inputnumber-input-margin | 数字输入框中input的margin值 | 2px | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ... 20px | | --nutui-inputnumber-button-background-color | 数字输入框左右按钮的背景色 | transparent |...

(GL_BARBARISM_REPLACE)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (3)
src/packages/inputnumber/doc.md (1)

Line range hint 129-129: 修复文档链接

ConfigProvider 组件的链接需要更新。

-[ConfigProvider 组件](#/zh-CN/component/configprovider)
+[ConfigProvider 组件](#/zh-CN/react/component/configprovider)
🧰 Tools
🪛 LanguageTool

[locale-violation] ~142-~142: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-width | 数字输入框中input的宽度 | 26px | | --...

(GL_BARBARISM_REPLACE)


[locale-violation] ~143-~143: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的宽度 | 26px | | --nutui-inputnumber-input-height | 数字输入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 数字输入框中input的背景颜色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~145-~145: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 数字输入框中input的字号颜色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~146-~146: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 数字输入框中input的字号大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~147-~147: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字号大小 | 12px | | --nutui-inputnumber-input-border | 数字输入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~148-~148: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 数字输入框中input的圆角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~149-~149: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圆角 | 4px | | --nutui-inputnumber-input-margin | 数字输入框中input的margin值 | 0px | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~152-~152: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ... 20px | | --nutui-inputnumber-button-background-color | 数字输入框左右按钮的背景色 | transparent |...

(GL_BARBARISM_REPLACE)

src/packages/inputnumber/doc.zh-TW.md (1)

129-129: 修复文档链接

ConfigProvider 组件链接使用了错误的语言代码。

-[ConfigProvider 組件](#/zh-CN/component/configprovider)
+[ConfigProvider 組件](#/zh-TW/react/component/configprovider)
🧰 Tools
🪛 Markdownlint (0.35.0)

129-129: null
Link fragments should be valid

(MD051, link-fragments)

src/packages/inputnumber/doc.taro.md (1)

130-130: 修复文档链接

ConfigProvider 组件链接需要更新为 Taro 平台的正确路径。

-[ConfigProvider 组件](#/zh-CN/component/configprovider)
+[ConfigProvider 组件](#/zh-CN/taro/component/configprovider)
🧰 Tools
🪛 Markdownlint (0.35.0)

130-130: null
Link fragments should be valid

(MD051, link-fragments)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 4236ddc and f2bd515.

📒 Files selected for processing (5)
  • src/packages/inputnumber/doc.en-US.md (1 hunks)
  • src/packages/inputnumber/doc.md (1 hunks)
  • src/packages/inputnumber/doc.taro.md (1 hunks)
  • src/packages/inputnumber/doc.zh-TW.md (1 hunks)
  • src/styles/variables.scss (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/packages/inputnumber/doc.en-US.md
  • src/styles/variables.scss
🧰 Additional context used
🪛 Markdownlint (0.35.0)
src/packages/inputnumber/doc.zh-TW.md

129-129: null
Link fragments should be valid

(MD051, link-fragments)

src/packages/inputnumber/doc.taro.md

130-130: null
Link fragments should be valid

(MD051, link-fragments)

🪛 LanguageTool
src/packages/inputnumber/doc.zh-TW.md

[locale-violation] ~133-~133: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-width | 數字輸入框中input的寬度 | 26px | | --...

(GL_BARBARISM_REPLACE)


[locale-violation] ~134-~134: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的寬度 | 26px | | --nutui-inputnumber-input-height | 數字輸入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 數字輸入框中input的背景顏色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 數字輸入框中input的背景顏色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 數字輸入框中input的背景顏色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 數字輸入框中input的字號顏色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~137-~137: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 數字輸入框中input的字號大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~138-~138: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字號大小 | 12px | | --nutui-inputnumber-input-border | 數字輸入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~139-~139: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 數字輸入框中input的圓角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~140-~140: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圓角 | 4px | | --nutui-inputnumber-input-margin | 數字輸入框中input的margin值 | 0px | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~143-~143: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ... 20px | | --nutui-inputnumber-button-background-color | 數字輸入框左右按鈕的背景色 | transparent |...

(GL_BARBARISM_REPLACE)

src/packages/inputnumber/doc.md

[locale-violation] ~142-~142: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-width | 数字输入框中input的宽度 | 26px | | --...

(GL_BARBARISM_REPLACE)


[locale-violation] ~143-~143: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的宽度 | 26px | | --nutui-inputnumber-input-height | 数字输入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 数字输入框中input的背景颜色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~145-~145: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 数字输入框中input的字号颜色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~146-~146: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 数字输入框中input的字号大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~147-~147: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字号大小 | 12px | | --nutui-inputnumber-input-border | 数字输入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~148-~148: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 数字输入框中input的圆角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~149-~149: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圆角 | 4px | | --nutui-inputnumber-input-margin | 数字输入框中input的margin值 | 0px | ...

(GL_BARBARISM_REPLACE)

src/packages/inputnumber/doc.taro.md

[locale-violation] ~112-~112: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...string\|number|9999| | type | input 的类型 |digit\|number|digit` | |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~134-~134: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...-- | --- | --- | | --nutui-inputnumber-input-width | 数字输入框中input的宽度 | 26px | | --...

(GL_BARBARISM_REPLACE)


[locale-violation] ~135-~135: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的宽度 | 26px | | --nutui-inputnumber-input-height | 数字输入框中input的高度 | 20px | | -...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...ut的高度 | 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...| 20px | | --nutui-inputnumber-input-background-color | 数字输入框中input的背景颜色 | `$color-back...

(GL_BARBARISM_REPLACE)


[locale-violation] ~136-~136: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ...t-background-color | 数字输入框中input的背景颜色 | $color-background | | --nutui-inputnumber-input-font-co...

(GL_BARBARISM_REPLACE)


[locale-violation] ~137-~137: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...or-background| | \--nutui-inputnumber-input-font-color | 数字输入框中input的字号颜色 |$color...

(GL_BARBARISM_REPLACE)


[locale-violation] ~138-~138: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...$color-title | | --nutui-inputnumber-input-font-size | 数字输入框中input的字号大小 | 12px |...

(GL_BARBARISM_REPLACE)


[locale-violation] ~139-~139: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的字号大小 | 12px | | --nutui-inputnumber-input-border | 数字输入框中input的border值 | 0 | | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~140-~140: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...的border值 | 0 | | --nutui-inputnumber-input-border-radius | 数字输入框中input的圆角 | 4px ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~141-~141: 'input' é un xenismo. É preferíbel dicir "entrada"
Context: ...put的圆角 | 4px | | --nutui-inputnumber-input-margin | 数字输入框中input的margin值 | 0px | ...

(GL_BARBARISM_REPLACE)


[locale-violation] ~144-~144: 'background' é un xenismo. É preferíbel dicir "formación de base"
Context: ... 20px | | --nutui-inputnumber-button-background-color | 数字输入框左右按钮的背景色 | transparent |...

(GL_BARBARISM_REPLACE)

@oasis-cloud oasis-cloud merged commit e8fa0d4 into jdf2e:feat_v3.x Dec 11, 2024
6 checks passed
This was referenced Dec 23, 2024
@coderabbitai coderabbitai bot mentioned this pull request Jan 9, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Target branch 3.x size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants