JavaScript异步剪贴板 API
在过去我们只能使用 document.execCommand 来操作剪贴板。不过,这种操作剪贴板的操作是同步的,并且只能读取和写入 DOM。现在 Chrome 已经支持了新的 Async Clipboard API,作为 execCommand 替代品。这个新的 Async Clipboard API 还可以使用 Promise 来简化剪贴板事件并将它们与 Drag-&-Drop API
在过去我们只能使用 document.execCommand 来操作剪贴板。不过,这种操作剪贴板的操作是同步的,并且只能读取和写入 DOM。现在 Chrome 已经支持了新的 Async Clipboard API,作为 execCommand 替代品。这个新的 Async Clipboard API 还可以使用 Promise 来简化剪贴板事件并将它们与 Drag-&-Drop API
库名用处Share This分享库selection匡选库
取出file类型文件执行如下异步操作function getBase64(file) { return new Promise((resolve, reject) => { const reader = new FileReader(); reader.readAsDataURL(file); reader.onload = () => resolve(re
When specified, "proxy" in package.json must be a string. Instead, the type of "proxy" was "object". Either remove "proxy" from package.json, or make it a strin
自动格式化代码Prettier是一个自以为是的代码格式化程序,支持JavaScript,CSS和JSON。 使用Prettier,可以自动格式化您编写的代码,以确保项目中的代码样式。 Prettier's GitHub page , page to see it in action.每当我们在git中提交时都要格式化您的代码, 我们需要安装以下依赖项:npm install --save hus