|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
- <div class="search-camera" :style="{paddingLeft: split+'px'}">
|
|
|
- <router-link :to="item.to" tag="a" class="camera" v-for="(item,i) in arr" :key="i">
|
|
|
+ <div class="search-camera" :style="{paddingLeft: split+'px'}" :class="{active: active}" ref="layout">
|
|
|
+ <router-link :to="item.to" tag="a" class="camera" v-for="(item,i) in arr" :key="i" :style="{transitionDelay: i*50+'ms'}">
|
|
|
<vcenter>
|
|
|
<i class="iconfont" :class="item.icon"></i>
|
|
|
<div style="margin-top:10px;">{{item.name}}</div>
|
|
@@ -72,11 +72,11 @@ const setting = {
|
|
|
name: '电商',
|
|
|
to: {name: 'service_support'}
|
|
|
}, {
|
|
|
- icon: 'icon-icon_industry_catering',
|
|
|
+ icon: 'icon-industry_catering',
|
|
|
name: '餐饮',
|
|
|
to: {name: 'service_list', params: {id: 'clause'}}
|
|
|
}, {
|
|
|
- icon: 'icon-icon_industry_app',
|
|
|
+ icon: 'icon-industry_app',
|
|
|
name: 'app',
|
|
|
to: {name: 'service_list', params: {id: 'clause'}}
|
|
|
}
|
|
@@ -92,13 +92,40 @@ export default {
|
|
|
default: ''
|
|
|
}
|
|
|
},
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ active: false,
|
|
|
+ arr: undefined
|
|
|
+ }
|
|
|
+ },
|
|
|
components: {
|
|
|
vcenter
|
|
|
},
|
|
|
- computed: {
|
|
|
- arr () {
|
|
|
- return setting[this.origin]
|
|
|
+ watch: {
|
|
|
+ origin: {
|
|
|
+ handler (newVal, oldVal) {
|
|
|
+ if (oldVal) {
|
|
|
+ this.active = false
|
|
|
+ setTimeout(() => {
|
|
|
+ this.showNav()
|
|
|
+ }, 400 + 50 * setting[oldVal].length)
|
|
|
+ } else {
|
|
|
+ this.active = false
|
|
|
+ this.showNav()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ immediate: true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ showNav () {
|
|
|
+ this.arr = setting[this.origin]
|
|
|
+ setTimeout(() => {
|
|
|
+ this.active = true
|
|
|
+ }, 100)
|
|
|
}
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -119,10 +146,12 @@ $lHeight: 145px;
|
|
|
line-height: 1;
|
|
|
text-align: center;
|
|
|
font-size: 14px;
|
|
|
- color: #787878;
|
|
|
+ color: #b6b6b6;
|
|
|
cursor: pointer;
|
|
|
height: 100%;
|
|
|
- transition: color .3s linear;
|
|
|
+ transition: all .7s cubic-bezier(.77, 0, .175, 1);
|
|
|
+ transform: translateX(100px);
|
|
|
+ opacity: 0;
|
|
|
|
|
|
&:hover {
|
|
|
color: #000;
|
|
@@ -132,5 +161,12 @@ $lHeight: 145px;
|
|
|
font-size: 60px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ &.active {
|
|
|
+ .camera {
|
|
|
+ opacity: 1;
|
|
|
+ transform: translateX(0)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|