15 lines
250 B
JavaScript
15 lines
250 B
JavaScript
|
|
export async function copyTextToClipboard(text) {
|
|
try {
|
|
await navigator.clipboard.writeText(text);
|
|
return true;
|
|
} catch (err) {
|
|
console.error('复制失败:', err);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
export function show(message) {
|
|
alert(message);
|
|
} |