- 博客(5)
- 收藏
- 关注
原创 二维码生成
1.引入js文件<script src="../js/jquery-1.10.2.min.js"></script><script src="../js/jquery.qrcode.min.js"></script>js文件下载地址 =》 戳我2.创建一个放二维码的dom<div id="qrcode">3.生成二维码$(function (){ $('#qrcode').qrcode({ render
2021-05-10 17:34:04
319911
转载 扁平化数据转化为树结构
扁平化数据转化为树结构function toTree({arrayList, pidStr = 'pid', idStr = 'id', childrenStr = 'children'}) { let listOjb = {}; // 用来储存{key: obj}格式的对象 let treeList = []; // 用来储存最终树形结构数据的数组 // 将数据变换成{key: obj}格式,方便下面处理数据 for (let i = 0; i < arrayLis
2021-04-14 10:36:52
321897
原创 js继承实现方法
父类function Animal (name = 'animal') { //实例方法和属性 this.name = name; this.age = '30'; this.PrintAge = function () { console.log(this.age) } }; //原型方法 Animal.prototype.PrintName = function () {console.log(this.name)};原型链继承funct
2021-04-13 19:07:38
321719
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅
3