perf: 聊天页优化

perf: md解析样式

perf: ui调整

perf: 懒加载和动态加载优化

perf: 去除console,

perf: 图片cdn

feat: 图片地址

perf: 登录顺序

feat: 流优化
This commit is contained in:
Archer
2023-03-09 20:44:13 +08:00
parent 2390823282
commit 17364e9da3
47 changed files with 1384 additions and 852 deletions

View File

@@ -8,19 +8,25 @@ export const useCopyData = () => {
const { toast } = useToast();
return {
copyData: (data: string, title: string = '复制成功') => {
const clipboardObj = navigator.clipboard;
clipboardObj
.writeText(data)
.then(() => {
toast({
title,
status: 'success',
duration: 1000
});
})
.catch((err) => {
console.log(err);
try {
const textarea = document.createElement('textarea');
textarea.value = data;
document.body.appendChild(textarea);
textarea.select();
document.execCommand('copy');
document.body.removeChild(textarea);
toast({
title,
status: 'success',
duration: 1000
});
} catch (error) {
console.error(error);
toast({
title: '复制失败',
status: 'error'
});
}
}
};
};