This commit is contained in:
李志鹏
2026-05-19 10:36:47 +08:00
parent bcaeda6217
commit 9eeb29da31
5 changed files with 39 additions and 10 deletions

View File

@@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>test-ssg</title>
<link rel="stylesheet" href="https://at.alicdn.com/t/c/font_4403230_70xz405a1wg.css" />
<link rel="stylesheet" href="https://at.alicdn.com/t/c/font_4403230_cf4g5f65ci.css" />
</head>
<body>
<div id="app"></div>

View File

@@ -1,8 +1,6 @@
<template>
<div class="orders">
<tip-box>
<router-link class="link" to="/">Browse products</router-link>
</tip-box>
<tip-box type="warning" title="No order has been made yet." />
</div>
</template>
<script setup lang="ts">

View File

@@ -0,0 +1,15 @@
<template>
<div class="subscriptions">
<tip-box type="success" title="You have no active subscriptions." />
</div>
</template>
<script setup lang="ts">
import { computed, ref } from 'vue'
import tipBox from './tip-box.vue'
</script>
<style scoped lang="less">
.subscriptions {
width: 100%;
}
</style>

View File

@@ -1,12 +1,20 @@
<template>
<div class="tip-box">
<span class="iconfont icon-info"></span>
<div class="tip">No order has been made yet.</div>
<slot></slot>
<span class="iconfont" :class="[`icon-${type}`]"></span>
<div class="tip">{{ title }}</div>
<router-link v-if="isShowLink" class="link" to="/">Browse products</router-link>
</div>
</template>
<script setup lang="ts">
import { computed, ref } from 'vue'
const props = defineProps({
type: {
default: 'warning',
type: String as () => 'success' | 'warning'
},
title: { default: '', type: String },
isShowLink: { default: true, type: Boolean }
})
</script>
<style scoped lang="less">
@@ -18,12 +26,16 @@
display: flex;
align-items: center;
padding: 0 20px;
> .tip {
flex: 1;
}
> * {
color: #fff;
font-size: 16px;
}
> .iconfont {
margin-right: 10px;
font-size: 18px;
}
> .tip {
flex: 1;
}
}
</style>

View File

@@ -49,6 +49,10 @@ export const routes: RouteRecordRaw[] = [
path: 'orders',
component: () => import('./pages/my-account/orders.vue'),
},
{
path: 'subscriptions',
component: () => import('./pages/my-account/subscriptions.vue'),
},
{
path: ':pathMatch(.*)*',
component: () => import('./pages/my-account/welcome.vue'),