You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
416 B
25 lines
416 B
enum Operation { |
|
/// 创建 |
|
create, |
|
|
|
/// 修改 |
|
update, |
|
|
|
/// 删除 |
|
delete, |
|
} |
|
|
|
/// Operation 枚举的扩展方法 |
|
extension OperationExtension on Operation { |
|
/// 获取操作的中文名 |
|
String get name { |
|
switch (this) { |
|
case Operation.create: |
|
return '创建'; |
|
case Operation.update: |
|
return '修改'; |
|
case Operation.delete: |
|
return '删除'; |
|
} |
|
} |
|
}
|
|
|