Commit 7a578544 by 展昭

deep修改框架样式

parent 6b514b24
<template>
<div id="showheader" :class="this.top?'iosStyle header-warp':'header-warp'">
<div id="showheader" class="header">
<van-nav-bar id="nav" :title="title" left-text left-arrow>
<template #title>
<a class="header-title title-active" href="/bill">人事服务</a>
<a class="header-title" :class="isActive?'title-active':''" href="/bill">人事服务</a>
<a class="header-title" href="./more">更多服务</a>
<a class="header-title" :class="isActive?'':'title-active'" href="./more">更多服务</a>
</template>
</van-nav-bar>
</div>
......@@ -12,6 +12,7 @@
<script>
import { NavBar, Icon } from "vant";
import { common } from "../utils/common";
export default {
components: {
[NavBar.name]: NavBar
......@@ -21,6 +22,7 @@ export default {
},
data() {
return {
isActive: true,
top: ""
};
},
......@@ -28,6 +30,11 @@ export default {
var u = navigator.userAgent;
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
this.top = isiOS;
if (window.location.href.indexOf("bill")) {
this.isActive = true;
} else {
this.isActive = false;
}
}
};
</script>
......@@ -42,9 +49,9 @@ export default {
width: 100%;
z-index: 1100;
}
.van-nav-bar .van-icon {
color: #333333 !important;
font-size: 25px !important;
.header /deep/ .van-nav-bar .van-icon {
color: #fff !important;
font-size: 16px !important;
}
.van-nav-bar {
background: linear-gradient(
......@@ -55,9 +62,12 @@ export default {
}
.header-title {
color: #fff;
color: #8ec9fd;
font-size: 16px;
margin-right: 30px;
margin-right: 25px;
}
.title-active {
color: #ffffff;
font-size: 18px;
}
</style>
export default class common {
getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
}
\ No newline at end of file
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