Browse Source

fix(bug): copy bug

master
break-wave 5 years ago
parent
commit
2bcbab9a9f
  1. 7
      src/controllers/selection.js

7
src/controllers/selection.js

@ -440,7 +440,7 @@ const selection = {
}
if(c_value == null){
c_value = " ";
c_value = "";
}
column += c_value;
@ -500,7 +500,7 @@ const selection = {
}
column = replaceHtml(column, {"style": style, "span": ""});
column += " ";
column += "";
}
column += '</td>';
@ -527,9 +527,10 @@ const selection = {
// }, 10);
var oInput = document.createElement('input');
oInput.setAttribute('readonly', 'readonly');
oInput.value = cpdata;
document.body.appendChild(oInput);
oInput.select(); // 选择对象
oInput.setSelectionRange(0, cpdata.length);
document.execCommand("Copy");
oInput.style.display='none';
document.body.removeChild(oInput);

Loading…
Cancel
Save