摘要: <canvas class="canvas-block" id="myCanvas" width="400" height="400"></canvas> // 点击按钮绘制图像 handleTagClick (item) { this.loadCanvas() }, loadCanvas (val 阅读全文
posted @ 2023-01-17 10:20 搬砖的苦行僧 阅读(237) 评论(0) 推荐(0) 编辑
摘要: <input class="input" v-model="heightVal" @input="handleInput('height')" /> <input class="input" v-model="weightVal" @input="handleInput('weight')" /> 阅读全文
posted @ 2022-09-14 14:21 搬砖的苦行僧 阅读(381) 评论(0) 推荐(0) 编辑
摘要: 配置vue-cli 的logo 标签(即: 标签图标) 1. 在入口文件index.html中加入 <link rel="shortcut icon" type="image/x-icon" href="./img/logo.png"> 2. public文件夹下添加 manifest.json文件 阅读全文
posted @ 2022-09-02 10:02 搬砖的苦行僧 阅读(850) 评论(0) 推荐(0) 编辑
摘要: vue-router路由重复的解决方法: 在router文件夹下面的index.js中加上下面几句代码: import VueRouter from 'vue-router' const originalPush = VueRouter.prototype.push VueRouter.protot 阅读全文
posted @ 2022-08-30 17:46 搬砖的苦行僧 阅读(141) 评论(0) 推荐(1) 编辑
摘要: 1. 下拉获取历史记录数据historyList2. 页面上的对话列表数据messageList3. 将历史记录的数据合并到对话数据上 this.messageList = [...historyList, ...this.messagelists]4. 历史记录从下往上显示 let lastH = 阅读全文
posted @ 2022-08-18 17:30 搬砖的苦行僧 阅读(57) 评论(0) 推荐(0) 编辑
摘要: 在使用cube-ui的scrollTo()进行页面的滚动时,安卓和浏览器都是正常的,但是在iphone的手机上不能滚动经过排查发现是cube-ui的版本问题,当使用1.12.47版本的时候会出现这个问题 然后将版本回退到1.12.34时就可以正常滚动了,需将版本锁定,防止build打包之后自动更新成 阅读全文
posted @ 2022-08-18 09:46 搬砖的苦行僧 阅读(288) 评论(0) 推荐(0) 编辑
摘要: cube-scroll是一个基于better-scroll进行封装的组件 better-scroll 默认会阻止浏览器的原生click事件,当click设置为true时,会派发给我们一个click事件 cube-scroll的Props配置options里的click属性默认为true, 所以要加入 阅读全文
posted @ 2022-07-19 16:42 搬砖的苦行僧 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 当在安装依赖是报错如下:npm ERR! Fix the upstream dependency conflict, or retry可以尝试使用: npm i --legacy-peer-deps如果继续报如下错误:npm ERR! errno FETCH_ERROR则需清除缓存: npm cac 阅读全文
posted @ 2022-07-18 16:47 搬砖的苦行僧 阅读(2231) 评论(0) 推荐(0) 编辑
摘要: 描述: A页面进入B页面,B页面进入C页面, C页面返回到B页面需要缓存到之前滑动的位置,但是A页面进入B页面的时候不需要缓存B页面之前滑动的位置 在app.vue中 <keep-alive :include="keepAlive"> <router-view /> </keep-alive> co 阅读全文
posted @ 2022-07-12 11:33 搬砖的苦行僧 阅读(1341) 评论(0) 推荐(0) 编辑
摘要: 原因: vue-cli-service 并没有加入到环境变量里 # 编辑根目录下的.bash_profile文件vim ~/.bash_profile # 在文件最后添加export PATH=${PATH}:./node_modules/.bin # 添加文件后,再执行source立即生效 sou 阅读全文
posted @ 2022-07-08 10:14 搬砖的苦行僧 阅读(3452) 评论(0) 推荐(0) 编辑