路由
{path:'/point-manage',name:'PointManage',component:PointManage,meta:{keepAlive: true ,title:'点位管理'}},
传递页:
<el-button type="warning" icon="el-icon-edit" size="mini" @click="pointconfig('111')">点位管理</el-button>
pointconfig(data){
this.$router.push({
path: '/point-manage',
query: {
deviceNo: '1111'
}
// name:'PointManage',
// params: {
// deviceNo: '1111'
// }
})
}
接收页:
<template>
<div style="height:100%">
<div class="">{{deviceNo}}</div>
</div>
</template>
<script>
// import api from '@/api/common/device-manage'
// import elDragDialog from '@/directive/el-drag-dialog'
export default {
data(){
return{
deviceNo: '',
}
},
created(){
},
mounted: function () {
console.log(this.$route)
this.deviceNo = this.$route.query.deviceNo
// this.deviceNo = this.$route.params.deviceNo
},
methods:{
},
}