摘要: 1 2 3 4 5 6 25 阅读全文
posted @ 2018-10-22 13:59 杏杏子 阅读(4841) 评论(0) 推荐(2) 编辑
摘要: let string = 'hello'; let strings = string; console.log(string + ' ' + strings) //hello hello console.log('hello'+ 'hello') //hellohello 总结:要拼接的内容用引号即 阅读全文
posted @ 2018-10-09 09:10 杏杏子 阅读(94) 评论(0) 推荐(0) 编辑
摘要: Document 阅读全文
posted @ 2018-08-17 11:03 杏杏子 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 待付款 待发货 待收货 已完成 ... 阅读全文
posted @ 2018-07-04 15:08 杏杏子 阅读(459) 评论(0) 推荐(0) 编辑
摘要: 注意:这段代码不在created里面,也不在methods里面,是单独的。因个人项目原因价格返回需要除以100,所以引用此代码需要根据实际来处理即可。 filters: { filterRmb(val) { return "¥" + (val / 100).toFixed(2); } },//如何使用此代码,例: {{orderDe... 阅读全文
posted @ 2018-07-04 11:38 杏杏子 阅读(361) 评论(0) 推荐(0) 编辑
摘要: 获取当前时间 let datatime = new Date() console.log(datatime) 打印结果:Wed Jul 04 2018 11:10:04 GMT+0800 (中国标准时间) 转换时间格式(其中一种) let datatimes = new Date().getTime() console.log(datatimes) 打印结果:1530673985063 ... 阅读全文
posted @ 2018-07-04 11:29 杏杏子 阅读(191) 评论(0) 推荐(0) 编辑
摘要: let url = window.location.href; // 动态获取当前url // 例: "http://i.cnblogs.com/henanyundian/web/app/#/store?userId=12345678&productId=1234567&shopId=1234567&roleId=1"; let ob... 阅读全文
posted @ 2018-07-04 11:08 杏杏子 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 1,使用mint-ui框架中,在组件中加入 lockScroll="true" 阻止父页面不滑动。 2,原生弹框中,弹框页面中最外层div里面加(touchmove事件)@touchmove="handleTouchmove" 然后在methods方法里面加入 handleTouchmove (e) { e.preventDefault() }, 阻止父页面不滑动 ... 阅读全文
posted @ 2018-07-04 10:51 杏杏子 阅读(152) 评论(0) 推荐(0) 编辑
摘要: ps:初入Vue坑的小伙伴们,对于独立做一个项目可能不清楚需要使用哪些资源,这篇随笔希望对大家有所帮助。 第一步:参照vue的官方文档,建立一个vue的项目 第二步:一般需要安装的资源(如果项目对资源版本没有要求的话,一般下载的资源都是最新的哟) "axios": "接口请求", "babel-po 阅读全文
posted @ 2018-05-08 22:23 杏杏子 阅读(404) 评论(0) 推荐(0) 编辑
摘要: JS:// 数组从小到大排序 var a = [9, 2, 33, 66, 55, 56, 34, 1, 91, 88]; for (var i = 0; i a[j]) { let tem = a[i] a[i] = a[j]; a[j] = tem; } ... 阅读全文
posted @ 2018-05-02 11:14 杏杏子 阅读(118) 评论(0) 推荐(0) 编辑