摘要: 1、vue的生命周期 初始化: beforeCreate:一般没啥用,数据没挂载,DOM 没有渲染出来 created:数据已经挂载,但是 DOM 没有渲染出来,这个钩子函数里面可以做一些异步的操作,并且在这个钩子函数里面更改数据不会影响到运行时钩子函数。 beforeMounte:这个函数代表着 阅读全文
posted @ 2020-07-06 15:03 就想来看看 阅读(164) 评论(1) 推荐(0) 编辑
摘要: num.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",") 阅读全文
posted @ 2020-06-11 13:37 就想来看看 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-06-05 15:31 就想来看看 阅读(83) 评论(1) 推荐(0) 编辑
摘要: 容器属性:flex-direction;flex-wrap;flex-flow;justify-content;align-items;align-content; 阅读全文
posted @ 2020-06-05 15:29 就想来看看 阅读(141) 评论(0) 推荐(0) 编辑
摘要: https://www.jianshu.com/p/5bd47ab59bbe 主要思路:前台echarts生成图片后,获取base64码,传给后台解析,然后写入freemarker模板,进行下载。 图表生成后,使用 myChart.getDataURL("png")获取base64码,其格式为:"d 阅读全文
posted @ 2020-05-25 13:43 就想来看看 阅读(1639) 评论(0) 推荐(0) 编辑
摘要: 为元素添加on方法 Element.prototype.on = Element.prototype.addEventListener;NodeList.prototype.on = function (event, fn) {、 []['forEach'].call(this, function 阅读全文
posted @ 2020-05-25 11:15 就想来看看 阅读(179) 评论(0) 推荐(0) 编辑
摘要: filters:{ timeFilter(data) { return data.substring(0, 10).replace(/-/g,'.');//return后面的就是数据处理方法 },}, filters和data同级的 <view>提现有效期:{{ 入参| timeFilter }}- 阅读全文
posted @ 2020-05-21 14:23 就想来看看 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 先执行A在执行B再执行.then里面的AAA() { XXXXX一堆代码 this.BBB().then(()=>{ 其他代码 })},async BBB(){ let res = await this.$http({ url:, data:{ }, }) try{ //执行代码 if (res.b 阅读全文
posted @ 2020-05-19 13:52 就想来看看 阅读(173) 评论(2) 推荐(0) 编辑
摘要: functionB(){ this.functionA() } functionA(){ return new Promise((resolve, reject) => { this.$http({ url:XXXX, type:'get', data:{ }}).then(res=>{ resol 阅读全文
posted @ 2020-05-19 13:20 就想来看看 阅读(147) 评论(1) 推荐(0) 编辑
摘要: 当你利用索引直接设置一个项时,例如:vm.items[indexOfItem] = newValue当你修改数组的长度时,例如:vm.items.length = newLength 数组更新只能通过以下方法push()pop()shift()unshift()splice()sort()rever 阅读全文
posted @ 2020-05-14 15:05 就想来看看 阅读(1476) 评论(2) 推荐(0) 编辑