sftp 操作日志.

This commit is contained in:
lijiahang
2024-02-23 18:20:48 +08:00
parent 471f149a04
commit f8e96a6b54
45 changed files with 442 additions and 151 deletions

View File

@@ -1,26 +1,29 @@
import { useClipboard } from '@vueuse/core';
import { Message } from '@arco-design/web-vue';
export default function useCopy() {
const { copy: c } = useClipboard();
// 复制
const copy = async (value: string | undefined, tips: string | boolean = `${value} 已复制`) => {
try {
if (!value) {
return;
}
await c(value);
if (tips) {
Message.success(tips as string);
}
} catch (e) {
Message.error('复制失败');
const { copy: c } = useClipboard();
// 复制
export const copy = async (value: string | undefined, tips: string | boolean = `${value} 已复制`) => {
try {
if (!value) {
return;
}
};
// 获取剪切板内容
const readText = () => {
return navigator.clipboard.readText();
};
await c(value);
if (tips) {
Message.success(tips as string);
}
} catch (e) {
Message.error('复制失败');
}
};
// 获取剪切板内容
export const readText = () => {
return navigator.clipboard.readText();
};
export default function useCopy() {
return {
copy,
readText,