2塘

生命本应极度清明而免于杂乱无章

摘要: vue实现前进刷新后退不刷新,比如列表页进入详情页,详情页刷新,但是退回列表页,不刷新依旧是当前页码。 列表页: mounted() { this.getPageIndex(); }, methods: { getPageIndex() { if (sessionStorage.getItem('m 阅读全文
posted @ 2020-10-20 15:58 2塘 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 移动端调试: npm i vconsole -D if (process.env.NODE_ENV 'development') { const VConsole = require('vconsole') // eslint-disable-next-line const my_console = 阅读全文
posted @ 2020-08-31 18:31 2塘 阅读(509) 评论(0) 推荐(0) 编辑
摘要: 最终达到这样的效果: 以下省略了一些简单的代码,比如组件引入等 1、引入element ui上传组件 <upload-img :pic="form.bgImage" @getUrlFn="getImgUrl" @modalShowFn="getModalStatus"></upload-img> 2 阅读全文
posted @ 2020-03-16 17:32 2塘 阅读(5003) 评论(4) 推荐(1) 编辑
摘要: 1.与远程仓库重新建立关系 git clone git@gitlab.名称.git 2.可以查看本地当前分支,为master git branch 3.本地创建分支,并检出想要的远程分支demo git branch orgin/demo git checkout orgin/demo 或者可以合并 阅读全文
posted @ 2020-03-11 09:53 2塘 阅读(849) 评论(0) 推荐(0) 编辑
摘要: 1.切换到基础分支,如主干 git checkout master 2.创建并切换到新分支demo git checkout -b demo 3.git branch查看已经在demo分支 4.更新分支代码并提交 git add * git commit -m "demo" git push ori 阅读全文
posted @ 2020-03-11 09:43 2塘 阅读(119) 评论(0) 推荐(0) 编辑
摘要: ios系统微信版存在bug,input框获取焦点后键盘弹出,页面被顶起,但键盘消失时,页面没有回弹,下面存在空白区域 在input标签中添加事件 @focus="getFocus('className')" 在methods中添加方法,手动让页面滚回到原来位置 getFocus (className 阅读全文
posted @ 2020-02-19 19:28 2塘 阅读(291) 评论(0) 推荐(0) 编辑
摘要: vue+elementUI,icon打包后不显示,需要在build→utils.js文件中修改 1.找到build文件夹下utils.js文件 2.在以下代码片段中加入 publicPath: '../../' if (options.extract) { return ExtractTextPlu 阅读全文
posted @ 2020-01-17 14:57 2塘 阅读(1327) 评论(0) 推荐(0) 编辑
摘要: 1 function downFile(content, fileName){ 2 const dom = document.createElement('a') // 隐藏的a标签,href为输出流 3 const blob = new Blob([content], { type: 'appli 阅读全文
posted @ 2020-01-03 17:30 2塘 阅读(1417) 评论(0) 推荐(0) 编辑
摘要: App.vue 中meta对象的属性控制是否展示 1 <keep-alive> 2 <router-view v-if="$route.meta.keepAlive"></router-view> 3 </keep-alive> 4 <router-view v-if="!$route.meta.k 阅读全文
posted @ 2019-12-26 16:26 2塘 阅读(668) 评论(0) 推荐(0) 编辑
摘要: 引入组件 1 <upload-img :profile-url="shopProfile" @getShopProfileFn="getShopProfile" /> 定义方法 getShopProfile(url) { // url }, 组件内容 1 <template> 2 <div> 3 < 阅读全文
posted @ 2019-12-26 15:44 2塘 阅读(1006) 评论(0) 推荐(0) 编辑