修改ui
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="navbar">
|
||||
<div ref="navbar" class="navbar">
|
||||
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container"
|
||||
@toggleClick="toggleSideBar" />
|
||||
|
||||
@@ -41,6 +41,13 @@ export default {
|
||||
'nickname',
|
||||
'device'
|
||||
]),
|
||||
changeColor() {
|
||||
if (this.$route.path == '/copilot/efficiency-container' || this.$route.path == '/copilot/main') {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
setting: {
|
||||
get() {
|
||||
return this.$store.state.settings.showSettings
|
||||
@@ -58,6 +65,18 @@ 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 = ''
|
||||
// }
|
||||
// },
|
||||
},
|
||||
methods: {
|
||||
toggleSideBar() {
|
||||
this.$store.dispatch('app/toggleSideBar')
|
||||
|
||||
@@ -56,23 +56,26 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
changeColor(val) {
|
||||
// if (val == true) {
|
||||
// this.$refs.tagsViewContainer.style.backgroundColor = 'rgba(0, 21, 41, 1)'
|
||||
// var tag = document.getElementsByClassName("tags-view-item")
|
||||
// console.log('tag', tag)
|
||||
// for (let i in tag) {
|
||||
// tag[i].classList.add("changeColor")
|
||||
// // tag[i].classList.remove("default")
|
||||
// }
|
||||
// console.log('this.$refs.scrollContainer', this.$refs.tag);
|
||||
// } else {
|
||||
// this.$refs.tagsViewContainer.style.backgroundColor = ''
|
||||
// var tag = document.getElementsByClassName("tags-view-item")
|
||||
// for (let i in tag) {
|
||||
// // tag[i].classList.remove("changeColor")
|
||||
// // tag[i].classList.add("default")
|
||||
// }
|
||||
// }
|
||||
if (val == true) {
|
||||
console.log('this.$refs.tagsViewContainer', this.$refs.tagsViewContainer);
|
||||
this.$refs.tagsViewContainer.style.backgroundColor = 'rgba(0, 21, 41, 1)'
|
||||
this.$refs.tagsViewContainer.style.borderTop = '0px solid #d8dce5'
|
||||
var tag = document.getElementsByClassName("tags-view-item")
|
||||
console.log('tag', tag)
|
||||
for (let i in tag) {
|
||||
tag[i].classList.add("changeColor")
|
||||
// tag[i].classList.remove("default")
|
||||
}
|
||||
console.log('this.$refs.scrollContainer', this.$refs.tag);
|
||||
} else {
|
||||
this.$refs.tagsViewContainer.style.backgroundColor = ''
|
||||
this.$refs.tagsViewContainer.style.borderTop = '1px solid #d8dce5'
|
||||
var tag = document.getElementsByClassName("tags-view-item")
|
||||
for (let i in tag) {
|
||||
tag[i].classList.remove("changeColor")
|
||||
// tag[i].classList.add("default")
|
||||
}
|
||||
}
|
||||
},
|
||||
$route() {
|
||||
this.addTags()
|
||||
@@ -96,11 +99,23 @@ export default {
|
||||
return route.path === this.$route.path
|
||||
},
|
||||
activeStyle(tag) {
|
||||
if (!this.isActive(tag)) return {};
|
||||
return {
|
||||
"background-color": this.theme,
|
||||
"border-color": this.theme
|
||||
};
|
||||
if (this.changeColor) {
|
||||
if (!this.isActive(tag)) return {
|
||||
"background-color": 'rgba(0, 59, 115, 1)',
|
||||
"border-color": 'rgba(0, 59, 115, 1)',
|
||||
"color": 'rgba(255, 255, 255, 1)'
|
||||
};
|
||||
return {
|
||||
"background-color": this.theme,
|
||||
"border-color": this.theme
|
||||
};
|
||||
} else {
|
||||
if (!this.isActive(tag)) return {};
|
||||
return {
|
||||
"background-color": this.theme,
|
||||
"border-color": this.theme
|
||||
};
|
||||
}
|
||||
},
|
||||
isAffix(tag) {
|
||||
return tag.meta && tag.meta.affix
|
||||
|
||||
Reference in New Issue
Block a user