尝试对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 初步练习的更多相关文章

  1. Kubernetes初步

    Kubernetes是Google开源的容器集群管理系统.它构建于docker技术之上.为容器化的应用提供资源调度.部署执行.服务发现.扩容缩容等整一套功能.本质上可看作是基于容器技术的mini-Pa ...

  2. 移动端之Android开发的几种方式的初步体验

    目前越来越多的移动端混合开发方式,下面列举的大多数我都略微的尝试过,就初步的认识写个简单的心得: 开发方式 开发环境 是否需要AndroidSDK 支持跨平台 开发语言&技能 MUI Win+ ...

  3. CSharpGL(29)初步封装Texture和Framebuffer

    +BIT祝威+悄悄在此留下版了个权的信息说: CSharpGL(29)初步封装Texture和Framebuffer +BIT祝威+悄悄在此留下版了个权的信息说: Texture和Framebuffe ...

  4. Android自定义View初步

    经过上一篇的介绍,大家对于自定义View一定有了一定的认识,接下来我们就以实现一个图片下显示文字的自定义View来练习一下.废话不多说,下面进入我们的正题,首先看一下我们的思路,1.我们需要通过在va ...

  5. 初步认识Node 之Node为何物

    很多人即便是在使用了Node之后也不知道它到底是什么,阅读完本文你应该会有一个初步的.具体的概念了.    Node的目标 提供一种简单的构建可伸缩网络程序的方法.那么,什么是可伸缩网络程序呢?可伸缩 ...

  6. [入门级] 基于 visual studio 2010 mvc4 的图书管理系统开发初步 (二)

    [入门级] 基于 visual studio 2010 mvc4 的图书管理系统开发初步 (二) Date  周六 10 一月 2015 By 钟谢伟 Category website develop ...

  7. 基于C/S架构的3D对战网络游戏C++框架 _05搭建系统开发环境与Boost智能指针、内存池初步了解

    本系列博客主要是以对战游戏为背景介绍3D对战网络游戏常用的开发技术以及C++高级编程技巧,有了这些知识,就可以开发出中小型游戏项目或3D工业仿真项目. 笔者将分为以下三个部分向大家介绍(每日更新): ...

  8. Azure底层架构的初步分析

    之所以要写这样的一篇博文的目的是对于大多数搞IT的人来说,一般都会对这个topic很感兴趣,因为底层架构直接关乎到一个公有云平台的performance,其实最主要的原因是我们的客户对此也非常感兴趣, ...

  9. CozyRSS开发记录14-RSS源管理初步完工

    CozyRSS开发记录14-RSS源管理初步完工 1.添加源的响应 DialogHost.Show有几个版本的重载,加一个DialogClosingEventHandler参数.我们让添加源对话框的添 ...

  10. 初步了解CPU

    了解CPU By JackKing_defier 首先说明一下,本文内容主要是简单说明CPU的大致原理,所需要的前提知识我会提出,但是由于篇幅我不会再详细讲解需要的其他基础知识.默认学过工科基础课. ...

随机推荐

  1. vue项目浏览器ioc小图标

    1 先有一个需要图片,png .jpg ...格式都可以 2 把图片转换成 .con 格式的图标  ,http://www.bitbug.net/使用比特虫转换 ,目标尺寸:16*16 或者 32*3 ...

  2. IntelliJ IDEA 最新激活破解教程,永久激活,亲测有效

    使用ja-netfilter激活Jetbrains系列软件 注意:无限试用脚本已经失效.本教程适合2021.3.*之上的高版本,使用ja-netfilter插件进行激活操作,永久有效 激活步骤: 第一 ...

  3. SpringBoot - Lombok使用详解1(基本介绍、安装配置、var和val)

    我们创建 POJO 类时,经常需要先写属性,然后手写或者自动生成 get 和 set 方法,然后还要重写 toString 方法....一系列操作下来,这个 POJO 类便会产生太多的样板式代码. 这 ...

  4. SpringMvc配置和原理

    运行原理 DispatcherServlet通过HandlerMapping在MVC的容器中找到处理请求的Controller,将请求提交给Controller,Controller对象调用业务层接口 ...

  5. centos7部署teleport堡垒机

    Centos7.9部署Teleport堡垒机 简介 Teleport是一款简单易用的开源堡垒机系统,具有小巧.易用的特点,支持 RDP/SSH/SFTP/Telnet 协议的远程连接和审计管理.Tel ...

  6. 1.Vue概述

    一.Vue的创建者及Vue的历史 尤雨溪老师:Vue.js的创建者 2014年2月,Vue.js正式发布 2015年10月27日,正式发布1.0.0 2016年4月27日,发布2.0的预览版本 二.V ...

  7. Laravel自定义JSON错误消息 The given data was invalid.

    Laravel自定义错误消息 在Laravel验证请求时出现错误,默认会返回如下的错误: 可以看到JSO结构中的message为The given data was invalid.而并非是我们具体自 ...

  8. python,数据类型和变量,数据类型和变量,集合,字符串拼接

    可不可变: 可变:列表,字典 不可变:字符串,数字,元祖 访问顺序: 直接访问:数字 顺序访问:字符串,列表,元祖 映射:字典 存放元素个数 容器类型:列表,元祖,字典 原子:数字,字符串 集合 1. ...

  9. 使用python来搭建一个简易的文件下载环境以及用droopy来实现一个文件上传环境

    ubuntu在安装的时候一般都是自带python环境的,大家可以查看一下查看demo如下 用于共享的命令很简单python2: python -m SimpleHTTPServer 8888pytho ...

  10. jquery input标签的禁用和启用disabled

    input框使用disabled后 input 元素既不可用,也不可点击.可以设置 disabled 属性,直到满足某些其他的条件为止(比如选择了一个复选框等等).然后,就需要通过 JavaScrip ...