随笔分类 -  js

摘要:第一步: npm install weixin-js-sdk -S // (或者直接index.html里面引入js文件 http://res.wx.qq.com/open/js/jweixin-1.6.0.js 官方文档:https://developers.weixin.qq.com/doc/o 阅读全文
posted @ 2022-03-28 16:26 一个懒惰的陈xx 阅读(514) 评论(0) 推荐(0)
摘要:@mousedown="gtouchstart(item)" // 鼠标按下事件 @mousemove="gtouchmove(item)" // 鼠标按下移动事件 @mouseup="gtouchend(item)" // 鼠标松开事件 @touchstart="gtouchstart(item) 阅读全文
posted @ 2021-10-29 16:24 一个懒惰的陈xx 阅读(914) 评论(0) 推荐(0)
摘要:var id = 1 function Ttree(tree,pid){ for(let i = 0; i<tree.length; i++){ let item = tree[i] item.id=id++ if(pid){ item.prentId=pid }else{ item.prentId 阅读全文
posted @ 2021-01-27 10:30 一个懒惰的陈xx 阅读(188) 评论(0) 推荐(0)
摘要:[ { "name": "小明", "code": "0", "children": [ { "name": "小明明1", "code": "00", "children": [ { "name": "小明明明1", "code": "000", "id": 3, "prentId&qu 阅读全文
posted @ 2021-01-27 10:28 一个懒惰的陈xx 阅读(503) 评论(0) 推荐(0)
摘要:<el-form-item label="选择批次:" prop="batchInfos" v-if="quesForm.selectMethod 1" key="batchInfos"> <el-select v-model="quesForm.batchInfos" value-key='id' 阅读全文
posted @ 2020-12-22 11:13 一个懒惰的陈xx 阅读(1406) 评论(0) 推荐(0)
摘要:1.本功能基于node,确保已安装node后执行下面步骤。 一、新建个文件夹myinit,进去后打开cmd,执行npm init初始化package.json文件 二、npm install express (cnpm install express)下载express框架 三、cnpm i 下载本 阅读全文
posted @ 2020-12-16 15:23 一个懒惰的陈xx 阅读(888) 评论(0) 推荐(0)
摘要:在子类里面调用super(),会调用基类的construction函数,如果一对象形式调用,则会调用基类对应的方法。super 表示父类的构造函数,用来创建父类的 this, super.a(),此时的super指向父类原型对象,即 A.prototype.a。 阅读全文
posted @ 2020-12-16 15:10 一个懒惰的陈xx 阅读(1752) 评论(0) 推荐(0)
摘要:<el-input type="textarea" ref="inppp" v-model="values" placeholder="请输入内容" @keydown.ctrl.83.native="(e)=>{submit(e,values)}"></el-input> submit(e,b){ 阅读全文
posted @ 2020-12-04 09:47 一个懒惰的陈xx 阅读(552) 评论(0) 推荐(0)
摘要://将Obj转为字符串Obj后再进行JSON转义 JSON.stringify(Object).replace(/\\/g,"\\\\").replace(/\"/g,"\\\""); //得到的结果: {\"id\":100200,\"codes\":\"1111\"},{\"id\":10017 阅读全文
posted @ 2019-12-26 10:39 一个懒惰的陈xx 阅读(1621) 评论(0) 推荐(0)
摘要:let newdata = JSON.parse(JSON.stringify(departmentObj).replace(/departmentId/g,"value")); 阅读全文
posted @ 2019-12-13 16:03 一个懒惰的陈xx 阅读(4036) 评论(0) 推荐(0)