当前位置:网站首页>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 .
边栏推荐
- D. Solve the maze (thinking +bfs) codeforces round 648 (Div. 2)
- If only 2 people are recruited, can the enterprise do a good job in content risk control?
- What is the difference between get and post? After reading it, you won't be confused and forced, and you won't have to fight with your friends anymore
- Teach you to write a classic dodge game
- Load MySQL table data consumption quick installation configuration through kafka/flink
- 50 growers | closed door meeting of marketing circle of friends ス gathering Magic City thinking collision to help enterprise marketing growth
- Clickhouse high performance column storage core principle
- Istio FAQ: sidecar startup sequence
- Annual contribution! Tencent cloud middleware product upgrade conference is in hot registration!
- Cloud + community [play with Tencent cloud] video solicitation activity winners announced
猜你喜欢
MySQL Advanced Series: locks - locks in InnoDB

A survey of training on graphs: taxonomy, methods, and Applications

There are potential safety hazards Land Rover recalls some hybrid vehicles

A survey on dynamic neural networks for natural language processing, University of California

ZOJ - 4104 sequence in the pocket

Some adventurer hybrid versions with potential safety hazards will be recalled

Applet - use of template

Ps\ai and other design software pondering notes

Ui- first lesson

A survey on model compression for natural language processing (NLP model compression overview)
随机推荐
How to pop up an alarm through the national standard gb28181 protocol video platform easygbs for mobile detection / perimeter intrusion detection video recording
Transpose convolution learning notes
[tke] nodelocaldnschache is used in IPVS forwarding mode
Principle analysis of robot hardware in the loop system
Enterprise security attack surface analysis tool
A survey of training on graphs: taxonomy, methods, and Applications
Don't let [mana] destroy your code!
转置卷积学习笔记
[play with Tencent cloud] my operation strategy from domain name application to website filing in Tencent cloud
How FEA and FEM work together
Ps\ai and other design software pondering notes
Funny! Pictures and texts give you a comprehensive understanding of the effects of dynamics and mass
Batch BOM Bapi test
SQL multi table updating data is very slow
Experience and suggestions on cloud development database
Tencent releases the full platform version of reasoning framework TNN, and supports mobile terminal, desktop terminal and server terminal at the same time
Understanding of deep separable convolution, block convolution, extended convolution, transposed convolution (deconvolution)
Load MySQL table data consumption quick installation configuration through kafka/flink
Interpretation of swin transformer source code
Goby+awvs realize attack surface detection