查询结果支持复制为 Markdown - #3257
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3257 +/- ##
=======================================
Coverage 88.70% 88.70%
=======================================
Files 158 158
Lines 29780 29780
=======================================
Hits 26415 26415
Misses 3365 3365 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a812073e5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
感谢 review,5 条意见(2×P1、3×P2)均已在 515c256 处理,详见各行内回复:按钮按 can_download 门控(含建表语句结果页)、复制成功记录独立审计动作「复制Markdown」、标题不再剔除尖括号别名、剪贴板写入移回用户手势任务内(Safari 兼容)。 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 515c2564a0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
功能说明
SQL 查询页每个「执行结果」标签页的工具栏新增**「复制为Markdown」**按钮,一键将当前查询结果复制为 Markdown 表格文本,便于粘贴到 Wiki、邮件、IM 等场景。
实现说明
buttons选项实现,按钮样式与工具栏原生按钮一致(按钮 HTML 通过html字段自定义,规避showButtonText默认关闭导致文本不渲染的问题)getVisibleColumns(隐藏列不参与)+getData(全量数据);数组/对象值JSON.stringify,null/undefined 显示为(null)(与表格undefinedText口径一致)\与|先后转义、换行替换为空格,保证粘贴后表格结构不被破坏兼容性
document.execCommand(copy),并恢复页面焦点测试