随笔分类 -  H5前端

摘要:使用第三方小程序插件: https://github.com/Kujiale-Mobile/Painter 工具如何使用: https://blog.csdn.net/ygzrsno/article/details/108535954 JSON生成工具网站: https://lingxiaoyi.g 阅读全文
posted @ 2021-08-16 17:24 野鸡码农 阅读(406) 评论(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 野鸡码农 阅读(992) 评论(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 野鸡码农 阅读(2613) 评论(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 野鸡码农 阅读(4844) 评论(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 野鸡码农 阅读(1424) 评论(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 野鸡码农 阅读(275) 评论(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 野鸡码农 阅读(302) 评论(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 野鸡码农 阅读(5021) 评论(0) 推荐(0)
摘要:.parrent { display: flex; //元素设置成flex布局 flex-direction: column; //控制parrent的子元素排列方向 height: 100vh; //最外层设置为屏幕的高度100% } .son { display:flex; flex-direc 阅读全文
posted @ 2020-12-18 17:21 野鸡码农 阅读(217) 评论(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 野鸡码农 阅读(175) 评论(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 野鸡码农 阅读(1301) 评论(0) 推荐(0)
摘要:react native项目报错 attributes: Missing required attribute `homepage`. 在react native项目中运行ios环境的 pod install时报了这个错,经过一番查阅后 在github的 swagger-api/swagger-co 阅读全文
posted @ 2020-07-16 15:19 野鸡码农 阅读(538) 评论(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 野鸡码农 阅读(4169) 评论(0) 推荐(0)
摘要:在react-native项目中出现这个问题 解决办法: requestPerssion() .then(_=>{ this.initRecognizer(); }) .catch(e=>{}) 把 .catch(e=>{}) 加上就好了 阅读全文
posted @ 2020-07-13 12:04 野鸡码农 阅读(3212) 评论(0) 推荐(0)
摘要:https://www.njleonzhang.com/2018/08/30/react-native-modules.html 一,新建demo项目 1,安装环境 $ npm install -g yarn react-native-cli $ npm install -g react-nativ 阅读全文
posted @ 2020-07-10 15:18 野鸡码农 阅读(1727) 评论(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 野鸡码农 阅读(294) 评论(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 野鸡码农 阅读(776) 评论(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 野鸡码农 阅读(1738) 评论(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 野鸡码农 阅读(227) 评论(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 野鸡码农 阅读(411) 评论(0) 推荐(0)