diff --git a/src/composable/copy.ts b/src/composable/copy.ts index c7819501..dcaed848 100644 --- a/src/composable/copy.ts +++ b/src/composable/copy.ts @@ -7,7 +7,13 @@ export function useCopy({ source, text = 'Copied to the clipboard' }: { source?: return { async copy(content?: string, { notificationMessage }: { notificationMessage?: string } = {}) { - await copy(content); + if (source) { + await copy(); + } + else { + await copy(content); + } + message.success(notificationMessage ?? text); }, };