html <div onclick="sizeChange('minus')" class="{{userSetting.sizeMode=='minus'?'selects-bgcolor':'border-circular'}}" > private userSetting: { fontsize: 40, bgColor: '#fff', color: '#333', sizeMode: null //fontFamily: 'default' }, let getuserSetting = await $util.getstorage('setuserSetting') this.userSetting.sizeMode = getuserSetting.sizeMode async sizeChange(type) { //修改字体大小 //if (type === 'plus') this.fontsize++ // else this.fontsize-- // this.sizeMode=type; //await $util.setstorage('setfontsize',this.fontsize); if (type === 'plus') this.userSetting.fontsize++ else this.userSetting.fontsize-- this.userSetting.sizeMode = type //console.log(this.userSetting.fontsize,"字体大小"); await $util.setstorage('setuserSetting', this.userSetting) }, |