摘要:
<template> <div> <div> <canvas class="canvas" id="canvas" ref="canvas"></canvas> <canvas id="blank" style="display: none"></canvas> <p v-else style="f 阅读全文
摘要:
npm install clipboard --save //下载 import Clipboard from 'clipboard'//使用页面引入 js:const copyText = async () => { const text = window.location.href // 设置要 阅读全文
摘要:
<div ref="chatContent" class="count"> <ul> <li v-for="(i, index) in 20" :key="index"> <!-- 聊天内容 --> </li> </ul> </div> .count{ height: 外壳高度; overflow- 阅读全文
摘要:
<el-upload v-model:file-list="fileList" action="地址" :before-upload="Acceps" > <el-icon><Picture /></el-icon> </el-upload> const Acceps = async (file) 阅读全文
摘要:
for(var i=0; i<$(".bili-dyn-more__menu__item").length; i++) { if($(".bili-dyn-more__menu__item")[i].getAttribute("data-type") == "THREE_POINT_DELETE") 阅读全文
摘要:
window.open(url,'_blank','top=300,left=300,width=800,height=650,menubar=no,toolbar=no,status=no,scrollbars=yes' ) 阅读全文
摘要:
const arr2 = [{id: 1}, {id: 2}]; const value2 = {id: 3}; const index = arr2.findIndex(object => object.id value2.id); if (index -1) { arr2.push(value2 阅读全文
摘要:
一、查看所有键 document.onkeydown = function (event) { console.log('按下:' + event.key + '键:' + event.keyCode) } document.onkeydown = function (event) { if (ev 阅读全文
摘要:
// 随机数函数function getRandom(N,M)ireturn Math.floor(Math.random()*(M-N+1))+ N // 随机数 const random=getRandom(1,10) document.body.style.backgroundImage =` 阅读全文
摘要:
navigator.mediaDevices在目前以下三种情况下可以不报错 1. 地址为localhost:// 访问时 2. 地址为https:// 时 3. 为文件访问file:/// 阅读全文