随笔分类 -  es6

摘要:function request({ url, data, method }) { uni.showLoading({ title: '加载中...' }); return new Promise((resolve, reject) => { // alert('token',getLocalSto 阅读全文
posted @ 2021-12-15 17:09 abcByme 阅读(135) 评论(0) 推荐(0) 编辑
摘要:来自 :https://blog.csdn.net/qq_37041819/article/details/116597572 侵删 1.引入element-ui upload组件 <el-upload class="avatar-uploader" :headers="myHeaders" :ac 阅读全文
posted @ 2021-12-13 17:06 abcByme 阅读(1265) 评论(1) 推荐(0) 编辑
摘要:<template> <div class="department-container"> <p>栏目管理</p> <div style="display: flex; margin: 10px 0"> <Button type="primary" @click="addNew">新增栏目</But 阅读全文
posted @ 2021-12-13 17:00 abcByme 阅读(165) 评论(0) 推荐(0) 编辑
摘要:来自:https://www.cnblogs.com/niexianda/p/14482157.html 侵删 先看结果 结果 [ { "id": 1, "title": "张三", "parent_id": -1, "childs": [ { "id": 2, "title": "张小二", "p 阅读全文
posted @ 2021-12-13 10:46 abcByme 阅读(1548) 评论(2) 推荐(0) 编辑
摘要:<FormItem :label="item.name" prop="" v-for="(item, index) in Listnew" class="newformItem" > <Input v-model="item.value" style="width: 340px" type="tex 阅读全文
posted @ 2021-10-28 17:25 abcByme 阅读(97) 评论(0) 推荐(0) 编辑
摘要:组件中: getTypes('EP_TYPE').then((data) => {console.log('data',data)});//成功 阅读全文
posted @ 2018-11-07 16:48 abcByme 阅读(2496) 评论(0) 推荐(0) 编辑
摘要:解决方案 可以安装整个stage2的预置器或者安装 Object Rest Operator 的babel插件 babel-plugin-transform-object-rest-spread 。 接着在babel的配置文件 .babelrc 中应用插件: { "presets": [ ["es2 阅读全文
posted @ 2018-10-19 20:46 abcByme 阅读(693) 评论(0) 推荐(0) 编辑
摘要:删除 阅读全文
posted @ 2018-10-11 16:58 abcByme 阅读(1282) 评论(0) 推荐(0) 编辑
摘要://先定义一个某数值范围内的随机数 // 克隆数组方法 //洗牌 //调用 阅读全文
posted @ 2018-09-12 10:43 abcByme 阅读(1232) 评论(0) 推荐(0) 编辑
摘要:function format(interval){ if (!value) return '' let interval = Math.floor(value) let minute = (Math.floor(interval / 60)).toString().padStart(2, '0') 阅读全文
posted @ 2018-09-11 10:07 abcByme 阅读(1316) 评论(0) 推荐(0) 编辑
摘要://调用 const transform = prefixStyle('transform') const backdrop = prefixStyle('backdrop-filter') div.style[transform] = `translate3d(0,0,0)` 等同于 div.st 阅读全文
posted @ 2018-09-07 15:51 abcByme 阅读(1113) 评论(0) 推荐(0) 编辑
摘要:来自 https://www.cnblogs.com/lhl66/p/9555903.html 侵删 来自 https://www.cnblogs.com/lhl66/p/8862106.html 侵删 1. let, const 都是块级作用域, 其有效范围仅在代码块中。 //es5 if (a == 1) { var b = 'xxx'; } console.log(b); ... 阅读全文
posted @ 2018-09-05 16:20 abcByme 阅读(1291) 评论(0) 推荐(0) 编辑
摘要:addClass(元素, 'item-类名') 阅读全文
posted @ 2018-08-30 09:18 abcByme 阅读(3435) 评论(0) 推荐(1) 编辑
摘要:译者:动静若参商 译文:http://www.zcfy.cc/article/1795 原文:https://davidwalsh.name/es6-features JavaScript社区中的每个人都喜欢新API、新语法和新特性——可以更优雅,更智能,更有效的完成重要任务。ES6带来了很多好东西 阅读全文
posted @ 2017-12-26 11:31 abcByme 阅读(301) 评论(0) 推荐(0) 编辑
摘要:// import Lesson17 from './class/lesson17';// console.log(Lesson17.A); //123 阅读全文
posted @ 2017-11-01 13:58 abcByme 阅读(772) 评论(0) 推荐(0) 编辑
摘要:修饰器是一个函数,用来修改类的行为(注意:1、函数 2、修改行为 3、对类进行操作){ //修饰器函数定义 target:类本身,name名称,descriptor描述 let readonly = function(target, name, descriptor) { descriptor.writable = false; //只读 re... 阅读全文
posted @ 2017-11-01 13:38 abcByme 阅读(378) 评论(0) 推荐(0) 编辑
摘要:{ // 长轮询 let ajax=function* (){ yield new Promise(function(resolve,reject){ setTimeout(function () { resolve({code:0}) }, 200); }) } let pull=function(){ le... 阅读全文
posted @ 2017-10-31 21:05 abcByme 阅读(310) 评论(0) 推荐(0) 编辑
摘要:Iterator遍历器 遍历器(Iterator)就是这样一种机制。它是一种接口,为各种不同的数据结构提供统一的访问机制。任何数据结构只要部署Iterator接口,就可以完成遍历操作(即依次处理该数据结构的所有成员)。 作用: 为各种数据结构,提供一个统一的、简便的访问接口 使得数据结构的成员能够按 阅读全文
posted @ 2017-10-24 19:55 abcByme 阅读(541) 评论(0) 推荐(0) 编辑
摘要:{ // 基本定义 let ajax = function(callback) { console.log('执行'); //先输出 1 执行 setTimeout(function() { callback && callback.call() }, 1000); }; ajax(funct... 阅读全文
posted @ 2017-10-23 20:48 abcByme 阅读(439) 评论(0) 推荐(0) 编辑
摘要:{ // 基本定义和生成实例 class Parent{ constructor(name='mukewang'){ this.name=name; } } let v_parent1=new Parent(); let v_parent2=new Parent('v'); console.log('构造函数和实例',v_parent1,v_p... 阅读全文
posted @ 2017-10-23 19:52 abcByme 阅读(511) 评论(0) 推荐(0) 编辑

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