Commit 6631789f authored by 水玉婷's avatar 水玉婷
Browse files

feat:iframe复制的时候添加域名

parent 41747d53
...@@ -624,7 +624,9 @@ const handleCopy = async (msg: Message) => { ...@@ -624,7 +624,9 @@ const handleCopy = async (msg: Message) => {
// 提取iframe的src属性 // 提取iframe的src属性
const srcMatch = block.content.match(/src="([^"]+)"/); const srcMatch = block.content.match(/src="([^"]+)"/);
if (srcMatch && srcMatch[1]) { if (srcMatch && srcMatch[1]) {
textToCopy += srcMatch[1] + '\n'; // 添加API基础URL到src前面
const fullSrc = import.meta.env.VITE_API_BASE_URL + srcMatch[1];
textToCopy += fullSrc + '\n';
} }
} else { } else {
// 其他内容复制content // 其他内容复制content
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment