Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
水玉婷
ai-wechat
Commits
6631789f
Commit
6631789f
authored
Feb 09, 2026
by
水玉婷
Browse files
feat:iframe复制的时候添加域名
parent
41747d53
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/views/components/AiChat.vue
View file @
6631789f
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment