摘要: //maskOff 换成你的弹窗变量 监听弹窗开启 关闭 maskOff (newVal) { if (newVal) { document.body.style.overflow = "hidden"; } else { document.body.style.overflow = "auto"; 阅读全文
posted @ 2021-10-12 14:18 chicidol 阅读(53) 评论(0) 推荐(0) 编辑
摘要: 解决方案: 步骤一:给html和body设置height和overflow:scroll 步骤二:并且滚动事件的监听一定要写第三个参数: window.addEventListener('scroll', this.onScroll, true) 设置body的样式: window.document 阅读全文
posted @ 2021-10-12 11:53 chicidol 阅读(571) 评论(0) 推荐(0) 编辑
摘要: 白屏原因:安卓低版本无法解析es6语法,需要借助babel把es6转化为es5 安装npm install @babel/polyfill 在main.js第一行引入import '@babel/polyfill' //vue.config.js非常重要 const path = require(' 阅读全文
posted @ 2021-10-11 15:11 chicidol 阅读(564) 评论(0) 推荐(0) 编辑
摘要: //store->modules->app.js const state = { third: false, } const mutations = { SET_THIRD: (state, third) => { state.third = third }, } const actions = { 阅读全文
posted @ 2021-10-08 14:30 chicidol 阅读(15) 评论(0) 推荐(0) 编辑
摘要: textarea默认只显示一行的高度,输入内容不超过3行,高度自适应展示,超过3行则滚动显示。 <div class="textarea-content"> <textarea name="note" class="textarea" v-model="text" placeholder="请输入您 阅读全文
posted @ 2021-09-29 13:50 chicidol 阅读(1134) 评论(0) 推荐(0) 编辑
摘要: 问题:document.documentElement.scrollTop或者document.body.scrollTop一直为0 原因:浏览器的兼容问题 解决:document.documentElement.scrollTop = document.body.scrollTop= window 阅读全文
posted @ 2021-09-29 09:58 chicidol 阅读(429) 评论(0) 推荐(0) 编辑
摘要: 报错原因:vuex 1.组件中v-model=“XXX”,而XXX是vuex state中的某个变量 2.vuex中是单项流,v-model是vue中的双向绑定,在computed中只经过get获取参数值,没有set没法改变参数值 解决办法: 1.在computed中设置get和sets <inpu 阅读全文
posted @ 2021-09-26 18:13 chicidol 阅读(151) 评论(0) 推荐(0) 编辑
摘要: <template> <div class="choose-item"> <div v-for="(item,index) in data" :key="index"> <label> <span>{{item.name}}</span> <input type="radio" name="pay" 阅读全文
posted @ 2021-09-24 10:34 chicidol 阅读(416) 评论(0) 推荐(0) 编辑
摘要: 安装:npm install vue-picture-preview-extend main.js中引入: import vuePicturePreview from 'vue-picture-preview-extend' Vue.use(vuePicturePreview) 在根组件App.vu 阅读全文
posted @ 2021-09-24 10:26 chicidol 阅读(999) 评论(0) 推荐(0) 编辑
摘要: 解决方案:使用sessionStorage 存数组:sessionStorage.setItem("array", JSON.stringify(this.arr)) 取数组:JSON.parse(sessionStorage.getItem("array")) 阅读全文
posted @ 2021-09-10 14:11 chicidol 阅读(357) 评论(0) 推荐(0) 编辑