fix: repair platform admin navigation UI

This commit is contained in:
david
2026-07-28 22:32:08 +08:00
parent abc281b49b
commit e3575465d0
6 changed files with 24 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
<template>
<div class="navbar">
<a-space class="brand">
<img src="@/assets/logo.svg" alt="和气平台" />
<img :src="logoUrl" alt="和气平台" />
<a-typography-title :heading="5" :style="{ margin: 0 }">和气平台总后台</a-typography-title>
<icon-menu-fold v-if="!topMenu && appStore.device === 'mobile'" class="menu-trigger" @click="toggleDrawerMenu" />
</a-space>
@@ -34,6 +34,7 @@
<script setup lang="ts">
import { useDark, useFullscreen, useToggle } from '@vueuse/core';
import { computed, inject } from 'vue';
import logoUrl from '@/assets/logo.svg?url';
import { resolveAvatarUrl } from '@/constants/avatar';
import useUser from '@/hooks/user';
import { useAppStore, useUserStore } from '@/store';

View File

@@ -1,15 +1,13 @@
<template>
<router-view v-slot="{ Component, route }">
<transition name="fade" mode="out-in" appear>
<component
:is="Component"
v-if="route.meta.ignoreCache"
:key="route.fullPath"
/>
<keep-alive v-else :include="cacheList">
<component :is="Component" :key="route.fullPath" />
</keep-alive>
</transition>
<component
:is="Component"
v-if="route.meta.ignoreCache"
:key="route.fullPath"
/>
<keep-alive v-else :include="cacheList">
<component :is="Component" :key="route.fullPath" />
</keep-alive>
</router-view>
</template>

View File

@@ -96,7 +96,7 @@ const routes: AppRouteRecordRaw[] = [
child('gasorder', 'confirms', 'confirms', '确认记录', '/gasorder_confirm', 'delivery', true, 'gasorder-orders'),
child('gasorder', 'payments', 'payments', '订单支付记录', '/gasorder_payment', 'delivery', true, 'gasorder-orders'),
], 'delivery'),
group('ec', 'ec', '商城管理', 'icon-shopping-cart', 70, [
group('ec', 'ec', '商城管理', 'icon-gift', 70, [
child('ec', 'categories', 'categories', '商品分类', '/ec_category'),
child('ec', 'products', 'products', '商品', '/ec_product'),
child('ec', 'attributes', 'attributes', '商品属性', '/ec_product_attribute', 'ec', true, 'ec-products'),
@@ -114,7 +114,7 @@ const routes: AppRouteRecordRaw[] = [
child('wallet', 'refunds', 'refunds', '退款记录', '/wallet_refund'),
child('wallet', 'apply-cash', 'apply-cash', '提现申请', '/wallet_apply_cash'),
]),
group('finance', 'finance', '财务管理', 'icon-fund', 90, [
group('finance', 'finance', '财务管理', 'icon-bar-chart', 90, [
child('finance', 'payments', 'payments', '支付记录', '/fin_payment'),
child('finance', 'settlements', 'settlements', '财务结算', '/fin_settlement'),
child('finance', 'reconciliations', 'reconciliations', '财务对账', '/fin_reconciliation'),

View File

@@ -1,7 +1,7 @@
<template>
<div class="container">
<div class="logo">
<img alt="和气平台" src="@/assets/logo.svg" />
<img alt="和气平台" :src="logoUrl" />
<div class="logo-text">和气平台总后台</div>
</div>
<LoginBanner />
@@ -17,6 +17,7 @@
</template>
<script lang="ts" setup>
import logoUrl from '@/assets/logo.svg?url';
import Footer from '@/components/footer/index.vue';
import LoginBanner from './components/login-banner.vue';
import LoginForm from './components/login-form.vue';

View File

@@ -46,7 +46,6 @@
</a-table-column>
</template>
</a-table>
<a-empty v-if="!loading && list.length === 0" description="暂无符合条件的数据" />
<div class="pagination"><a-pagination :total="total" :current="page" :page-size="pageSize" show-total show-jumper @change="changePage" /></div>
</a-card>

View File

@@ -1,6 +1,14 @@
<template>
<TreePage v-if="definition.pageKind === 'tree'" :definition="definition" />
<CrudListPage v-else :definition="definition" />
<TreePage
v-if="definition.pageKind === 'tree'"
:key="definition.resource"
:definition="definition"
/>
<CrudListPage
v-else
:key="definition.resource"
:definition="definition"
/>
</template>
<script setup lang="ts">