|
|
@@ -20,6 +20,7 @@
|
|
|
<li class="menu" v-for="(item,i) in menus" :key="item.url+'_'+i"
|
|
|
:title="lang===langType.cn?item.text:getLangText(item.text)">
|
|
|
<a :href="item.url" >{{lang===langType.cn?item.text:getAbbrText(item.text)}}</a>
|
|
|
+
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
@@ -30,9 +31,13 @@
|
|
|
<li class="main-menu" v-for="(item,i) in mainMenus"
|
|
|
:key="`main-${item.path}-${i}`"
|
|
|
:title="lang===langType.cn?item.text:getLangText(item.text)"
|
|
|
+ @mouseenter="showSubMenu(item)"
|
|
|
>
|
|
|
<a :href="item.url" >{{lang===langType.cn?item.text:getAbbrText(item.text)}}</a>
|
|
|
- <span class="now" v-if="pageKey===item.key">item.text</span>
|
|
|
+ <span class="now" v-if="pageKey===item.key"></span>
|
|
|
+ <produce-drop
|
|
|
+ v-show="item.showSub"
|
|
|
+ v-if="item.isSub&&item.subKey==='product'"></produce-drop>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<div class="search-box">
|
|
|
@@ -51,6 +56,7 @@
|
|
|
|
|
|
<script>
|
|
|
import langMap from "~/map/langMap";
|
|
|
+import produceDrop from "@/components/header/menuDrops/produceDrop";
|
|
|
export default {
|
|
|
name: "lucencyHeader",
|
|
|
props: {
|
|
|
@@ -61,6 +67,9 @@ export default {
|
|
|
default: "index"
|
|
|
}
|
|
|
},
|
|
|
+ components:{
|
|
|
+ produceDrop
|
|
|
+ },
|
|
|
data(){
|
|
|
return {
|
|
|
langType: langMap.lang,
|
|
|
@@ -105,13 +114,16 @@ export default {
|
|
|
path: "/product.html",
|
|
|
text: "产品中心",
|
|
|
isSub: true,
|
|
|
- sub: []
|
|
|
+ subKey: "product",
|
|
|
+ showSub: false
|
|
|
},
|
|
|
{
|
|
|
key: "solution",
|
|
|
path: "/solution.html",
|
|
|
text: "解决方案",
|
|
|
isSub: true,
|
|
|
+ subKey: "solution",
|
|
|
+ showSub: false
|
|
|
},
|
|
|
{
|
|
|
key: "new",
|
|
|
@@ -151,6 +163,12 @@ export default {
|
|
|
},
|
|
|
searchItem(){
|
|
|
|
|
|
+ },
|
|
|
+ showSubMenu(item){
|
|
|
+ console.log("0000000")
|
|
|
+ if(item.isSub){
|
|
|
+ item.showSub = true;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|