设计模式-策略模式
vue中应用策略模式
减少if elseif 判断
使代码更加简洁,易于拓展
1 | <template> |
- 标题: 设计模式-策略模式
- 作者: Voun
- 创建于 : 2024-06-17 16:24:55
- 更新于 : 2024-08-13 05:34:44
- 链接: http://www.voun.top/2024/06/17/23-设计模式-策略模式/
- 版权声明: 本文章采用 CC BY-NC-SA 4.0 进行许可。
评论
vue中应用策略模式
减少if elseif 判断
使代码更加简洁,易于拓展
1 | <template> |