-
Notifications
You must be signed in to change notification settings - Fork 286
chore: 同步新增功能 #3374
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
base: feat_v3.x
Are you sure you want to change the base?
chore: 同步新增功能 #3374
Changes from 1 commit
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 | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -40,6 +40,10 @@ const Demo6 = () => { | |||||||||||||||
| cancelText="决策2" | ||||||||||||||||
| onConfirm={() => setVisible2(false)} | ||||||||||||||||
| onCancel={() => setVisible2(false)} | ||||||||||||||||
| onClose={() => { | ||||||||||||||||
| setVisible2(false) | ||||||||||||||||
| console.log('关闭底部icon 3') | ||||||||||||||||
| }} | ||||||||||||||||
|
Comment on lines
+43
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain请移除调试日志,并考虑与第一个对话框保持一致性 添加
应用此修改以移除调试日志: onClose={() => {
setVisible2(false)
- console.log('关闭底部icon 3')
}}如果希望保持两个对话框的一致性,可以考虑为第一个对话框也添加 <Dialog
className="test-dialog"
title="顶部带关闭按钮"
visible={visible1}
closeIcon
closeIconPosition="top-right"
style={{
'--nutui-dialog-close-color': '#888B94',
}}
onConfirm={() => setVisible1(false)}
onCancel={() => setVisible1(false)}
+ onClose={() => setVisible1(false)}
>
支持函数调用和组件调用两种方式。
</Dialog>🏁 Script executed: #!/bin/bash
# 查看完整的演示文件内容,特别是两个 Dialog 组件的定义
cat src/packages/dialog/demos/taro/demo6.tsxLength of output: 1263 🏁 Script executed: #!/bin/bash
# 检查项目中是否有类似的 console.log 用法模式
rg "console\.log\(" src/packages/dialog/demos/ -n -B2 -A2 | head -50Length of output: 1998 🏁 Script executed: #!/bin/bash
# 检查文件中是否有其他中文日志,用于判断是否是有意的演示代码
rg "console\.(log|warn|error)" src/packages/dialog/demos/taro/ -nLength of output: 159 移除调试日志,并建议与第一个对话框保持一致 通过验证完整文件内容确认:
建议修改: 移除第45行的调试日志: onClose={() => {
setVisible2(false)
- console.log('关闭底部icon 3')
}}同时为第一个Dialog添加 <Dialog
className="test-dialog"
title="顶部带关闭按钮"
visible={visible1}
closeIcon
closeIconPosition="top-right"
style={{
'--nutui-dialog-close-color': '#888B94',
}}
onConfirm={() => setVisible1(false)}
onCancel={() => setVisible1(false)}
+ onClose={() => setVisible1(false)}
>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||
| closeIcon | ||||||||||||||||
| > | ||||||||||||||||
| 支持函数调用和组件调用两种方式。 | ||||||||||||||||
|
|
||||||||||||||||
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.
需要在 h5 和小程序端验证一下