摘要: 有的页面是整屏显示的,需要高度撑满来适配,一般设计稿的尺寸是360*800 * 适配规则: - 横屏时(宽度 > 高度),按高度撑满适配:1rem = 屏幕高度 / 100 - 竖屏时: - 当屏幕高度 >= 800px 时,按高度撑满适配:1rem = 屏幕高度 / 100 - 当屏幕高度 < 8 阅读全文
posted @ 2025-12-02 15:21 chicidol 阅读(3) 评论(0) 推荐(0)
摘要: 聚焦时,使页面自动滚动到中间 <input type="text" @focus="handleFoucs" /> methods: { handleFoucs (event) { setTimeout(() => { event.target.scrollIntoView({ behavior: 阅读全文
posted @ 2025-04-07 11:19 chicidol 阅读(8) 评论(0) 推荐(0)
摘要: babel 配置问题 //babel.config.js module.exports = { presets: [ ["@vue/cli-plugin-babel/preset", { useBuiltIns: 'usage', corejs: 3, targets: { android: '6' 阅读全文
posted @ 2025-03-13 16:00 chicidol 阅读(40) 评论(0) 推荐(0)
摘要: 当 Node.js 版本升级后出现项目报错,可以按以下步骤处理: 清理项目依赖和缓存: # 删除 node_modules 和 package-lock.json rm -rf node_modules rm package-lock.json # 清除 npm 缓存 npm cache clean 阅读全文
posted @ 2025-02-27 10:15 chicidol 阅读(153) 评论(0) 推荐(0)
摘要: 一、简介在实际的开发中可能会遇到不同项目的 node 版本不同,而出现的兼容性问题。 nvm 可以很好的解决这个问题,它可以在同一台机器上管理多个 node 版本,使程序员可以轻松地安装、卸载和切换不同的 node 版本。 在下载和配置 nvm 前,需要在控制面板中先删除自己本地的 node,不然会 阅读全文
posted @ 2025-02-26 19:08 chicidol 阅读(4124) 评论(0) 推荐(1)
摘要: 文件名:.npmrc 文件内容:registry=https://registry.npmmirror.com 把.npmrc这个文件放在根目录下,再运行npm install,就会变得很快,安装完可以再删掉 阅读全文
posted @ 2025-02-10 17:38 chicidol 阅读(37) 评论(0) 推荐(0)
摘要: 一、错误分析 这句话的意思,大概是有一个钩子,提交前检查项目代码的规范,eslint的检查。提交失败的原因:项目中error过多,导致检测未通过,提交失败。 解决办法二、不进行检查 那就是删除掉pre-commit hook,具体位置在项目文件夹\.git\hooks目录下,找到文件pre-comm 阅读全文
posted @ 2024-09-11 10:20 chicidol 阅读(944) 评论(0) 推荐(0)
摘要: vue 2 使用 vue-lazyload 不要安装最新版本;最新版本会出现不显示图片的问题,要安装1.3.3版本; npm i vue-lazyload@1.3.3 -S import VueLazyload from 'vue-lazyload' Vue.use(VueLazyload, { p 阅读全文
posted @ 2024-08-21 15:17 chicidol 阅读(135) 评论(0) 推荐(0)
摘要: word-break: keep-all; /* 防止英文单词断开 */ overflow-wrap: break-word; /* 允许在单词内部换行,仅在必要时 */ white-space: normal; /* 允许普通换行 */ 阅读全文
posted @ 2024-05-13 14:15 chicidol 阅读(52) 评论(0) 推荐(0)
摘要: 方案1:用$off清除监听 方案2:如果是父子组件就用$emit,不要用EventBus 阅读全文
posted @ 2024-05-10 16:43 chicidol 阅读(152) 评论(0) 推荐(0)