1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-07-27 04:20:43 +08:00

chore: 清理旧文件并重构项目基础结构

- 删除大量废弃的旧代码、依赖和配置文件
- 新增基础项目配置、工具函数、页面模板和请求库
- 重构目录结构,统一项目规范
- 添加commitlint、husky等代码规范工具
This commit is contained in:
小莫唐尼
2026-06-11 02:13:47 +08:00
parent de142c4729
commit 3945ee611d
587 changed files with 34429 additions and 120475 deletions
+37
View File
@@ -0,0 +1,37 @@
import type { TabBar } from '@uni-helper/vite-plugin-uni-pages'
import type { UserRole } from '@/api/types/login'
import type { RemoveLeadingSlashFromUnion } from '@/typings'
/**
* 原生 tabbar 的单个选项配置
*/
export type NativeTabBarItem = TabBar['list'][number] & {
pagePath: RemoveLeadingSlashFromUnion<_LocationUrl>
}
/** badge 显示一个数字或 小红点(样式可以直接在 tabbar/index.vue 里面修改) */
export type CustomTabBarItemBadge = number | 'dot'
/** 自定义 tabbar 的单个选项配置 */
export interface CustomTabBarItem {
text: string
pagePath: RemoveLeadingSlashFromUnion<_LocationUrl>
/** 图标类型,不建议用 image 模式,因为需要配置 2 张图,更麻烦 */
iconType: 'uiLib' | 'unocss' | 'iconfont' | 'image'
/**
* icon 的路径
* - uiLib: wot-design-uni 图标的 icon prop
* - unocss: unocss 图标的类名
* - iconfont: iconfont 图标的类名
* - image: 图片的路径
*/
icon: string
/** 只有在 image 模式下才需要,传递的是高亮的图片 */
iconActive?: string
/** badge 显示一个数字或 小红点 */
badge?: CustomTabBarItemBadge
/** 是否是中间的鼓包tabbarItem */
isBulge?: boolean
// roles 不写 → 所有用户都能看到;roles 写了 → 只有匹配角色可见
roles?: UserRole[]
}