会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
shuhan-hou
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
下一页
2022年11月29日
js判断访问设备
摘要: iswap(); function iswap() { var uA = navigator.userAgent.toLowerCase(); var ipad = uA.match(/ipad/i) == "ipad"; var iphone = uA.match(/iphone os/i) ==
阅读全文
posted @ 2022-11-29 14:29 干红
阅读(53)
评论(0)
推荐(0)
2022年11月18日
小程序富文本使用及样式修改
摘要: 1.使用 <rich-text class="textcontent" :nodes="content"> </rich-text> 使用类名可以直接修改文字样式 2.图片样式,使用正则添加类名 textcontent.value = data.content.replace(/\<img/gi,
阅读全文
posted @ 2022-11-18 09:52 干红
阅读(1345)
评论(0)
推荐(0)
2022年11月14日
uniapp跳转传参
摘要: var mynavData = JSON.stringify(that.navData); // 这里转换成 字符串 uni.navigateTo({ url:'./nav?index='+mynavData }) //新页面接收后:onLoad(options) { var data = JSON
阅读全文
posted @ 2022-11-14 16:32 干红
阅读(69)
评论(0)
推荐(0)
uniapp 微信小程序分享页面
摘要: <button open-type="share" v-bind:data-student="item" class="share"> 分享 </button> 指定按钮的类型open-type="share" 分享需要的信息要使用v-bind:data-student传递,这里student是自己
阅读全文
posted @ 2022-11-14 10:48 干红
阅读(621)
评论(0)
推荐(0)
2022年11月10日
css 中实现四周阴影
摘要: box-shadow: 0 0 10px rgba(0, 0, 0, .2);
阅读全文
posted @ 2022-11-10 14:16 干红
阅读(62)
评论(0)
推荐(0)
2022年11月8日
uniapp跳转拨号界面
摘要: uni.makePhoneCall({ phoneNumber:'123456789', success:function(){ console.log('成功'); }, fail() { console.log('拨打失败'); } })
阅读全文
posted @ 2022-11-08 17:06 干红
阅读(384)
评论(0)
推荐(0)
uniapp导航到某经纬度
摘要: uni.openLocation({ latitude: 28.135568855795345,//纬度 longitude:106.0402866322937,//经度 name: "四渡赤水博物馆", address: "四川省泸州市古蔺县太平镇" });
阅读全文
posted @ 2022-11-08 17:04 干红
阅读(80)
评论(0)
推荐(0)
uniapp计算两组经纬度之间距离
摘要: // 计算两组经纬度之间距离const GetDistance=( lat1, lng1, lat2, lng2)=>{ var radLat1 = lat1*Math.PI / 180.0; var radLat2 = lat2*Math.PI / 180.0; var a = radLat1 -
阅读全文
posted @ 2022-11-08 17:03 干红
阅读(1527)
评论(0)
推荐(0)
uniapp 获取当前位置
摘要: uni.getLocation({ type: 'wgs84', geocode:true,//设置该参数为true可直接获取经纬度及城市信息 success: function (res) { num.value=parseInt(GetDistance(res.latitude,res.long
阅读全文
posted @ 2022-11-08 17:03 干红
阅读(291)
评论(0)
推荐(0)
2022年11月3日
多行文本显示省略号
摘要: width:100px; height:40px;/*需要展示行高度*/ display: -webkit-box; /* 必须结合的属性 ,将对象作为弹性伸缩盒子模型显示 。*/ -webkit-box-orient: vertical; /* 必须结合的属性 ,设置或检索伸缩盒对象的子元素的排列
阅读全文
posted @ 2022-11-03 17:19 干红
阅读(29)
评论(0)
推荐(0)
上一页
1
2
3
4
下一页
公告