实现权限驱动的首页 Tab 并对齐 Android
This commit is contained in:
28
suixinkan/Features/Home/Models/HomeMenuItem.swift
Normal file
28
suixinkan/Features/Home/Models/HomeMenuItem.swift
Normal file
@ -0,0 +1,28 @@
|
||||
//
|
||||
// HomeMenuItem.swift
|
||||
// suixinkan
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
/// 首页菜单展示项,由服务端权限 URI 与本地 catalog 合并而成。
|
||||
struct HomeMenuItem: Equatable, Hashable, Sendable {
|
||||
let uri: String
|
||||
let title: String
|
||||
let iconName: String
|
||||
let serverName: String
|
||||
|
||||
init(uri: String, title: String, iconName: String, serverName: String = "") {
|
||||
self.uri = uri
|
||||
self.title = title
|
||||
self.iconName = iconName
|
||||
self.serverName = serverName
|
||||
}
|
||||
|
||||
/// 固定的「更多功能」入口。
|
||||
static let moreFunctions = HomeMenuItem(
|
||||
uri: "more_functions",
|
||||
title: "更多功能",
|
||||
iconName: "square.grid.2x2"
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user