// 枚举 enum Action { case GetUser case DeleteUser case UpdateUser } var action = Action.GetUser action = .UpdateUser switch action { case .GetUser: print("获取") case .DeleteUser: print("删除") case .UpdateUser: print("更新") }
// 枚举 enum Action { case GetUser case DeleteUser case UpdateUser } var action = Action.GetUser action = .UpdateUser switch action { case .GetUser: print("获取") case .DeleteUser: print("删除") case .UpdateUser: print("更新") }