随笔分类 - H5前端 / JavaScript
摘要:使用第三方小程序插件: https://github.com/Kujiale-Mobile/Painter 工具如何使用: https://blog.csdn.net/ygzrsno/article/details/108535954 JSON生成工具网站: https://lingxiaoyi.g
阅读全文
摘要:https://blog.csdn.net/gaopinqiang/article/details/107328936 前端JS代码: apply(){ let data = new FormData(); // todo 非常重要,一定要加file.raw,从浏览器中查看需要使用binary类型,
阅读全文
摘要:转自:https://blog.csdn.net/Angel_jn/article/details/108059927 (前端 XMLHttpRequest 实现下载excel文件) const xhr = new XMLHttpRequest(); xhr.open('get', 'http://
阅读全文
摘要:现象: "JSON parse error: Unrecognized token 'form': was expecting 'null', 'true', 'false' or NaN; nested exception is com.fasterxml.jackson.core.JsonPar
阅读全文
摘要:<template> <div class="my-class"> <div class="title"> 我的班级 </div> <div class="all-class" v-if="!HasNoClass"> <el-row :gutter="17"> <transition-group a
阅读全文
摘要:"vue": "^2.6.11",第一种方式:如果事件绑定的标签为原生H5标签不用.native修饰,如果事件绑定的标签为Vue组件那么click得用native修饰。 <div v-on:click="handle0"> <button @click.stop="handle1">点击1</but
阅读全文
摘要:1,普通的网页中: // 设置默认图片 <img src="http://res.spreadwin.com/gmc38PE.jpg" alt="" onerror="this.src='images/default.png';this.onerror=null"> this.onerror=nul
阅读全文
摘要:<div class="up"> <img class="bg" src="bg.png"/> </div> .up{ width: 100%; height: 100%; position: relative; display: flex; /*justify-content: center;*/
阅读全文
摘要:.parrent { display: flex; //元素设置成flex布局 flex-direction: column; //控制parrent的子元素排列方向 height: 100vh; //最外层设置为屏幕的高度100% } .son { display:flex; flex-direc
阅读全文
摘要:效果:删除按钮在背景图的上层 <div class="parrent"> <img class="parrent_img"/> //背景图 <img class="parrent_dele" src="../img/delete.png"/> //删除按钮 </div> CSS: .parrent
阅读全文
摘要:https://www.jianshu.com/p/edce7af3691a 目录结构: 1、初始化node项目 在命令行输入:npm init 2、安装express 在命令行输入:npm install express 3、然后创建server.js文件 const express = requ
阅读全文
摘要:var test = (some)=>{ return new Promise((resolve,reject)=>{ if(some == 0){ resolve('执行了第1个') } console.log('第二步'); if(some == 2){ reject('执行了第3个') } c
阅读全文
摘要:在react-native项目中出现这个问题 解决办法: requestPerssion() .then(_=>{ this.initRecognizer(); }) .catch(e=>{}) 把 .catch(e=>{}) 加上就好了
阅读全文
摘要:_hexToRgb (hex) { const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); return result ? { r: parseInt(result[1], 16), g: parseInt(resu
阅读全文
摘要:parseDom(arg) { var objE = document.createElement("div"); objE.innerHTML = arg; return objE.childNodes; }; React框架中使用: 第一种: <div className={styles.bod
阅读全文
摘要:$sliderIndex : 100; .sliderShowing{ animation: openAnim 0.5s linear; width: $leftAreaWidth; height: 100%; background-color: transparent; display: flex
阅读全文
摘要:把下列样式添加到div中,则div中的所有子元素,则不会被选中. 参考: https://www.cnblogs.com/wyhlightstar/p/6542295.html .div{ -moz-user-select:none;/*火狐*/ -webkit-user-select:none;/
阅读全文
摘要:http://www.jq22.com/webqd4172 .imgBox { width:200px; height:200px; overflow:hidden; } .imgBox img { width:200px; height:200px; transition:all .4s; -mo
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> .home { width: 100%; height: 100px } .son{ height: 50px; w
阅读全文