11 2022 档案
摘要:iswap(); function iswap() { var uA = navigator.userAgent.toLowerCase(); var ipad = uA.match(/ipad/i) == "ipad"; var iphone = uA.match(/iphone os/i) ==
阅读全文
摘要:1.使用 <rich-text class="textcontent" :nodes="content"> </rich-text> 使用类名可以直接修改文字样式 2.图片样式,使用正则添加类名 textcontent.value = data.content.replace(/\<img/gi,
阅读全文
摘要:var mynavData = JSON.stringify(that.navData); // 这里转换成 字符串 uni.navigateTo({ url:'./nav?index='+mynavData }) //新页面接收后:onLoad(options) { var data = JSON
阅读全文
摘要:<button open-type="share" v-bind:data-student="item" class="share"> 分享 </button> 指定按钮的类型open-type="share" 分享需要的信息要使用v-bind:data-student传递,这里student是自己
阅读全文
摘要:box-shadow: 0 0 10px rgba(0, 0, 0, .2);
阅读全文
摘要:uni.makePhoneCall({ phoneNumber:'123456789', success:function(){ console.log('成功'); }, fail() { console.log('拨打失败'); } })
阅读全文
摘要:uni.openLocation({ latitude: 28.135568855795345,//纬度 longitude:106.0402866322937,//经度 name: "四渡赤水博物馆", address: "四川省泸州市古蔺县太平镇" });
阅读全文
摘要:// 计算两组经纬度之间距离const GetDistance=( lat1, lng1, lat2, lng2)=>{ var radLat1 = lat1*Math.PI / 180.0; var radLat2 = lat2*Math.PI / 180.0; var a = radLat1 -
阅读全文
摘要:uni.getLocation({ type: 'wgs84', geocode:true,//设置该参数为true可直接获取经纬度及城市信息 success: function (res) { num.value=parseInt(GetDistance(res.latitude,res.long
阅读全文
摘要:width:100px; height:40px;/*需要展示行高度*/ display: -webkit-box; /* 必须结合的属性 ,将对象作为弹性伸缩盒子模型显示 。*/ -webkit-box-orient: vertical; /* 必须结合的属性 ,设置或检索伸缩盒对象的子元素的排列
阅读全文
摘要:1.mode="aspectFill" 保持图片宽高比例不变 用法 <image class="image" lazy-load :src="item.image" mode="aspectFill"></image> lazy-load 懒加载
阅读全文