mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-06 06:17:11 -04:00
🔧:build SSR dist and deploy
This commit is contained in:
parent
76c26901d7
commit
c59ad6aedb
465 changed files with 214127 additions and 2 deletions
26
dist/server/chunks/chunk-77c5cc16.js
vendored
Normal file
26
dist/server/chunks/chunk-77c5cc16.js
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
import { useClipboard } from '@vueuse/core';
|
||||
import { useMessage } from 'naive-ui';
|
||||
|
||||
function useCopy({ source, text = "Copied to the clipboard", createToast = true } = {}) {
|
||||
const { copy, copied, ...rest } = useClipboard({
|
||||
source,
|
||||
legacy: true
|
||||
});
|
||||
const message = useMessage();
|
||||
return {
|
||||
...rest,
|
||||
isJustCopied: copied,
|
||||
async copy(content, { notificationMessage } = {}) {
|
||||
if (source) {
|
||||
await copy();
|
||||
} else {
|
||||
await copy(content);
|
||||
}
|
||||
if (createToast) {
|
||||
message.success(notificationMessage ?? text);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export { useCopy as u };
|
Loading…
Add table
Add a link
Reference in a new issue