@ -1,52 +1,17 @@
< script setup lang = "ts" >
import { onMounted , reactive , re f } from 'vue'
import { onMounted , ref } from 'vue'
import { useRouter } from "vue-router" ;
let caselist = ref < any > ( [
{
detail : {
title : 'door' , position : 'door'
}
} ,
{
detail : {
title : 'window' , position : 'window'
}
} ,
{
detail : {
title : 'railing and stair' , position : 'rs'
}
} ,
{
detail : {
title : 'Building Materials' , position : 'BM'
}
} ,
{
detail : {
title : 'Kitchen Cabinets with Customization' , position : 'KCwC'
}
} ,
{
detail : {
title : 'Kitchen faucet and sink' , position : 'Kfs'
}
} ,
{
detail : {
title : 'Sanitary Ware' , position : 'SW'
}
} ,
] )
import useHomeStore from '../store/modules/homepage'
let Home = useHomeStore ( )
let productListArr = ref < any > ( [ ] )
let screenWidth = ref < any > ( 0 )
let clickStatus = ref < any > ( false )
let scrollTopShow = ref < any > ( true )
const router = useRouter ( )
onMounted ( async ( ) => {
screenWidth . value = document . body . offsetWidth ;
await getProduct ( )
window . addEventListener ( 'resize' , function ( ) {
screenWidth . value = document . body . offsetWidth ;
} )
@ -67,136 +32,44 @@ const goPage = (url: any) => {
clickStatus . value = false
router . push ( url )
}
/ / c o n s t m o b h e a d F u n = a s y n c ( ) = > {
/ / c l i c k S t a t u s . v a l u e = ! c l i c k S t a t u s . v a l u e
/ / }
const getProduct = async ( ) => {
productListArr . value = [
[ { type : 'Design' , position : 'Ds' } ] ,
[ { type : 'Procurement & Manufacture' , position : 'PM' } ] ,
[ { type : 'Logistic and warehouseing' , position : 'Lw' } ] ,
[ { type : 'Installaion' , position : 'Ts' } ] ,
[ { type : 'quality control' , position : 'qc' } ] ,
]
const mobheadFun = async ( ) => {
clickStatus . value = ! clickStatus . value
}
const projectcaseslist = reactive ( [
[ { type : 'State Street, Carlsbad, CA' , position : 'SSCC' } ] ,
[ { type : 'Lofts on Laurel, San Diego' , position : 'LLSD' } ] ,
[ { type : 'Virgin Hotel,SFO' , position : 'VHS' } ] ,
[ { type : 'GOA, India Wyndham' , position : 'GIW' } ] ,
[ { type : 'METROPICA, MIAMI' , position : 'MM' } ] ,
[ { type : '989 Johnson Street, Victoria,Canada' , position : 'JSV' } ] ,
] )
< / script >
< template >
< div class = "position-relative " >
< div class = "navbar pb-4-px" : class = "scrollTopShow ? '' : 'bg-white'" v-if ="screenWidth > 1200" >
< div class = "navbar pb-4-px" : class = "scrollTopShow ? 'bg-white' : 'bg-white'" v-if ="screenWidth > 1200" >
< div class = "navbar-container" >
< div class = "navbar-header" >
< div class = "navbar-brand" >
< router -link to = "/" class = "text-center" >
< div class = "navbar-brand-logo" : class = "scrollTopShow ? 'white-img' : 'black-img'" > < / div >
<!-- < p :class ="scrollTopShow?'color-fff':'color-0167b1'" class = "font-size-20" > 锁到之处 即小见大 < / p > -- >
<!-- < p :class ="scrollTopShow?'color-fff':'color-0167b1'" class = "font-size-20" > 锁到之处 即小见大 < / p > -- >
< / r o u t e r - l i n k >
< / div >
< / div >
< div class = "site-header-navbar d-flex justify-content-between" >
< div class = "navbar-left width-5" > < / div >
< div class = "navbar-category" >
< div class = "category-item font-size-14 position-relative" >
< div class = "nav-item-title px-1 d-flex align-items-center"
: class = "scrollTopShow ? 'color-fff' : 'color-000'" @ click = "goPage('/')" > Home < / div >
< div class = "dui-dropdown-men position-absolute" >
< div class = "menu-container mt-1" >
< / div >
< / div >
< / div >
< div class = "category-item ml-3 font-size-14 position-relative" >
< div class = "nav-item-title d-flex px-1 align-items-center"
: class = "scrollTopShow ? 'color-fff' : 'color-000'" >
Product Center < / div >
< div class = "dui-dropdown-men position-absolute" >
< div class = "menu-container mt-1" >
< ul >
< li class = "nav-item text-center" v-for ="(item, index) in caselist" :key ="index" >
< div >
< div class = "nav-item-link px-16-px text-overflow-ellipsis" :title ="item.detail.title" > { {
item . detail . title } } < / div >
< / div >
< / li >
< / ul >
< / div >
< / div >
< / div >
< div class = "category-item ml-3 font-size-14 position-relative" >
< div class = "nav-item-title d-flex px-1 align-items-center"
: class = "scrollTopShow ? 'color-fff' : 'color-000'" >
Service < / div >
< div class = "dui-dropdown-men position-absolute" >
< div class = "menu-container mt-1" >
< ul >
< li class = "nav-item text-center" v-for ="(item, index) in productListArr" :key ="index" >
< div >
< div class = "nav-item-link px-16-px text-overflow-ellipsis" :title ="item[0].type" > { { item [ 0 ] . type
} } < / div >
< / div >
< / li >
< / ul >
< / div >
< / div >
< / div >
< div class = "category-item ml-3 font-size-14 position-relative" >
< div class = "category-item ml-3 font-size-14 position-relative" v -for = " item , index in Home. $ state.headerlist "
: key = "index" >
< div class = "nav-item-title d-flex px-1 align-items-center"
: class = "scrollTopShow ? 'color-fff' : 'color-000'" >
Project Cases < / div >
< div class = "dui-dropdown-men position-absolute" >
< div class = "menu-container mt-1" >
< ul >
< li class = "nav-item text-center" v-for ="(item, index) in projectcaseslist" :key ="index" >
< div >
< div class = "nav-item-link px-16-px text-overflow-ellipsis" :title ="item[0].type" > { { item [ 0 ] . type
} } < / div >
< / div >
< / li >
< / ul >
< / div >
< / div >
< / div >
< div class = "category-item ml-3 font-size-14 position-relative" >
< div class = "nav-item-title px-1 d-flex align-items-center"
: class = "scrollTopShow ? 'color-fff' : 'color-000'" >
News < / div >
< div class = "dui-dropdown-men position-absolute" >
: class = "scrollTopShow ? 'color-000' : 'color-000'" >
{ { item . title } } < / div >
< div class = "dui-dropdown-men position-absolute" v-if ="item.children.length > 0" >
< div class = "menu-container mt-1" >
< ul >
< li class = "nav-item text-center" >
< li class = "nav-item text-center" v-for ="(item2, index2) in item.children" :key ="index2" >
< div >
< div class = "nav-item-link px-16-px text-overflow-ellipsis" > 产品试用申请 < / div >
< / div >
< / li >
< li class = "nav-item text-center" >
< div >
< div class = "nav-item-link px-16-px text-overflow-ellipsis" > 产品安装指导 < / div >
< div class = "nav-item-link px-16-px text-overflow-ellipsis" :title ="item2.title" > { {
item2 . title } } < / div >
< / div >
< / li >
< / ul >
< / div >
< / div >
< / div >
< div class = "category-item ml-3 font-size-14 position-relative" >
< div class = "nav-item-title px-1 d-flex align-items-center"
: class = "scrollTopShow ? 'color-fff' : 'color-000'" >
Contact Us < / div >
< div class = "dui-dropdown-men position-absolute" >
< div class = "menu-container mt-1" >
< / div >
< / div >
< / div >
< / div >
< div class = "navbar-right width-10" > < / div >
< / div >
@ -205,51 +78,45 @@ const projectcaseslist = reactive([
< div v-else >
< div class = "MobileHead" >
< div class = "logoimg text-center position-absolute" >
<!-- < img src = "../assets/img/logo1 .png" alt = "深圳市小之物联科技有限公司 " class = "width-100" > -- >
< img src = "../assets/img/logo.png" alt = "montieri " class = "width-100" >
< / div >
< div class = "position-absolute menuIcon color-8c8fa4" >
<!-- < img src = "../assets/img/menu.svg" alt = "菜单栏" class = "width-15" v -if = " ! clickStatus " / > -- >
<!-- < img src = "../assets/img/close.svg" class = "width-15" alt = "关闭菜单栏" @click ="mobheadFun" v-else > - - >
< img src = "../assets/img/menu.svg" alt = "菜单栏" class = "width-15" @click ="mobheadFun" v -if = " ! clickStatus " / >
< img src = "../assets/img/close.svg" class = "width-15" alt = "关闭菜单栏" @click ="mobheadFun" v-else >
< / div >
< div class = "mobmenu" : class = "clickStatus ? 'mobmenu1' : ''" >
< el -menu default -active = " 0 " class = "el-menu-vertical-demo" >
< el -menu -item index = "0" @click ="goPage('/')" >
< span > 首页 < / span >
< span > Home < / span >
< / e l - m e n u - i t e m >
< el -sub -menu index = "1" >
< template # title >
< span > 解决方案 < / span >
< span > Product Center < / span >
< / template >
< el -menu -item : index = "'1-' + index" v-for ="(item, index) in caselist " :key ="index" >
{ { item . detail . title } }
< el -menu -item : index = "'1-' + index" v-for ="(item, index) in Home.$state.headerlist[1].children " :key ="index" >
{ { item . title } }
< / e l - m e n u - i t e m >
< / e l - s u b - m e n u >
< el -sub -menu index = "2" >
< template # title >
< span > 产品中心 < / span >
< span > Service < / span >
< / template >
< el -menu -item : index = "'2-' + index" v-for ="(item, index) in productListArr" :key ="index" > {{ item [ 0 ] .type
} } < / e l - m e n u - i t e m >
< el -menu -item : index = "'2-' + index" v-for ="(item, index) in Home.$state.headerlist[2].children" :key ="index" > {{ item.title }} < / el -menu -item >
< / e l - s u b - m e n u >
< el -sub -menu index = "3" >
< template # title >
< span > 服务支持 < / span >
< span > Project Cases < / span >
< / template >
< el -menu -item index = "3-1" >
< span > 产品试用申请 < / span >
< / e l - m e n u - i t e m >
< el -menu -item index = "3-2" >
< span > 产品安装指导 < / span >
< / e l - m e n u - i t e m >
< el -menu -item : index = "'3-' + index" v-for ="(item, index) in Home.$state.headerlist[3].children" :key ="index" > {{ item.title }} < / el -menu -item >
< / e l - s u b - m e n u >
< el -menu -item index = "4" >
< template # title >
< span > 合作发展 < / span >
< span > News < / span >
< / template >
< / e l - m e n u - i t e m >
< el -menu -item index = "5" >
< template # title >
< span > 联系小之 < / span >
< span > Contact Us < / span >
< / template >
< / e l - m e n u - i t e m >
< / e l - m e n u >
@ -272,7 +139,7 @@ const projectcaseslist = reactive([
font - smoothing : antialiased ;
z - index : 1001 ;
box - sizing : border - box ;
/ / b o x - s h a d o w : 0 0 1 2 p x r g b a ( 0 , 0 , 0 , 0 . 1 2 ) ;
/ / b o x - s h a d o w : 0 0 1 2 p x r g b a ( 0 , 0 , 0 , 0 . 1 2 ) ;
}
. navbar - container {
@ -314,7 +181,7 @@ const projectcaseslist = reactive([
}
. white - img {
background : url ( "../assets/img/logo.png" ) no - repeat ;
background : url ( "../assets/img/logo1 .png" ) no - repeat ;
background - size : 45 % auto ;
background - position : center ;
}