|
@@ -13,10 +13,14 @@
|
|
<img
|
|
<img
|
|
src="@/assets/img/Layout/logo.png"
|
|
src="@/assets/img/Layout/logo.png"
|
|
alt=""
|
|
alt=""
|
|
- @click="$router.push('/').catch(() => {})"
|
|
|
|
|
|
+ @click="$router.push('/Layout/Home').catch(() => {})"
|
|
/>
|
|
/>
|
|
<img src="@/assets/img/Layout/zhong.png" alt="" @click="toZhong" />
|
|
<img src="@/assets/img/Layout/zhong.png" alt="" @click="toZhong" />
|
|
- <img src="@/assets/img/Layout/search.png" alt="" @click="searcShow=true"/>
|
|
|
|
|
|
+ <img
|
|
|
|
+ src="@/assets/img/Layout/search.png"
|
|
|
|
+ alt=""
|
|
|
|
+ @click="searcShow = true"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 子页面 -->
|
|
<!-- 子页面 -->
|
|
@@ -31,10 +35,14 @@
|
|
<img
|
|
<img
|
|
src="@/assets/img/Layout/logo2.png"
|
|
src="@/assets/img/Layout/logo2.png"
|
|
alt=""
|
|
alt=""
|
|
- @click="$router.push('/').catch(() => {})"
|
|
|
|
|
|
+ @click="$router.push('/Layout/Home').catch(() => {})"
|
|
/>
|
|
/>
|
|
<img src="@/assets/img/Layout/zhong2.png" alt="" @click="toZhong" />
|
|
<img src="@/assets/img/Layout/zhong2.png" alt="" @click="toZhong" />
|
|
- <img src="@/assets/img/Layout/search2.png" alt="" @click="searcShow=true"/>
|
|
|
|
|
|
+ <img
|
|
|
|
+ src="@/assets/img/Layout/search2.png"
|
|
|
|
+ alt=""
|
|
|
|
+ @click="searcShow = true"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
<div class="rowAll">
|
|
<div class="rowAll">
|
|
<div
|
|
<div
|
|
@@ -74,7 +82,7 @@
|
|
<div class="searcTop" @keyup.enter="searcBtn">
|
|
<div class="searcTop" @keyup.enter="searcBtn">
|
|
<div class="inco" @click="searcBtn"></div>
|
|
<div class="inco" @click="searcBtn"></div>
|
|
<input type="text" v-model="txt" placeholder="search......" />
|
|
<input type="text" v-model="txt" placeholder="search......" />
|
|
- <div class="Cancel" @click="searcShow=false">Cancel</div>
|
|
|
|
|
|
+ <div class="Cancel" @click="searcShow = false">Cancel</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 回到顶部 -->
|
|
<!-- 回到顶部 -->
|
|
@@ -84,7 +92,11 @@
|
|
<!-- 底部 -->
|
|
<!-- 底部 -->
|
|
<div class="bottom">
|
|
<div class="bottom">
|
|
<div class="logo">
|
|
<div class="logo">
|
|
- <img src="@/assets/img/Layout/logo.png" alt="" />
|
|
|
|
|
|
+ <img
|
|
|
|
+ src="@/assets/img/Layout/logo.png"
|
|
|
|
+ alt=""
|
|
|
|
+ @click="$router.push('/Layout/Home').catch(() => {})"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
<div class="erwei">
|
|
<div class="erwei">
|
|
<img src="@/assets/img/Layout/erwei1.png" alt="" />
|
|
<img src="@/assets/img/Layout/erwei1.png" alt="" />
|
|
@@ -207,24 +219,31 @@ export default {
|
|
//监控data中的数据变化
|
|
//监控data中的数据变化
|
|
watch: {
|
|
watch: {
|
|
$route() {
|
|
$route() {
|
|
- this.menaInd = this.$route.path;
|
|
|
|
- this.meanPage = false;
|
|
|
|
|
|
+ this.routeChange();
|
|
|
|
+ },
|
|
|
|
+ searcShow() {
|
|
|
|
+ this.txt = "";
|
|
},
|
|
},
|
|
- searcShow(){
|
|
|
|
- this.txt=''
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
//方法集合
|
|
//方法集合
|
|
methods: {
|
|
methods: {
|
|
- searcBtn(){
|
|
|
|
- console.log('搜索~');
|
|
|
|
|
|
+ // 封装一个地址栏改变监听$route的方法
|
|
|
|
+ routeChange() {
|
|
|
|
+ this.menaInd = this.$route.path;
|
|
|
|
+ this.meanPage = false;
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ setTimeout(() => {}, 100);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ searcBtn() {
|
|
|
|
+ console.log("搜索~");
|
|
},
|
|
},
|
|
menaSonFu(index) {
|
|
menaSonFu(index) {
|
|
if (this.menaSon === index) this.menaSon = null;
|
|
if (this.menaSon === index) this.menaSon = null;
|
|
else this.menaSon = index;
|
|
else this.menaSon = index;
|
|
},
|
|
},
|
|
skip(path) {
|
|
skip(path) {
|
|
- this.$router.push(path).catch(() => {});
|
|
|
|
|
|
+ this.$router.push(path).catch(() => {});
|
|
},
|
|
},
|
|
toTop() {
|
|
toTop() {
|
|
let dom = this.$refs.Layout;
|
|
let dom = this.$refs.Layout;
|
|
@@ -241,12 +260,11 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
- created() {
|
|
|
|
- this.menaInd = this.$route.path;
|
|
|
|
- this.meanPage = false;
|
|
|
|
- },
|
|
|
|
|
|
+ created() {},
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
- mounted() {},
|
|
|
|
|
|
+ mounted() {
|
|
|
|
+ this.routeChange();
|
|
|
|
+ },
|
|
beforeCreate() {}, //生命周期 - 创建之前
|
|
beforeCreate() {}, //生命周期 - 创建之前
|
|
beforeMount() {}, //生命周期 - 挂载之前
|
|
beforeMount() {}, //生命周期 - 挂载之前
|
|
beforeUpdate() {}, //生命周期 - 更新之前
|
|
beforeUpdate() {}, //生命周期 - 更新之前
|
|
@@ -357,6 +375,7 @@ export default {
|
|
font-size: 30px;
|
|
font-size: 30px;
|
|
right: 10px;
|
|
right: 10px;
|
|
bottom: 200px;
|
|
bottom: 200px;
|
|
|
|
+ z-index: 99;
|
|
}
|
|
}
|
|
// 搜索页面
|
|
// 搜索页面
|
|
.searchBox {
|
|
.searchBox {
|