[置顶] iOS兼容性(不断完善)

摘要: 1、iOs不支持iframe,不支持flash,如果移动端要嵌入视频,请用html5 的video标签。 2、dom对象位于最底部(或底部的对象position为absolute或fixed),margin-bottom无效,解决办法:改成 padding-bottom 3、js日期转换问题,如果日 阅读全文

posted @ 2018-10-19 17:22 阿提 阅读(387) 评论(0) 推荐(0) 编辑

2023年1月14日

vue2项目,node-sass 升级到 sass(dart-sass),解决sass2.0 不支持除法

摘要: 1.package.json里删除这一行: "node-sass": "^4.14.1", 或是npm uninstall node-sass 2.安装sass npm install sass --D 3. /deep/ 替换成 ::v-deep 全局查找替换即可。 4. sass 不支持除法运算 阅读全文

posted @ 2023-01-14 10:39 阿提 阅读(761) 评论(0) 推荐(0) 编辑

2022年11月15日

解决.eslintignore不生效问题

摘要: vue3+typescript项目,在@type下配置了类型申明,在.eslintignore文件里配置了 /node_modules/src/@types/dist/public/package-lock.json.DS_Storevite.config.ts 但是运行npm run lint时, 阅读全文

posted @ 2022-11-15 17:11 阿提 阅读(2978) 评论(0) 推荐(0) 编辑

2022年10月26日

解决warning: LF will be replaced by CRLF in .eslintrc.cjs.

摘要: 在命令行下执行一下这行代码:git config --global core.autocrlf false 这样以后,就不会在上传时老是提示这行了:warning: LF will be replaced by CRLF in .eslintrc.cjs. 阅读全文

posted @ 2022-10-26 09:04 阿提 阅读(48) 评论(0) 推荐(0) 编辑

2022年9月29日

scss文件不能添加行内注释的问题 postcss-import: Unknown word

摘要: 解决问题: 安装postcss-scss npm i postcss-scss --save-dev 打开根目录下postcss.config.js(如果没有这个文件创建即可) module.exports = { parser: "postcss-scss",/** 重点是加入这一行 */ }; 阅读全文

posted @ 2022-09-29 16:49 阿提 阅读(844) 评论(0) 推荐(0) 编辑

2022年6月22日

vite vue3 + typescript 错误解决Unexpected error when starting the router: ReferenceError: Cannot access 'index' before initialization

摘要: 为了不浪费大家宝贵时间,可以直接看文尾解决方法。 这个错误报出来提示是路由问题,三个前端一起找问题,同事找到报错的vue文件,把如下代码: import index from "./index"; export default index; 改成 import index from "./index 阅读全文

posted @ 2022-06-22 11:02 阿提 阅读(6979) 评论(0) 推荐(0) 编辑

2022年4月6日

node-gyp@8.3.0报错问题解决

摘要: npm WARN deprecated htmlnano@2.0.1: This version has been deprecated because it contains a critical bug. Until it's fixed it's better to use 2.0.0npm 阅读全文

posted @ 2022-04-06 11:46 阿提 阅读(2905) 评论(0) 推荐(0) 编辑

2022年3月17日

原生JS 根据浏览器头判断是否移动端,根据屏幕分辨率判断是否是手机

摘要: function isMobile() { var mobile_flag = false; // 根据浏览器头判断是否移动端 if (/Android|iPhone|SymbianOS|Windows Phone|iPad|iPod/.test(navigator.userAgent)) { mo 阅读全文

posted @ 2022-03-17 09:17 阿提 阅读(396) 评论(0) 推荐(0) 编辑

2021年7月19日

ios 不支持background-attachment:local 和fixed

摘要: ios 5-12.1是支持的,之后不支持了。 解决方案: 把元素设置为相对定位。添加伪元素设置背景图解决(scss)。 .body { position: relative; width: 30rem; &::before { content: " "; position: absolute; wi 阅读全文

posted @ 2021-07-19 17:37 阿提 阅读(147) 评论(0) 推荐(0) 编辑

2021年5月27日

VUE自定义指令,使textarea自动增高。

摘要: 编写一个全局指令 function autoHeight(elem) { elem.style.height = "auto"; elem.scrollTop = 0; // 防抖动 elem.style.height = elem.scrollHeight + "px"; } export def 阅读全文

posted @ 2021-05-27 14:41 阿提 阅读(389) 评论(0) 推荐(0) 编辑

2021年4月27日

vue项目调用百度地图接口获取当前用户经纬度

摘要: // 从百度地图接口获取经纬度 getPosition2(callback) { let url = `//api.map.baidu.com/api?v=2.0&ak=${this.$config.resource.baiduAk}` this.$utils.jsonp.get(url).then 阅读全文

posted @ 2021-04-27 15:30 阿提 阅读(1024) 评论(0) 推荐(0) 编辑

导航