-
Notifications
You must be signed in to change notification settings - Fork 263
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: feat_v3.x
Are you sure you want to change the base?
fix(resultpage): 适配 V14 #2741
Changes from all commits
519a74d
873a635
7fd671f
9ffa71f
dea7964
e161e9d
1b15d7e
b8fd5d7
9643012
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 |
---|---|---|
|
@@ -768,6 +768,7 @@ | |
"sort": 15, | ||
"show": true, | ||
"taro": true, | ||
"v14": true, | ||
"author": "songsong" | ||
}, | ||
{ | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -6,25 +6,25 @@ const Demo1 = () => { | |||||
<> | ||||||
<Cell> | ||||||
<ResultPage | ||||||
title="信息补充" | ||||||
title="信息反馈" | ||||||
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: '次要操作', | ||||||
}, | ||||||
]} | ||||||
/> | ||||||
|
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. 根据 ai 给的建议进行修改。 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. 已修正 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,21 +6,23 @@ | |
margin: 0 auto; | ||
} | ||
.nut-resultpage-icon { | ||
height: 48px; | ||
width: 48px; | ||
margin-bottom: 16px; | ||
background-size: 100%; | ||
display: inline-flex; | ||
margin-bottom: 12px; | ||
} | ||
.nut-resultpage-icon .nut-icon { | ||
height: 36px; | ||
width: 36px; | ||
} | ||
.nut-resultpage-title { | ||
width: 247px; | ||
margin-bottom: 9px; | ||
font-size: 20px; | ||
width: 240px; | ||
margin-bottom: 12px; | ||
font-size: 18px; | ||
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. 是不是应该使用 sass 变量,包括 margin-bottom 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. 这个是编译后的css文件 |
||
color: #1a1a1a; | ||
font-weight: 600; | ||
text-align: center; | ||
} | ||
.nut-resultpage-description { | ||
width: 247px; | ||
width: 240px; | ||
line-height: 20px; | ||
font-size: 14px; | ||
color: #505259; | ||
|
@@ -33,12 +35,9 @@ | |
.nut-resultpage-actions { | ||
display: flex; | ||
flex-direction: row; | ||
margin-top: 21px; | ||
margin-top: 16px; | ||
} | ||
.nut-resultpage-action { | ||
margin-left: 6px; | ||
margin-right: 6px; | ||
} | ||
.nut-resultpage-action-button { | ||
white-space: nowrap; | ||
} |
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; | ||
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. 有一种情况,如果用户使用的不是 nut icon库,会怎么样呢~ 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. 那就传入自定义icon |
||
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
文案需要统一调整
根据代码库检查结果:
建议:
🔗 Analysis chain
标题和按钮文案的一致性更新
文案更新符合设计规范,建议确认以下几点:
Also applies to: 14-14
Let me verify the title consistency as well before making the final response.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 1209
Script:
Length of output: 720