06 2020 档案
摘要:对象中的方法 methods: { onTap(){ //简写形式的 方法 }, onTap: function () { //传统形式的 方法 }, onTap: ()=>{ //箭头函数形式的 方法 }, function onTap(){ //错误,这是函数,不是方法 } } 类中的方法 cl
阅读全文
摘要:js变量类型:值类型 和 引用类型 值类型: 字符串string,数值number,布尔值boolean, null, undefined引用类型: 对象 Object,数组Array,函数Function 赋值: 值类型赋值:直接将数据复制一份进行赋值,两份数据在内存中是完全独立的 引用类型赋值:
阅读全文
摘要:类中,static方法中的this指向类本身 theme.js class Theme { themes = [] //这个themes属于对象 static async getThemes(){ const themes = [1,2,3] this.themes = themes //this指
阅读全文
摘要:小程序图片有时候下边自带间距,消除这个间距需要设置:display: flex 消除间距:display: flex;
阅读全文