https://developer.mozilla.org/zh-CN/docs/Web/API/Document
这是一篇mozilla 的开发者账户,里面写的很详细,包括document 和 windows 对象都提供了怎么样的方法
// 点击复制
cope_input(){
let copyHttp = this.ElementRef.nativeElement.querySelector('#invite_code');
var range = document.createRange(); //创建一个范围的对象
range.selectNode(copyHttp); //选择范围内容
window.getSelection().removeAllRanges(); //移除剪切板中其他的东西
window.getSelection().addRange(range); //把范围添加进剪切板
document.execCommand('copy'); //执行复制的命令
}