摘要: var u = navigator.userAgent; var ua = u.toLowerCase(); if (/iphone|ipad|ipod/.test(ua)) { // iOS 系统 -> 跳AppStore下载地址 //alert("iOS"); } else ... 阅读全文
posted @ 2019-08-02 20:05 一只螺 阅读(2964) 评论(0) 推荐(0)
摘要: var broser = window.navigator.userAgent.toLowerCase(); //通过正则表达式匹配broser 中是否含有MicroMessenger字符串 if(broser .match(/MicroMessenger/i) == 'micromessenger'){ console.log('微信浏览器') } 阅读全文
posted @ 2019-08-02 20:02 一只螺 阅读(1238) 评论(0) 推荐(0)
摘要: 1、html 2、JavaScript // 获取高度值 (内容高+padding+边框) let height= this.$refs.getheight.offsetHeight; // 获取元素样式值 (存在单位) let height = window.getComputedStyle(this.$refs.getheight).height; //获取元素内联样式值(非内... 阅读全文
posted @ 2019-08-02 10:14 一只螺 阅读(14389) 评论(0) 推荐(0)
摘要: // 单行 overflow:hidden; /*超出宽度部分的隐藏*/ white-space:nowrap; /*文字不换行*/ text-overflow:ellipsis; /*超出则...代替*/ // 多行 text-overflow: -o-ellipsis-lastline; /*两行后超出省略*/ overflow: hidden; text-overflow: ellips... 阅读全文
posted @ 2019-08-02 09:56 一只螺 阅读(371) 评论(0) 推荐(0)
摘要: onReady() { let buttons = '按钮' //buttons = '\ue670' 如果是字体图标需要引入ttf文件 // #ifdef APP-PLUS var currentWebview = this.$mp.page.$getAppWebview(); console.log(currentWebview) var t... 阅读全文
posted @ 2019-08-02 09:53 一只螺 阅读(9445) 评论(0) 推荐(0)
摘要: uni.getSystemInfo({ success: function(res) { // res - 各种参数 console.log(res.windowWidth); // 屏幕的宽度 let info = uni.createSelectorQuery().select(".类名"); 阅读全文
posted @ 2019-08-02 09:50 一只螺 阅读(46212) 评论(6) 推荐(2)