JavaScript 代码优化:处理默认选项和特殊角色
// 优化后的代码 let activeTabKey = option.activeTabKey || this.rolesPower[this.role].dailyTabsList[0].key; if (this.role === '总经理') { activeTabKey = this.rolesPower[this.role].dailyTabsList[0].key; }
原文地址: https://www.cveoy.top/t/topic/mKeJ 著作权归作者所有。请勿转载和采集!