un-pany / v3-admin Goto Github PK
View Code? Open in Web Editor NEW☀️ A vue3 admin template, based on 'vue-cli'
Home Page: https://un-pany.github.io/v3-admin
License: MIT License
☀️ A vue3 admin template, based on 'vue-cli'
Home Page: https://un-pany.github.io/v3-admin
License: MIT License
脚手架不是vite吗?
// 当一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式
// 只有一个时,会将那个子路由当做根路由显示在侧边栏
// 若想不管路由下面的 children 声明的个数都显示你的根路由
// 可以设置alwaysShow: true,这样就会忽略之前定义的规则,一直显示根路由
alwaysShow: true
看文档我以为是把根路由下的子路由放到侧边栏,和监控,权限管理菜单同级别显示,但是设置了true和false都没变.
没办法实现,我又自己写了代码实现的.
<template v-if="!alwaysShowRootMenu && theOnlyOneChild && !theOnlyOneChild.children">
<SidebarItemLink v-if="theOnlyOneChild.meta" :to="resolvePath(theOnlyOneChild.path)">
<!-- 原代码 -->
</SidebarItemLink>
</template>
<template v-else>
<template v-if="!alwaysShowRootMenu && childrenShowOut">
<SidebarItemLink v-for="child in childrenShowOut" :key="child?.path" :to="resolvePath(child?.path)">
<!-- 原代码 -->
</SidebarItemLink>
</template>
<el-sub-menu v-else :index="resolvePath(item.path)" popper-append-to-body>
<!-- 原代码 -->
</el-sub-menu>
</template>
const childrenShowOut = computed(() => {
if (showingChildNumber.value <= 1) {
return null
}
// 把根目录下的路由提取到一级菜单
if (props.item.path !== '/') return null
if (props.item.children) {
return props.item.children.filter(item => {
return item
})
}
return { ...props.item, path: '' }
})
ts我不熟, v-for="child in childrenShowOut"
会报警告,不知道怎么解决....
login timeout
使用tag标签切换页面 表单里的内容没有缓存,请问这个怎么加一下
Click here: https://github.com/un-pany/v3-admin-vite
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.