11 2018 档案

摘要:为什么很多人用 if...else..if 而不使用 switch 1,if...else...if 只是单纯地一个接一个比较;if...else可能每个条件都计算一遍; 2,switch 使用了Binary Tree算法;绝大部分情况下switch会快一点,除非是if-else的第一个条件就判断到 阅读全文
posted @ 2018-11-23 16:33 ermao的博客 阅读(392) 评论(0) 推荐(0)
摘要:在 vue 脚手架开发中,echarts图表自适应容器的方法: 父组件: <template> <div class="statistics_wrap"> <v-fir-grade ref="first"></v-fir-grade> </div> </template> <script> impo 阅读全文
posted @ 2018-11-22 10:49 ermao的博客 阅读(4267) 评论(0) 推荐(0)