fix(测试计划): 导出 pdf 图片加载问题修复

This commit is contained in:
baiqi 2024-10-31 11:01:12 +08:00 committed by 刘瑞斌
parent 17680ae686
commit 4c6c1e69eb
3 changed files with 8 additions and 0 deletions

View File

@ -149,6 +149,11 @@ export default function useMinderOperation(options: MinderOperationProps) {
return;
}
const state = fsm.state();
if (!navigator.clipboard && !e?.clipboardData) {
// 不支持剪贴板操作
Message.warning(t('minder.notSupportClipboard'));
return;
}
const textData = e?.clipboardData ? e.clipboardData.getData('text/plain') : await navigator.clipboard.readText();
switch (state) {
case 'input': {

View File

@ -113,5 +113,7 @@ export default {
shortcut: 'Shortcut',
shortcutTitle: 'Shortcut information',
expand: 'Expand/Collapse',
notSupportClipboard:
'Due to browser security policy restrictions, websites that are not HTTPS cannot access the clipboard. Please use keyboard shortcuts to copy/paste.',
},
};

View File

@ -107,5 +107,6 @@ export default {
shortcut: '快捷键',
shortcutTitle: '快捷键说明',
expand: '展开/收起',
notSupportClipboard: '因浏览器安全策略限制,非 HTTPS 协议的网站无法访问剪贴板,请使用快捷键复制/粘贴',
},
};