尝试对starter项目的页面进行改变
(资料图)
in SideNav.vue the code for the sidebar menu is:
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 { 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
in SideNav.vue
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)
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掉
之所以是没有直接 =="仪表盘"
这样,是因为如果这样子菜单就没了(原因未知)
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
we get the following result:
it is shown in SideNav.vue:
handleNav("/dashboard/base")">
X 关闭
Copyright © 2015-2022 亚洲服装网版权所有 备案号:豫ICP备20022870号-9 联系邮箱:553 138 779@qq.com