feat: 优化仪表盘界面样式和交互细节

This commit is contained in:
Ray.Hao
2026-02-24 09:28:34 +08:00
parent eb4c4b7462
commit c617d2943f
8 changed files with 152 additions and 125 deletions

View File

@@ -31,9 +31,8 @@ function handleClipboard() {
() => {
ElMessage.success("Copy successfully");
},
(error) => {
() => {
ElMessage.warning("Copy failed");
console.log("[CopyButton] Copy failed", error);
}
);
} else {
@@ -44,18 +43,17 @@ function handleClipboard() {
input.setAttribute("value", props.text);
document.body.appendChild(input);
input.select();
let successful = false;
try {
successful = document.execCommand("copy");
const successful = document.execCommand("copy");
if (successful) {
ElMessage.success("Copy successfully!");
} else {
ElMessage.warning("Copy failed!");
}
} finally {
document.body.removeChild(input);
}
if (successful) {
ElMessage.success("Copy successfully!");
} else {
ElMessage.warning("Copy failed!");
}
}
}
</script>