研发图纸文件管理系统-前端项目
iczer
2020-08-12 b2317e32095856962cc4b4f20fcf252e33e3a98b
fix: the problem that select events can't be triggered in menu.js component; :bug: #99
修复:menu.js 组件中 select 事件无法触发的问题;
1个文件已修改
4 ■■■ 已修改文件
src/components/menu/menu.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/menu/menu.js
@@ -175,7 +175,9 @@
    updateMenu () {
      const menuRoutes = this.$route.matched.filter(item => item.path !== '')
      const route = menuRoutes.pop()
      this.selectedKeys = [this.getSelectedKey(route)]
      if(this.selectedKeys.length === 0 || route.meta.invisible) {
        this.selectedKeys = [this.getSelectedKey(route)]
      }
      let openKeys = menuRoutes.map(item => item.path)
      if (!fastEqual(openKeys, this.sOpenKeys)) {
        this.collapsed || this.mode === 'horizontal' ? this.cachedOpenKeys = openKeys : this.sOpenKeys = openKeys