摘要:
pcompare(prop,rev) { // 第二个参数没有传递,默认升序排序 if(rev undefined) { rev = 1; }else { rev = rev ? 1: -1; } return function(obj1,obj2) { // 方括号也是访问对象属性的一种方式,优点 阅读全文
摘要:
针对这个问题,在scroll-view标签中设置属性scroll-y="{{!focusFlag}}",即当聚焦时,控制scroll-view不滚动即可解决错位问题; 阅读全文
摘要:
vue init webpack projectname 阅读全文
摘要:
/*以下代码仅供参考,如有错误还请各位指导修正*/ //简单时间格式化//使用方法 供新手参考 :// 在vue文件中 import { dateFormat } from '@/js_sdk/common.js'//let date = new Date();// dateFormat("YYYY 阅读全文
摘要:
在应用uniapp多应用开发研究中, 发现在uniapp中引用vuex时, 在h5无需computed: mapState([ state值 ]) , methods: { ...mapMutations([ mutation方法名 ]) } 定义state及mutation就可以应用; 如下图: 阅读全文
摘要:
function cloneObj (obj) { var str, newobj = obj.constructor Array ? [] : {}; if (typeof (obj) !== 'object') { return; } else { for (var i in obj) { ne 阅读全文
摘要:
const mapTag = '[object Map]';const setTag = '[object Set]';const arrayTag = '[object Array]';const objectTag = '[object Object]';const argsTag = '[ob 阅读全文
摘要:
var replace = function(str, bef, aft) { var reg = new RegExp(bef, "g"); return str.replace(reg, aft); }; 阅读全文
摘要:
这里有个坑: api返回如果格式是: ' 2020-02-20 02:02:02 '格式,则ios系统的小程序展示生成倒计时为null,把 ' - ' 替换为 ’ / ‘ 才能正常显示倒计时; replace(/\-/g, '/') countTdown: function (renderdataT 阅读全文