{"remainingRequest":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/mer.ws.baibaodun.com.cn/src/components/Breadcrumb/index.vue?vue&type=script&lang=js","dependencies":[{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/src/components/Breadcrumb/index.vue","mtime":1701742078541},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n// +----------------------------------------------------------------------\n// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]\n// +----------------------------------------------------------------------\n// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.\n// +----------------------------------------------------------------------\n// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权\n// +----------------------------------------------------------------------\n// | Author: CRMEB Team <admin@crmeb.com>\n// +----------------------------------------------------------------------\n\nimport pathToRegexp from 'path-to-regexp';\n\nexport default {\n  data() {\n    return {\n      levelList: null,\n    };\n  },\n  watch: {\n    $route(route) {\n      // if you go to the redirect page, do not update the breadcrumbs\n      if (route.path.startsWith('/redirect/')) {\n        return;\n      }\n      this.getBreadcrumb();\n    },\n  },\n  created() {\n    this.getBreadcrumb();\n  },\n  methods: {\n    getBreadcrumb() {\n      // only show routes with meta.title\n      let matched = this.$route.matched.filter((item) => item.meta && item.meta.title);\n      const first = matched[0];\n\n      if (!this.isDashboard(first)) {\n        matched = [{ path: '/dashboard', meta: { title: '主页' } }].concat(matched);\n      }\n\n      this.levelList = matched.filter((item) => item.meta && item.meta.title && item.meta.breadcrumb !== false);\n    },\n    isDashboard(route) {\n      const name = route && route.name;\n      if (!name) {\n        return false;\n      }\n      return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase();\n    },\n    pathCompile(path) {\n      // To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561\n      const { params } = this.$route;\n      var toPath = pathToRegexp.compile(path);\n      return toPath(params);\n    },\n    handleLink(item) {\n      const { redirect, path } = item;\n      if (redirect) {\n        this.$router.push(redirect);\n        return;\n      }\n      this.$router.push(this.pathCompile(path));\n    },\n  },\n};\n",null]}