Files
tekelanew_acs/acs/nladmin-ui/node_modules/.cache/vue-loader/375fc9ebbc19efcec106e98c195de762.json
2024-12-05 09:33:18 +08:00

1 line
2.5 KiB
JSON

{"remainingRequest":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\components\\Breadcrumb\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\components\\Breadcrumb\\index.vue","mtime":1732871026457},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1732872824662},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\babel-loader\\lib\\index.js","mtime":1732872825017},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1732872824662},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\vue-loader\\lib\\index.js","mtime":1732872825835}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport pathToRegexp from 'path-to-regexp'\r\n\r\nexport default {\r\n data() {\r\n return {\r\n levelList: null\r\n }\r\n },\r\n watch: {\r\n $route(route) {\r\n // if you go to the redirect page, do not update the breadcrumbs\r\n if (route.path.startsWith('/redirect/')) {\r\n return\r\n }\r\n this.getBreadcrumb()\r\n }\r\n },\r\n created() {\r\n this.getBreadcrumb()\r\n },\r\n methods: {\r\n getBreadcrumb() {\r\n // only show routes with meta.title\r\n let matched = this.$route.matched.filter(item => item.meta && item.meta.title)\r\n const first = matched[0]\r\n\r\n if (!this.isDashboard(first)) {\r\n matched = [{ path: '/dashboard', meta: { title: this.$t('auto.common.home') }}].concat(matched)\r\n }\r\n\r\n this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)\r\n },\r\n isDashboard(route) {\r\n const name = route && route.name\r\n if (!name) {\r\n return false\r\n }\r\n return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase()\r\n },\r\n pathCompile(path) {\r\n // To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561\r\n const { params } = this.$route\r\n var toPath = pathToRegexp.compile(path)\r\n return toPath(params)\r\n },\r\n handleLink(item) {\r\n const { redirect, path } = item\r\n if (redirect) {\r\n this.$router.push(redirect)\r\n return\r\n }\r\n this.$router.push(this.pathCompile(path))\r\n }\r\n }\r\n}\r\n",null]}