红叶都枫了 @163
摘要: 场景: pageA pageB(pageB包含三个二级路由) 默认进入pageB时进入第一个页面的路由,之后点击左侧按钮,分别进入其他二级路由 原router.js写法: //应用信息 { path:'/app-manage', name:'app-manage', component:AppMan 阅读全文
posted @ 2020-06-23 10:11 红叶都枫了163 阅读(1006) 评论(0) 推荐(0) 编辑
摘要: <template> <div class="conten1"> <input class="code" type="text" v-model="code"> <button @click="sendCode()">{{codeBtnText}}</button> </div> </templat 阅读全文
posted @ 2020-06-20 18:21 红叶都枫了163 阅读(268) 评论(0) 推荐(0) 编辑
摘要: <template> <div class=""> <form action="" method="post" class="upload" ref="upload"> <button class="sign" id="uploadFile">选择文件</button> <input type="f 阅读全文
posted @ 2020-06-20 16:05 红叶都枫了163 阅读(1479) 评论(0) 推荐(0) 编辑
摘要: <template> <div class=""> <!-- 选择后预览 --> <img v-if="imgOneUrl" :src="imgOneUrl" alt=""> <!-- 默认图片 --> <img v-else src="@/assets/images/upImg-1.png" al 阅读全文
posted @ 2020-06-20 15:54 红叶都枫了163 阅读(519) 评论(0) 推荐(0) 编辑
摘要: 当更改了用户信息后,需要刷新页面或者组件。 1.当前组件刷新。定义一个请求用户信息的方法,在需要时调用: sessionStorage.setItem('userInfo',JSON.stringify(this.userInfo)); 2.刷新父组件。 子组件某个需要的地方: this.$emit 阅读全文
posted @ 2020-06-20 15:08 红叶都枫了163 阅读(7592) 评论(0) 推荐(0) 编辑
摘要: 页面跳转顺序index=>detail2=>detail3(三个页面不是单独请求数据,后两个页面是第一个页面数据的传递) detail2页面与methods同级: beforeRouteLeave(to,from,next){ console.log(0) if(to.name 'detail3') 阅读全文
posted @ 2020-06-03 13:39 红叶都枫了163 阅读(496) 评论(0) 推荐(0) 编辑
摘要: 后端返回的数据是一股脑的情况(不是按pageSize,pageNum一组一组的发送)时,前端使用vant-list实现懒加载需要再写一点js,记录一下 main.js: Vue.use(List); Vue.use(PullRefresh); template: <van-pull-refresh  阅读全文
posted @ 2020-05-28 17:02 红叶都枫了163 阅读(2050) 评论(0) 推荐(0) 编辑
摘要: 新增反选功能。上图(这个系列系利用前端框架的原创): main.js: Vue.use(Stepper); Vue.use(Checkbox); Vue.use(CheckboxGroup); .vue文件: <template> <div class="box"> <div class="flex 阅读全文
posted @ 2020-05-27 13:56 红叶都枫了163 阅读(402) 评论(0) 推荐(0) 编辑
摘要: 有加载动画的app.vue <template> <div id="app"> <keep-alive> <router-view v-if="$route.meta.keepAlive"></router-view> </keep-alive> <van-loading type="spinner 阅读全文
posted @ 2020-05-26 16:29 红叶都枫了163 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 增加只计算已选的的购物车商品功能。效果图: main.js: Vue.use(Stepper); Vue.use(Checkbox); Vue.use(CheckboxGroup); 上代码: <template> <div class="box"> <div class="flex-left ti 阅读全文
posted @ 2020-05-26 15:44 红叶都枫了163 阅读(341) 评论(0) 推荐(0) 编辑