当前位置:网站首页>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 .
边栏推荐
- Interpretation of swin transformer source code
- Finite element simulation in design
- Istio FAQ: sidecar stop sequence
- If only 2 people are recruited, can the enterprise do a good job in content risk control?
- 06. Tencent cloud IOT device side learning - Introduction to basic functions
- Web page live broadcast on demand RTMP streaming platform easydss newly added virtual live broadcast support dash streaming function
- MySQL timestamp format conversion date format string
- MySQL Advanced Series: locks - locks in InnoDB
- Coding's first closed door meeting on financial technology exchange was successfully held
- 期货怎么开户安全些?哪些期货公司靠谱些?
猜你喜欢

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

ZOJ - 4104 sequence in the pocket

There are potential safety hazards Land Rover recalls some hybrid vehicles

C. Three displays codeforces round 485 (Div. 2)
![[go] concurrent programming channel](/img/6a/d62678467bbc6dfb6a50ae42bacc96.jpg)
[go] concurrent programming channel

Some adventurer hybrid versions with potential safety hazards will be recalled
MySQL進階系列:鎖-InnoDB中鎖的情况

Applet - use of template

A survey on dynamic neural networks for natural language processing, University of California
MySQL Advanced Series: locks - locks in InnoDB
随机推荐
An error is reported during SVN uploading -svn sqlite[s13]
[tke] nodelocaldnschache is used in IPVS forwarding mode
ZOJ - 4104 sequence in the pocket
MySQL日期时间戳转换
Regular expression learning artifact!
Yuanqi forest started from 0 sugar and fell at 0 sugar
B. Terry sequence (thinking + greed) codeforces round 665 (Div. 2)
[play with Tencent cloud] my operation strategy from domain name application to website filing in Tencent cloud
Istio FAQ: sidecar stop sequence
企业安全攻击面分析工具
Enterprise service growth path (7): what key factors will affect SaaS' sales performance?
A memory leak caused by timeout scheduling of context and goroutine implementation
[tke] analysis of CLB loopback in Intranet under IPVS forwarding mode
A troubleshooting of golang memory leak
What is browser fingerprint recognition?
Nonholonomic constrained robot
Percona Toolkit series - Pt deadlock logger
Go path customized project path package dependency
Transpose convolution learning notes
Pageadmin CMS solution for redundant attachments in website construction