当前位置:网站首页>Activeindex selection and redirection in the menu bar on the right of easycvs
Activeindex selection and redirection in the menu bar on the right of easycvs
2022-06-24 16:38:00 【Tsingsee green rhino video】
Last time we solved EasyCVS Video management platform in small screen state menu bar problem ( Video management platform menu bar small screen adaptive optimization recording ). But in practice ,EasyCVS When the right menu bar switches to the top menu bar , Menu bar activeindex Will change , here , If you open the right menu bar , Correspondingly, you also need to switch to the corresponding menu bar item, At the same time, when the page is refreshed, it also needs to be redirected to the corresponding activeIndex.
First of all, the menu bar on the right is to use elementUi Of el-menu Components , The component comes with it default-active attribute , When the top navigation bar switches, his activeIndex Value to the navigation bar on the right default-active value .
Redirection is to detect the routing address , To get pre-determined information for each navigation bar item The corresponding routing address , And then we put each route's activeInde The value given to the navigation bar default-active Assignment can .
The reference codes are as follows :
<el-menu
:default-active="activeIndexRight"
class="el-menu-vertical-demo"
@open="handleOpen"
@select="select"
background-color="#292C33"
text-color="#fff"
@close="handleClose"
:router="true"
>
<el-menu-item index="0" :route="'/scrren'">
<span slot="title"> Real-time Preview </span>
</el-menu-item>
<el-menu-item index="1" :route="'/live/lis'">
<span slot="title"> Live video </span>
</el-menu-item>
<el-menu-item index="2" :route="'/user/list'">
<span slot="title"> User management </span>
</el-menu-item>
<el-menu-item index="3" :route="'/space/list'">
<span slot="title"> Space management </span>
</el-menu-item>
<el-menu-item index="4" :route="'/bucket/list'">
<span slot="title"> Object storage </span>
</el-menu-item>
</el-menu>
// Navigation bar redirection
RouteRedirection() {
var path = this.$route.path;
let paths = [
{ path: "/scrren", type: 0 },
{ path: "/live/list", type: 1 },
{ path: "/user", type: 2 },
{ path: "/space", type: 3 },
{ path: "/bucket", type: 4 },
{ path: "/oss/list", type: 5 },
];
for (const i in paths) {
if (path.indexOf(paths[i].path) != -1) {
this.activeIndex = paths[i].type;
this.activeIndexRight = JSON.stringify(this.activeIndex);
console.log(this.activeIndex, " route ");
return;
}
}
},EasyCVS Although it is not open to the outside world at present , But interested users can learn about EasyCVR.EasyCVR Currently supported RTSP、GB28181、Ehome、 The sea, SDK、 Dahua SDK Access of protocol equipment , Private agreements of other mainstream manufacturers are expanding . So in the long run ,EasyCVR It has high use value and adaptability .
边栏推荐
- B. Terry sequence (thinking + greed) codeforces round 665 (Div. 2)
- A very good educational man and resource center planning scheme, with word file download
- What is the difference between optical fiber jumper and copper wire
- @There is a free copyright protection service for enterprises in Dawan District
- ThinkPHP vulnerability exploitation tool
- Annual contribution! Tencent cloud middleware product upgrade conference is in hot registration!
- Transpose convolution learning notes
- How to pop up an alarm through the national standard gb28181 protocol video platform easygbs for mobile detection / perimeter intrusion detection video recording
- Tencent on the other hand, I was puzzled by the "horse race" problem
- Is Shanjin futures safe? What are the procedures for opening futures accounts? How to reduce the futures commission?
猜你喜欢

Ui- first lesson

C. Three displays codeforces round 485 (Div. 2)
MySQL Advanced Series: locks - locks in InnoDB
MySQL Advanced Series: Locks - Locks in InnoDB

Cognition and difference of service number, subscription number, applet and enterprise number (enterprise wechat)

C. K-th not divisible by n (Mathematics + thinking) codeforces round 640 (Div. 4)

Applet wxss

Problems encountered in the work of product manager

A survey on model compression for natural language processing (NLP model compression overview)
MySQL進階系列:鎖-InnoDB中鎖的情况
随机推荐
Greenplum role-based fine-grained permission control
@There is a free copyright protection service for enterprises in Dawan District
C. K-th not divisible by n (Mathematics + thinking) codeforces round 640 (Div. 4)
Fastjson 漏洞利用技巧
Annual contribution! Tencent cloud middleware product upgrade conference is in hot registration!
A troubleshooting of golang memory leak
Video structured intelligent analysis platform easycvr video recording plan function optimization / regularly delete expired videos
Use Google search like a professional
TRTC web end imitation Tencent conference microphone mute detection
It may be a good idea to use simulation software in the cloud for simulation
Serial of H3CNE experiment column - VLAN configuration experiment, access and trunk
Pytorch transpose convolution
Cloud + community [play with Tencent cloud] video solicitation activity winners announced
Dismantle the industrial chain of synthetic rubber industry, and the supply chain may become a sharp weapon for breakthrough
What is zero trust? Three classes will show you how to understand him!
Cognition and difference of service number, subscription number, applet and enterprise number (enterprise wechat)
How FEA and FEM work together
[security] graphical CSRF injection of Web Security (II)
Bitwise Operators
Summer Challenge harmonyos - to do list with date effect