修改ui
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div ref="navbar" class="navbar">
|
||||
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container"
|
||||
<div ref="navbar" class="navbar"
|
||||
:style="changeColor ? 'background: rgba(0, 21, 41, 1);boxShadow:0px 1px 8px 0px rgba(0,131,255,0.35)' : ''">
|
||||
<hamburger id="hamburger-container" style="color: blue;" :is-active="sidebar.opened" class="hamburger-container"
|
||||
@toggleClick="toggleSideBar" />
|
||||
|
||||
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav" />
|
||||
@@ -42,7 +43,7 @@ export default {
|
||||
'device'
|
||||
]),
|
||||
changeColor() {
|
||||
if (this.$route.path == '/copilot/efficiency-container' || this.$route.path == '/copilot/main') {
|
||||
if (this.$route.path == '/copilot/efficiency-container' || this.$route.path == '/copilot/main' || this.$route.path == '/factoryData/hdIndex' || this.$route.path === '/factoryData/factory-data') {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
@@ -66,16 +67,17 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// changeColor(val) {
|
||||
// if (val == true) {
|
||||
// // console.log('this.$refs.mainContainer', this.$refs.mainContainer);
|
||||
// this.$refs.navbar.style.backgroundColor = 'rgba(0, 21, 41, 1)'
|
||||
// this.$refs.navbar.style.boxShadow = '0px 1px 8px 0px rgba(0,131,255,0.35)'
|
||||
// } else {
|
||||
// this.$refs.navbar.style.backgroundColor = ''
|
||||
// this.$refs.navbar.style.boxShadow = ''
|
||||
// }
|
||||
// },
|
||||
changeColor(val) {
|
||||
if (val == true) {
|
||||
let svg = document.getElementsByClassName('hamburger')
|
||||
console.log('svg',svg);
|
||||
svg[0].setAttribute('fill', 'rgba(255, 255, 255, 1)')
|
||||
} else {
|
||||
let svg = document.getElementsByClassName('hamburger')
|
||||
console.log('svg', svg);
|
||||
svg[0].setAttribute('fill', '')
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
toggleSideBar() {
|
||||
|
||||
Reference in New Issue
Block a user