case "onDoubleClickCapture":
if(a.elementType=='div'){
if(a.memoizedProps.className=="text_container"){
var div=a.return.child.return.stateNode;
//console.log(div.innerText);
var selection = window.getSelection();
var range = document.createRange();
range.selectNodeContents(div);
selection.removeAllRanges();
selection.addRange(range);
document.execCommand("Copy");
}
}
原创文章,作者:何故,如若转载,请注明出处:https://www.htm5.cn/1463.html