1. 内容复制
/*** 复制文本框内容(仅需提供内容)* @param {string} cont 需要复制的内容*/export function copyEleText(cont) {const input = document.createElement('input')document.body.appendChild(input)input.setAttribute('value', cont)input.select()if (document.execCommand('copy')) {document.execCommand('copy')console.log('复制成功!')}document.body.removeChild(input)}
