商品管理新增分布表单,修改部分表单项,首页移除自定义面板

This commit is contained in:
ctw committed 2024-12-27 18:32:12 +08:00
1 parent 8b863ccd96
commit 0a34e1e894
9 files changed
+500 -543

No files matched your search

+8 -10
View File
@@ -1,7 +1,6 @@
<template>
<div>
<navMmenu />
<div v-if="pageLoading">
<navMmenu />
<!-- <div v-if="pageLoading">
<el-main>
<el-card shadow="never">
<el-skeleton :rows="1"></el-skeleton>
@@ -11,17 +10,16 @@
</el-card>
</el-main>
</div>
<widgets />
</div>
<widgets /> -->
</template>
<script setup lang="ts" name="dashboard">
import navMmenu from './navMenu/index.vue';
const Widgets = defineAsyncComponent(() => import('./widgets/index.vue'));
const pageLoading = ref(true);
// const Widgets = defineAsyncComponent(() => import('./widgets/index.vue'));
// const pageLoading = ref(true);
onMounted(() => {
pageLoading.value = false;
});
// onMounted(() => {
// pageLoading.value = false;
// });
</script>
+13 -8
View File
@@ -1,10 +1,10 @@
<template>
<el-card class="box-card p-10" style="min-height: 40vw; background-image: linear-gradient(0deg, #ffffff 0%, #d3f9f1aa 100%)" v-loading="loading">
<el-card class="card" v-loading="loading">
<el-row>
<el-col :span="4" v-for="(item, index) in navMenuListTop" :key="index">
<div :class="['nav-menu-item-top', item.id == currentActiveMenuId ? 'nav-menu-item-active' : '']" @click="currentActiveMenuId = item.id">
<el-image class="nav-menu-item-icon" :src="imageBaseUrl + item.menuPic" fit="cover" />
<div class="nav-menu-item-name">{{ item.name }}</div>
<div class="nav-menu-item-name">{{ $t(item.name) }}</div>
</div>
</el-col>
</el-row>
@@ -13,7 +13,7 @@
<el-col :span="3" v-for="(item, index) in navMenuListBottom" :key="index">
<div class="nav-menu-item-bottom" @click="handleClickBottomMenu(item)">
<el-image class="nav-menu-item-icon" :src="imageBaseUrl + item.menuPic" fit="cover" />
<div class="nav-menu-item-name">{{ item.name }}</div>
<div class="nav-menu-item-name">{{ $t(item.name) }}</div>
</div>
</el-col>
</el-row>
@@ -22,10 +22,11 @@
<script setup lang="ts">
import { ref } from 'vue';
import { pageList } from '/@/api/admin/menu';
import { ElMessage } from 'element-plus';
import { useMenuApi } from '/@/api/admin/menu';
const router = useRouter();
const menuApi = useMenuApi();
const loading = ref(false);
const navMenuList = ref<any>([]);
const navMenuListTop = ref<any>([]);
@@ -36,7 +37,7 @@ const imageBaseUrl = import.meta.env.VITE_IMAGE_BASE_PATH;
const getNavMenuList = async () => {
loading.value = true;
try {
const res = await pageList({ current: 1, size: 999 }).finally(() => {
const res = await menuApi.getAdminMenu().finally(() => {
loading.value = false;
});
if (res.code == 0 && res.data.length > 0) {
@@ -72,6 +73,11 @@ onMounted(async () => {
</script>
<style scoped lang="scss">
.card {
padding: 5vw;
height: 100%;
background-image: linear-gradient(0deg, #ffffff 0%, #d3f9f1aa 100%);
}
.nav-menu-item-top {
height: 6.5vw;
padding: 0.5vw;
@@ -82,8 +88,8 @@ onMounted(async () => {
justify-content: space-around;
background-color: #f9f9f9;
border-radius: 1rem;
cursor: pointer;
overflow: hidden;
cursor: pointer;
.nav-menu-item-icon {
width: 2.5vw;
@@ -103,7 +109,7 @@ onMounted(async () => {
.nav-menu-item-bottom {
min-height: 4vw;
margin: 1vw;
margin: 1vw 2vw;
display: flex;
flex-direction: column;
align-items: center;
@@ -127,7 +133,6 @@ onMounted(async () => {
@media (max-width: 768px) {
.nav-menu-item-top {
height: 10vw;
padding: 1vw;
margin: 1vw;
.nav-menu-item-icon {