// 点击复制
/**
* 浏览器兼容性测试:google,QQ,360,搜狗,火狐,Edge,opera,双核,UC,浏览器兼容模式除外(未测)
*/
export const copy = (text:string) => {
const input = document.createElement('input');
document.body.appendChild(input);
input.setAttribute('value', text);
input.select();
if (document.execCommand('copy')) {
document.execCommand('copy');
message.success('已复制')
} else {
message.success('复制失败')
}
document.body.removeChild(input);
}