diff --git a/src/router/index.js b/src/router/index.js index 9ad0015..fc627fd 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -127,7 +127,7 @@ export const constantRoutes = [ { path: '', component: Layout, - redirect: 'index', + redirect: '/inspection-workspace/task', hidden: true, children: [ { @@ -347,12 +347,12 @@ export const dynamicRoutes = [ meta: { title: '修改生成配置', activeMenu: '/tool/gen' } } ] - }, + } ] // 防止连续点击多次路由报错 -let routerPush = Router.prototype.push; -let routerReplace = Router.prototype.replace; +const routerPush = Router.prototype.push +const routerReplace = Router.prototype.replace // push Router.prototype.push = function push(location) { return routerPush.call(this, location).catch(err => err) diff --git a/src/views/video/LivePreview.vue b/src/views/video/LivePreview.vue index 9968f95..11c2eda 100644 --- a/src/views/video/LivePreview.vue +++ b/src/views/video/LivePreview.vue @@ -22,19 +22,18 @@ ref="cameraCards" class="camera-card" :class="{ active: activeIndex === index, empty: !slot }" - @click="activeIndex = index" + @click="selectSlot(index)" @dblclick="slot && fullscreen(index)" >