07 2019 档案
摘要:1.navigateTo 保留当前页面,跳转到应用内的某个页面。但是不能跳到 tabbar 页面。使用 wx.navigateBack 可以返回到原页面。小程序中页面栈最多十层。 2.redirectTo 关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面。 3.reLaun
阅读全文
摘要:1. url传参: 第一个页面(a.html): var obj = a.value; //传给弹出页面参数 var url = 'b.html?obj='+obj; url = encodeURI(url); window.open(url, "", "width=600,height=400")
阅读全文
摘要:1.引入包 import {hashHistory} from ‘React-router' 2.跳转传值 handleClick = (value) => { hashHistory.push({ pathname: 'main/detailMessage', state: { id:value.
阅读全文
摘要:1)直接在路由中传参 this.$router.push({ path: `/childPage/${id}`, }) 需要对应路由配置如下: 获取参数:this.$route.parames.id 2) 通过路由属性中的name来确定匹配的路由,通过params来传递参数 this.$router
阅读全文
摘要:px是固定的像素,一旦设置了就无法因为适应页面大小而改变。 em和rem相对于px更具有灵活性,他们是相对长度单位,意思是长度不是定死了的,更适用于响应式布局。 对于em和rem的区别一句话概括:em相对于父元素,rem相对于根元素(html)。 当用rem做响应式时,直接在媒体中改变html的fo
阅读全文