vtils

Home > utils > copyTextToClipboard

copyTextToClipboard() function

复制文本到剪切板。

Signature:

export declare function copyTextToClipboard(text: string, options?: CopyTextToClipboardOptions): boolean;

Parameters

Parameter Type Description
text string 要复制的文本
options CopyTextToClipboardOptions (Optional) 选项

Returns:

boolean

返回是否复制成功