AIArena Frontend 初步练习
尝试对starter项目的页面进行改变
修改侧边栏,只留下最上面的「仪表盘」和「列表页」两个大模块

in SideNav.vue the code for the sidebar menu is:
<menu-content :navData="menu" />
from there we can get to MenuContent.vue
I think it is referencing the items in a list, which is computed by the getMenuList function
computed: {
list(): Array<MenuRoute> {
return getMenuList(this.navData);
},
},
const getMenuList = (list: MenuRoute[], basePath?: string): MenuRoute[] => {
if (!list) {
return [];
}
return list
.map((item) => {
const path = basePath && !item.path.includes(basePath) ? `${basePath}/${item.path}` : item.path;
return {
path,
title: item.meta?.title,
icon: item.meta?.icon || '',
children: getMenuList(item.children, path),
meta: item.meta,
redirect: item.redirect,
};
})
.filter((item) => item.meta && item.meta.hidden !== true);
};
and the list is from MenuRoute, and that is from '@/interface'
but it is just definition in there it seems:
export interface MenuRoute {
path: string;
title?: string;
icon?:
| string
| {
render: () => void;
};
redirect?: string;
children: MenuRoute[];
meta: any;
}
so the point is, where is the this.navData sent into getMenuList
it seems navData is sent in from something like
<menu-content v-if="item.children" :nav-data="item.children" />
in SideNav.vue
<menu-content :navData="menu" />
and that menu is here:
export default Vue.extend({
name: 'sideNav',
components: {
MenuContent,
},
props: {
menu: Array,
showLogo: {
type: Boolean,
default: true,
},
the menu here is sent in from LayoutSidebar.vue(supposedly)
<side-nav
v-if="showSidebar"
:showLogo="showSidebarLogo"
:layout="setting.layout"
:isFixed="setting.isSidebarFixed"
:menu="sideMenu"
:theme="mode"
:isCompact="setting.isSidebarCompact"
:maxLevel="setting.splitMenu ? 2 : 3"
/>
and this sideMenu is from that same file
sideMenu() {
const { layout, splitMenu } = this.$store.state.setting;
let { menuRouters } = this;
if (layout === 'mix' && splitMenu) {
menuRouters.forEach((menu) => {
if (this.$route.path.indexOf(menu.path) === 0) {
menuRouters = menu.children.map((subMenu) => ({ ...subMenu, path: `${menu.path}/${subMenu.path}` }));
}
});
}
return menuRouters;
},
but what is this.$store.state.setting?
there is the file src/store/index.ts, and that is from src/store/modules/setting.ts
可是还是没有找到,只能出此下策:
在 MenuContent.vue里面加入一个if判断,把要删的页面全部filter掉
<template v-for="item in list">
<template v-if="item.title != '表单页' && item.title != '详情页' && item.title != '外部页面' && item.title != '结果页' && item.title != '个人页' && item.title != '登录页'">
之所以是没有直接 =='仪表盘'这样,是因为如果这样子菜单就没了(原因未知)
result:

尝试修改基础列表页,将列表中的「合同编号」这一列删去

seems to be in layouts/pages/list/base/index.vue
110:合同编号
// { title: '合同状态', colKey: 'status', width: 200, cell: { col: 'status' } },
// {
// title: '合同编号',
// width: 200,
// ellipsis: true,
// colKey: 'no',
// },
success!

尝试替换页面的主logo为任意其他logo

把public/favicon.ico改了之后:

the svg of logs and images are in src/assets
assets-t-logo.svg is the small T logo
assets-logo-full.svg is the larger logo including Tencent Design
let's try to change the large one. after copying the following into assets-logo-full.svg
<?xml version="1.0" encoding="UTF-8"?><svg width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M32.4853 24.4853C34.6569 22.3137 36 19.3137 36 16C36 9.37258 30.6274 4 24 4C17.3726 4 12 9.37258 12 16C12 19.3137 13.3431 22.3137 15.5147 24.4853" stroke="#333" stroke-width="4" stroke-linecap="round"/><path d="M6 44L7 39L18 31L24 37L30 31L41 39L42 44" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M12.9934 21.0071C13.0061 16.8965 13.6749 13.8941 15 11.9999C16.9877 9.15871 18.387 9.36755 19.4054 9.81009C20.4238 10.2526 21.0226 13.1442 22.7236 13.9777C24.4246 14.8112 28.7777 14.9141 30.2687 15.9167C31.7597 16.9194 35.1696 18.7844 34.3195 21.9684" stroke="#333" stroke-width="4"/></svg>
we get the following result:

it is shown in SideNav.vue:
<template #logo>
<span v-if="showLogo" :class="`${prefix}-side-nav-logo-wrapper`" @click="() => handleNav('/dashboard/base')">
<component :is="getLogo" :class="`${prefix}-side-nav-logo-${collapsed ? 't' : 'tdesign'}-logo`" />
</span>
</template>
AIArena Frontend 初步练习的更多相关文章
- Kubernetes初步
Kubernetes是Google开源的容器集群管理系统.它构建于docker技术之上.为容器化的应用提供资源调度.部署执行.服务发现.扩容缩容等整一套功能.本质上可看作是基于容器技术的mini-Pa ...
- 移动端之Android开发的几种方式的初步体验
目前越来越多的移动端混合开发方式,下面列举的大多数我都略微的尝试过,就初步的认识写个简单的心得: 开发方式 开发环境 是否需要AndroidSDK 支持跨平台 开发语言&技能 MUI Win+ ...
- CSharpGL(29)初步封装Texture和Framebuffer
+BIT祝威+悄悄在此留下版了个权的信息说: CSharpGL(29)初步封装Texture和Framebuffer +BIT祝威+悄悄在此留下版了个权的信息说: Texture和Framebuffe ...
- Android自定义View初步
经过上一篇的介绍,大家对于自定义View一定有了一定的认识,接下来我们就以实现一个图片下显示文字的自定义View来练习一下.废话不多说,下面进入我们的正题,首先看一下我们的思路,1.我们需要通过在va ...
- 初步认识Node 之Node为何物
很多人即便是在使用了Node之后也不知道它到底是什么,阅读完本文你应该会有一个初步的.具体的概念了. Node的目标 提供一种简单的构建可伸缩网络程序的方法.那么,什么是可伸缩网络程序呢?可伸缩 ...
- [入门级] 基于 visual studio 2010 mvc4 的图书管理系统开发初步 (二)
[入门级] 基于 visual studio 2010 mvc4 的图书管理系统开发初步 (二) Date 周六 10 一月 2015 By 钟谢伟 Category website develop ...
- 基于C/S架构的3D对战网络游戏C++框架_05搭建系统开发环境与Boost智能指针、内存池初步了解
本系列博客主要是以对战游戏为背景介绍3D对战网络游戏常用的开发技术以及C++高级编程技巧,有了这些知识,就可以开发出中小型游戏项目或3D工业仿真项目. 笔者将分为以下三个部分向大家介绍(每日更新): ...
- Azure底层架构的初步分析
之所以要写这样的一篇博文的目的是对于大多数搞IT的人来说,一般都会对这个topic很感兴趣,因为底层架构直接关乎到一个公有云平台的performance,其实最主要的原因是我们的客户对此也非常感兴趣, ...
- CozyRSS开发记录14-RSS源管理初步完工
CozyRSS开发记录14-RSS源管理初步完工 1.添加源的响应 DialogHost.Show有几个版本的重载,加一个DialogClosingEventHandler参数.我们让添加源对话框的添 ...
- 初步了解CPU
了解CPU By JackKing_defier 首先说明一下,本文内容主要是简单说明CPU的大致原理,所需要的前提知识我会提出,但是由于篇幅我不会再详细讲解需要的其他基础知识.默认学过工科基础课. ...
随机推荐
- vue中关于get传参数为数组的解决方法
按理来说,get请求方式是没有数组的,get请求方式带参数都是字符串,需要和后端协商是用某个标识符分割开,例如"|" ",". 当然如果需要数组的话,也能解 ...
- C#——》发布ASP.NET Core项目到Windows IIS服务器中环境部署
服务器:Windows Server2012 R2 IIS:8 .net Core版本:1.1.2 一,在VS中点击项目-->依赖项-->SDK下可以查看当前项目.Net core是哪个版 ...
- java 操作excel
需要引入的包 import org.apache.poi.hssf.usermodel.*; import org.apache.poi.ss.usermodel.HorizontalAlignmen ...
- ceph pg修复过程
1.通过命令查看哪些pg状态不一致 ceph pg dump|grep inconsistent 2.根据输出的pg id 进行一致性检查 ceph pg scrub 1.23 instructing ...
- Linux SMB传输文件命令
如何将linux服务器上的文件上传到华为NAS 如何登录华为NAS 首先登陆smb服务器, 不要账户名密码登录: smbclient -N \/\/192.168.0.1/共享 文件上传命令: 注意: ...
- js过滤filter 按条件过滤
const dataList = this.formData.tableData.filter(item => item.name !== '');
- CF1338E JYPnation
题意:给定一个竞赛图,且其中不包含任意一组三元环 $(a, b, c)$,满足 $a \to d$,$b \to d$,$c \to d$,求每个点两两之间的距离之和(若无法达到即为 $614n$). ...
- MySql 在 Linux 下的安装与基础配置
使用版本:Mysql (5.7) Linux(CentOS 7.2) 1.安装 1)下载MySQL官方的 Yum Repository wget -i -c http://dev.mysql.com/ ...
- IT工具知识-10:Markdown小技巧(不断更新)
Markdown小技巧 1. 如何实现在文内不同关键字间跳转 该技巧是基于typora软件下使用的,参考的这个教程:视频链接 该教程有两种跳转方式:一.使用Markdown语法,二.使用HTML的锚点 ...
- C知识点
1.变量在内存中所占存储空间的首地址,称为该变量的地址:而变量在存储空间中存放的数据,即变量的值. C语言中,指针就是变量的地址.一个变量的值是另一个变量的地址,且变量类型相同,则称该变量为指针变量. ...