ludc
2025-01-16 986aa62ed00bee39363bab41b4eeb8259d446efd
Source/plt-web/plt-web-ui/src/router/avue-router.js
@@ -98,10 +98,10 @@
      // 设置 props默认值 作用就是将字段设置成配置的
      const propsDefault = {
        label: propsConfig.label || 'name',
        path: 'code',
        code: 'code',
        path: propsConfig.path,
        code: 'id',//取唯一标识
        pathValue: 'pathValue',
        icon: propsConfig.icon || 'icon',
        icon: propsConfig.icon || 'source',
        children: propsConfig.children || 'children',
        meta: propsConfig.meta || 'meta',
      }
@@ -150,6 +150,7 @@
          icon = oMenu[propsDefault.icon],
          children = oMenu[propsDefault.children],
          meta = oMenu[propsDefault.meta] || {};
        meta.keepAlive=true;
        // meta中 keepalive 的处理
        meta = Object.assign(meta, (function () {
          if (option.keepAlive === true) {
@@ -181,7 +182,7 @@
          meta: meta,
          redirect: (() => {
            // 第一次进来但是没有子路由的 需要添加redirect
            if (!isChild && first && !isURL(path)) return `${path}/index`
            if (!isChild && first && !isURL(path)) return `/${code}/index`
            else return '';
          })(),
          // 整理子路由的route 配置