随笔分类 -  H5前端 / JavaScript

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

点击右上角即可分享
微信分享提示