div里面的元素垂直均匀分布 按钮引发地址栏出现问号 判断一个数组是否为空 div底部居中 路由传参接受参数

时间:2023-03-09 19:16:31
div里面的元素垂直均匀分布  按钮引发地址栏出现问号  判断一个数组是否为空  div底部居中  路由传参接受参数
一个固定高度的div的子元素 在垂直 方向上平均分布
.important-dec{
height: 121px;
flex-direction: column;
display: flex;
justify-content: space-between;
}
动态计算元素的宽 除了支持 -  还有 + % *
width: calc(100% - 210px);
点击element-ui中按钮,地址栏出现问号 是因为按钮的默认事件引发的  阻止它的默认事件就好了
2、使用@click.prevent 阻止默认事件
<button @click.prevent="btnClick">获得验证码</button>
JS如何判断一个数组是否为空、是否含有某个值
this.multipleSelection == null ||this.multipleSelection.length == 0
div内一个元素底部居中  运用了css3中的translata
position: absolute;
bottom: 0;
left: 50%;
transform: translate(-50%, -50%);
this.$router.push({ path: "/ldentitycen/cardlist",query:{whosendcard:1} }); 传递参数

 if(this.$route.query.whophoto=="0"){接受参数
this.whoCurrentPhoto="学生拍照";
this.defaultPhotoStudent=true;
}else if(this.$route.query.whophoto=="1"){
this.whoCurrentPhoto="老师拍照";
this.defaultPhotoStudent=false;
}