随笔 - 193
文章 - 0
评论 - 8
阅读 -
32万
11 2021 档案
vue 移动端弹窗后禁止页面滚动 @touchmove.prevent
摘要:可以在遮罩层中添加 @touchmove.prevent 就可以实现禁止页面滚动 注意 弹窗里面有滚动条的也是无法滚动的 具体使用 父标签上添加 @touchmove.prevent <div @touchmove.prevent> </div> ps:转载于https://www.cnblogs.
阅读全文
vue新建项目
摘要:1、一般用webpack来新建项目,方便管理,开发中,线上 npm install -g vue-cli vue init webpack projectName 或者 vue init webpack-simple projectName 2、简单的新建项目 vue create hello-wo
阅读全文
树结构的数组,修改值,dom有效
摘要:修改第一层的数据,是可以让dom生效的 this,$emit(arr,index,val) arr:原数据 index:第几个 val:修改后的值
阅读全文
vue props 默认值
摘要:props: { demoString: { type: String, default: '' }, demoNumber: { type: Number, default: 0 }, demoBoolean: { type: Boolean, default: true }, demoArray
阅读全文
时间戳转string string 转时间 获取时间
摘要:1、时间戳转时间 function formatDateDay(value,type='-') { if(value) { let date = new Date(parseInt(value) * 1000) let Y=date.getFullYear() let M = (date.getMo
阅读全文
vue 页面返回 重新获取数据
摘要:1、方法一:Vue利用visibilitychange监听页面显示和隐藏 mounted() { document.addEventListener('visibilitychange', _this.handleVisiable) }, destroyed() { document.removeE
阅读全文
flex 样式总结
摘要:1、上下顶边 display: flex; flex-direction:row; flex-wrap:wrap; align-content:space-between; 2、垂直居中 display:flex; align-items:center;/*垂直居中*/ justify-conten
阅读全文