-
Notifications
You must be signed in to change notification settings - Fork 261
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
fix(resultpage): 适配 V14 #2741
base: V3.0
Are you sure you want to change the base?
fix(resultpage): 适配 V14 #2741
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -6,25 +6,25 @@ const Demo1 = () => { | |||||
<> | ||||||
<Cell> | ||||||
<ResultPage | ||||||
title="信息补充" | ||||||
title="信息反馈" | ||||||
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. 💡 Codebase verification 文案需要统一调整 根据代码库检查结果:
建议:
🔗 Analysis chain标题和按钮文案的一致性更新 文案更新符合设计规范,建议确认以下几点:
Also applies to: 14-14 Let me verify the title consistency as well before making the final response. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# 检查其他demo文件中的按钮文案是否统一
rg -g "*.tsx" "text: '[^']*操作[^']*'" src/packages/resultpage/demos/
Length of output: 1209 Script: #!/bin/bash
# 检查其他demo文件中的标题文案
rg -g "*.tsx" "title=\"[^\"]*\"" src/packages/resultpage/demos/
Length of output: 720 |
||||||
description="内容描述内容可折行,建议最多不超过两行建议最多不超过两行" | ||||||
status="info" | ||||||
actions={[ | ||||||
{ | ||||||
text: '主要按钮', | ||||||
text: '主要操作', | ||||||
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. 按钮文本不一致 根据其他 demo 文件的修改,此处的按钮文本应该使用"操作按钮"而不是"主要操作",以保持整体一致性。 建议修改如下: - text: '主要操作',
+ text: '操作按钮', 📝 Committable suggestion
Suggested change
|
||||||
type: 'primary', | ||||||
}, | ||||||
]} | ||||||
/> | ||||||
</Cell> | ||||||
<Cell> | ||||||
<ResultPage | ||||||
title="信息补充" | ||||||
title="信息反馈" | ||||||
description="内容描述内容可折行,建议最多不超过两行建议最多不超过两行" | ||||||
status="info" | ||||||
actions={[ | ||||||
{ | ||||||
text: '次要按钮', | ||||||
text: '操作按钮', | ||||||
}, | ||||||
]} | ||||||
/> | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,10 +9,10 @@ const Demo1 = () => { | |
status="warning" | ||
actions={[ | ||
{ | ||
text: '次要按钮', | ||
text: '操作按钮', | ||
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. 💡 Codebase verification 按钮文案需要进一步统一 在检查结果中发现,大部分demo文件已经统一使用了"操作按钮"作为按钮文案,但是在
🔗 Analysis chain按钮文案统一更新已完成 按钮文案的统一更新符合V14版本的规范要求,使用"操作按钮"替换原有的"次要按钮"和"主要按钮",提升了用户界面的一致性。 运行以下脚本验证其他demo文件中的按钮文案是否已统一更新: Also applies to: 15-15 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# 描述:检查所有demo文件中的按钮文案是否已统一更新
# 搜索所有demo文件中的按钮文案
rg -g "src/packages/resultpage/demos/**/*.tsx" "text: '[^']*'"
Length of output: 1201 |
||
}, | ||
{ | ||
text: '主要按钮', | ||
text: '操作按钮', | ||
type: 'primary', | ||
}, | ||
]} | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -58,7 +58,7 @@ import { ResultPage } from '@nutui/nutui-react' | |||||
|
||||||
| 屬性 | 說明 | 類型 | 默認值 | | ||||||
| --- | --- | --- | --- | | ||||||
| title | 標題 | `ReactNode` | `-`| | ||||||
| title | 標題 | `ReactNode` | `-` | | ||||||
| description | 描述,最多展示兩行 | `ReactNode` | `-` | | ||||||
| status | 狀態類型 | `success` \| `error` \| `warning` \| `info` \| `waiting` | `info` | | ||||||
| icon | 自定義 `icon` | `ReactNode` | `-` | | ||||||
|
@@ -72,13 +72,13 @@ import { ResultPage } from '@nutui/nutui-react' | |||||
|
||||||
| 名稱 | 說明 | 默認值 | | ||||||
| --- | --- | --- | | ||||||
| \--nutui-resultpage-width | 內容區域寬度 | `247px` | | ||||||
| \--nutui-resultpage-icon-size | icon的寬高 | `48px` | | ||||||
| \--nutui-resultpage-icon-margin-bottom | icon的margin-bottom值 | `16px` | | ||||||
| \--resultpage-title-margin-bottom | 標題的margin-top值 | `9px` | | ||||||
| \--nutui-resultpage-width | 內容區域寬度 | `240px` | | ||||||
| \--nutui-resultpage-icon-size | icon的寬高 | `36x` | | ||||||
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. 修正图标尺寸单位的笔误 单位值写错了,"36x" 应该为 "36px"。 -| \--nutui-resultpage-icon-size | icon的寬高 | `36x` |
+| \--nutui-resultpage-icon-size | icon的寬高 | `36px` | 📝 Committable suggestion
Suggested change
|
||||||
| \--nutui-resultpage-icon-margin-bottom | icon的margin-bottom值 | `12px` | | ||||||
| \--resultpage-title-margin-bottom | 標題的margin-top值 | `12px` | | ||||||
| \--nutui-resultpage-title-font-size | 標題的字體大小 | `$font-size-xl` | | ||||||
| \---nutui-resultpage-title-color | 標題的文字顏色 | `$color-title` | | ||||||
| \--nutui-resultpage-description-font-size | 描述的字體大小 | `$font-size-base` | | ||||||
| \--nutui-resultpage-description-color | 描述的文字顏色 | `$color-text` | | ||||||
| \--nutui-resultpage-description-line-height | 描述的行高 | `20px` | | ||||||
| \--nutui-resultpage-actions-margin-topt | 操作區域的margin-top值 | `21px` | | ||||||
| \--nutui-resultpage-actions-margin-topt | 操作區域的margin-top值 | `16px` | |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,12 @@ | |
align-items: center; | ||
margin: 0 auto; | ||
&-icon { | ||
height: $resultpage-icon-size; | ||
width: $resultpage-icon-size; | ||
display: inline-flex; | ||
margin-bottom: $resultpage-icon-margin-bottom; | ||
background-size: 100%; | ||
.nut-icon { | ||
height: $resultpage-icon-size; | ||
width: $resultpage-icon-size; | ||
} | ||
Comment on lines
+8
to
+13
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. 💡 Codebase verification Flex布局实现合理,但建议补充响应式支持 根据代码分析,当前实现存在以下情况:
建议:
🔗 Analysis chain请验证响应式布局表现 新的 flex 布局可能在不同屏幕尺寸下有不同表现,建议验证以下场景:
🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# 检查是否有针对不同屏幕尺寸的媒体查询
rg "@media" src/packages/resultpage/
# 检查是否有 RTL 相关的样式定义
rg "dir=\"rtl\"" src/packages/resultpage/
rg "html\[dir=\"rtl\"\]" src/packages/resultpage/
Length of output: 128 Script: #!/bin/bash
# 检查整个组件库中的响应式布局实现
rg -A 3 "@media" src/packages/
# 检查 resultpage 组件的样式变量定义
rg "\$resultpage" src/packages/
# 检查是否有其他组件引用了 resultpage 的样式
rg "resultpage" src/packages/ --type scss
# 检查组件文档中关于响应式的说明
fd -e md . src/packages/resultpage/
Length of output: 313 Script: #!/bin/bash
# 检查文档中的响应式相关说明
cat src/packages/resultpage/doc.md
# 检查样式文件中的变量定义
cat src/packages/resultpage/resultpage.scss
# 使用正确的文件类型搜索
rg "resultpage" src/packages/ -g "*.scss"
rg "resultpage" src/packages/ -g "*.css"
# 检查是否存在响应式测试用例
fd -e test.tsx -e test.ts . src/packages/resultpage/
Length of output: 4405 |
||
} | ||
&-title { | ||
width: $resultpage-width; | ||
|
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.
💡 Codebase verification
按钮文案需要统一规范
发现
src/packages/resultpage/demos/h5/demo4.tsx
中存在不一致的按钮文案:建议将所有按钮文案统一修改为 "操作按钮",以保持整体设计规范的一致性。
🔗 Analysis chain
按钮文案修改符合规范!
按钮文案从"次要按钮"和"主要按钮"统一更新为"操作按钮"的修改符合V14版本的设计规范。
运行以下脚本验证其他demo文件中的按钮文案是否已统一更新:
Also applies to: 16-16
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 1190