wangting
2023-07-21 bfedaf0182cac8fb947f1b0a3dee3d07c3c24f1e
Source/UBCS-WEB/public/src/router/avue-router.js
@@ -99,8 +99,6 @@
      const propsDefault = {
        label: propsConfig.label || 'name',
        path: propsConfig.path || 'path',
        fullPath: propsConfig.fullPath || 'fullPath',
        query:propsConfig.query || 'query',
        icon: propsConfig.icon || 'icon',
        children: propsConfig.children || 'children',
        meta: propsConfig.meta || 'meta',
@@ -119,23 +117,9 @@
            } else {
              return oMenu[propsDefault.path]
            }
          })();
        let fullPath=path;
        let query=oMenu[propsDefault.query] || {};
        if(path.indexOf('?')!=-1){
          let params=path.split('?')[1].split('&');
          path=path.split('?')[0]
          params.forEach(pitem=>{
            try {
              query[pitem.split('=')[0]]=pitem.split('=')[1];
            }catch (e) {
              query[pitem.split('=')[0]]=null;
            }
          })
        }
          })(),
          //特殊处理组件 执行完这个 component 也就是精确到具体的文件了  views文件夹下面就是具体的页面代码
          let component = 'views' + path,
          component = 'views' + oMenu.path,
          name = oMenu[propsDefault.label],
          icon = oMenu[propsDefault.icon],
          children = oMenu[propsDefault.children],
@@ -152,8 +136,6 @@
        const isChild = children.length !== 0;
        const oRouter = {
          path: path,
          fullPath:fullPath,
          query:query,
          component(resolve) {
            // 判断是否为首路由
            if (first) {