先去掉登录

This commit is contained in:
李志鹏
2026-05-29 10:04:47 +08:00
parent 6415523eef
commit 57f8559020
4 changed files with 64 additions and 45 deletions

View File

@@ -4,7 +4,7 @@
{{ title }}
<span class="iconfont icon-arrow-down-bold"></span>
</div>
<div class="child">
<div class="child" :class="position">
<slot></slot>
</div>
</div>
@@ -16,6 +16,10 @@
title: {
type: String,
default: ''
},
position: {
type: String as () => 'left' | 'right' | 'center',
default: 'left'
}
})
</script>
@@ -69,7 +73,8 @@
background-color: #fff;
display: flex;
flex-direction: column;
transform: translateY(calc(100% + 5px));
--translate-x: 0;
transform: translate(var(--translate-x), calc(100% + 5px));
> * {
display: inline-block;
padding: 10px 15px;
@@ -81,6 +86,17 @@
opacity: 0.5;
}
}
left: 0;
right: auto;
&.right {
left: auto;
right: 0;
}
&.center {
left: 50%;
right: auto;
--translate-x: -50%;
}
}
&:hover > .child {
animation: child-show 0.2s linear both;
@@ -92,7 +108,7 @@
}
100% {
// opacity: 1;
transform: translateY(100%);
transform: translate(var(--translate-x), 100%);
visibility: visible;
}
}

View File

@@ -14,7 +14,10 @@
</div>
</div>
<div class="right" v-show="windowWidth > 1000">
<down-menu :title="langList.find((v) => v.value === locale)?.label || 'English'">
<down-menu
:title="langList.find((v) => v.value === locale)?.label || 'English'"
position="right"
>
<router-link
class="link"
:to="`/${item.value}${path}`"
@@ -25,11 +28,11 @@
{{ item.label }}
</router-link>
</down-menu>
<router-link class="link" to="/my-account">
<!-- <router-link class="link" to="/my-account">
<span class="iconfont icon-tubiao-"></span>
<span v-if="token">{{ $t('MainHeader.MyAccount') }}</span>
<span v-else>{{ $t('MainHeader.LoginOrSignin') }}</span>
</router-link>
</router-link> -->
</div>
<div class="right" v-show="windowWidth <= 1000">
<span class="iconfont icon-caidan" @click="openMainMenu"></span>

View File

@@ -25,11 +25,11 @@
</router-link>
</div>
</div>
<router-link class="link" to="/my-account" @click="close">
<!-- <router-link class="link" to="/my-account" @click="close">
<span class="iconfont icon-tubiao-"></span>
<span v-if="token">{{ $t('MainHeader.MyAccount') }}</span>
<span v-else>{{ $t('MainHeader.LoginOrSignin') }}</span>
</router-link>
</router-link> -->
<div class="lang">
<router-link
class="link"

View File

@@ -54,43 +54,43 @@ export const routes: RouteRecordRaw[] = [
name: 'help-centre',
component: () => import('./pages/help-centre/index.vue')
},
{
path: 'my-account',
name: 'MyAccount',
component: () => import('./pages/my-account/index.vue'),
children: [
{
path: '',
name: 'welcome',
component: () => import('./pages/my-account/welcome.vue'),
},
{
path: 'orders',
name: 'orders',
component: () => import('./pages/my-account/orders.vue'),
},
{
path: 'subscriptions',
name: 'subscriptions',
component: () => import('./pages/my-account/subscriptions.vue'),
},
{
path: 'address',
name: 'address',
component: () => import('./pages/my-account/address.vue'),
},
{
path: 'payment-methods',
name: 'payment-methods',
component: () => import('./pages/my-account/payment-methods.vue'),
},
{
path: ':pathMatch(.*)*',
name: 'not-found-welcome',
component: () => import('./pages/my-account/welcome.vue'),
},
]
},
// {
// path: 'my-account',
// name: 'MyAccount',
// component: () => import('./pages/my-account/index.vue'),
// children: [
// {
// path: '',
// name: 'welcome',
// component: () => import('./pages/my-account/welcome.vue'),
// },
// {
// path: 'orders',
// name: 'orders',
// component: () => import('./pages/my-account/orders.vue'),
// },
// {
// path: 'subscriptions',
// name: 'subscriptions',
// component: () => import('./pages/my-account/subscriptions.vue'),
// },
// {
// path: 'address',
// name: 'address',
// component: () => import('./pages/my-account/address.vue'),
// },
// {
// path: 'payment-methods',
// name: 'payment-methods',
// component: () => import('./pages/my-account/payment-methods.vue'),
// },
// {
// path: ':pathMatch(.*)*',
// name: 'not-found-welcome',
// component: () => import('./pages/my-account/welcome.vue'),
// },
// ]
// },
{ path: 'privacy-policy',
name: 'privacy-policy',
component: () => import('./pages/others/privacy-policy.vue')