es6的方法——Array.isArray()
Array.isArray([]) //true
//判断字符串是否包含某个字段,如再iview三级联动菜单里面
在watch里面
watch:{
“infoData.reservationLocation”{
handler(newV,oldV){
if(newV){ // 判断newV是否存在
newV = newV.join(",") // 数组转换为字符串
if(newV.cludes(‘xx’)){ // 新值是否保存这个字段
}else{}
}
}
}
}
// 页面中重新搜索栏
this.$refs.searchFrom.resetFields()
// 设置当前为第一页
this.pageconfig.current = 1
//刷新表格
this.renderTableData();
//echarts 隔行显示解决办法
xAxis: [
{
type: 'category',
boundaryGap: false,
data: [],
axisLabel: {
interval: 0
}
}
],