添加 主机列表页面.

This commit is contained in:
lijiahang
2023-09-11 16:33:57 +08:00
parent a398be9148
commit 23d9063ea4
10 changed files with 639 additions and 3 deletions

View File

@@ -0,0 +1,24 @@
import { useClipboard } from '@vueuse/core';
import { Message } from '@arco-design/web-vue';
export default function useCopy() {
const { isSupported, copy: c, text, copied } = useClipboard();
const copy = (value: string, tips = `${value} 已复制`) => {
return c(value)
.then(() => {
if (tips) {
Message.success(tips);
}
}).catch(() => {
Message.error('复制失败');
});
};
return {
isSupported,
copy,
text,
copied
};
}