Commit 1878871d by LJM

bug

parent 952c1bb1
...@@ -188,6 +188,7 @@ body { ...@@ -188,6 +188,7 @@ body {
.pagex { .pagex {
padding: 20px; padding: 20px;
min-height: 500px;
} }
.zdypop { .zdypop {
......
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
<div class="tab-box fl" ref="scrollbox"> <div class="tab-box fl" ref="scrollbox">
<!--tab 栏目--> <!--tab 栏目-->
<div class="item-boxs row verCenter" ref="scrollboxinner"> <div class="item-boxs row verCenter" ref="scrollboxinner">
<a class="item first row rowCenter verCenter" href="/#/" :class="{'act':$route.path=='/','scrollsg':rpcg}"> <a class="item first row rowCenter verCenter" href="/#/" :class="{'act':$route.path=='/'}">
<font class="fl">概况</font> <font class="fl">概况</font>
</a> </a>
<a class="item row rowCenter verCenter" :class="{'scrollsg':rpcg,'act':(JSON.stringify(item)==JSON.stringify({path: $route.path,title: $route.meta.title,query:$route.query}))}" @click="tabUrl(item)" v-for="item in tabs"> <a class="item row rowCenter verCenter" :class="{'act':(JSON.stringify(item)==JSON.stringify({path: $route.path,title: $route.meta.title,query:$route.query}))}" @click="tabUrl(item)" v-for="item in tabs">
<font class="fl">{{ item.title }}</font> <font class="fl">{{ item.title }}</font>
<span class="icon iconfont fl" @click.stop="closetab(item.path)"></span> <span class="icon iconfont fl" @click.stop="closetab(item.path)"></span>
</a> </a>
...@@ -186,9 +186,9 @@ export default { ...@@ -186,9 +186,9 @@ export default {
name: 'menus', name: 'menus',
props: {}, props: {},
created() { created() {
var self = this
this.getData(); this.getData();
this.tabUi() this.tabUi()
var self = this
window.onresize = function () { window.onresize = function () {
self.tabUi() self.tabUi()
}; };
...@@ -210,7 +210,6 @@ export default { ...@@ -210,7 +210,6 @@ export default {
tabSure: "", tabSure: "",
tabs: "", tabs: "",
width: "", width: "",
rpcg: false,
dialogVisible: false, dialogVisible: false,
ruleForm: { ruleForm: {
old_password: '', old_password: '',
...@@ -267,13 +266,14 @@ export default { ...@@ -267,13 +266,14 @@ export default {
} }
}, },
tabUi() { tabUi() {
let tab_arr = sessionStorage.getItem('tabs')
if (tab_arr.length >= 9) {
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.scrollboxinner.clientWidth > this.$refs.scrollbox.clientWidth) { if (this.$refs.scrollboxinner.clientWidth > this.$refs.scrollbox.clientWidth) {
this.rpcg = true document.querySelector('.tab-box').scrollLeft = 12000000;
} else {
this.rpcg = false
} }
}) })
}
}, },
tabUrl(item) { tabUrl(item) {
this.$router.push({ this.$router.push({
...@@ -518,26 +518,10 @@ export default { ...@@ -518,26 +518,10 @@ export default {
display: none; display: none;
} }
} }
}
&.scrollsg {
&.act {
&::after {
content: "";
position: absolute;
bottom: -2px;
width: 32px;
height: 5px;
background: #1969F9;
left: 50%;
margin-left: -22px;
}
}
&.first {
&::after {
margin-left: -15px; &:hover {
.iconfont {
color: #1969f9;
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment