refactor: 修改终端布局.

This commit is contained in:
lijiahangmax
2024-01-08 00:20:11 +08:00
parent 48156ebb0d
commit 918ce861d3
5 changed files with 142 additions and 37 deletions

View File

@@ -3,8 +3,11 @@ import { Message } from '@arco-design/web-vue';
export default function useCopy() {
const { isSupported, copy: c, text, copied } = useClipboard();
const copy = async (value: string, tips = `${value} 已复制`) => {
const copy = async (value: string | undefined, tips = `${value} 已复制`) => {
try {
if (!value) {
return;
}
await c(value);
if (tips) {
Message.success(tips);