1 line
3.0 KiB
JSON
1 line
3.0 KiB
JSON
|
|
{"remainingRequest":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js!E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js!E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!E:\\hz-zhhq-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!E:\\hz-zhhq-web\\src\\components\\Breadcrumb\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\components\\Breadcrumb\\index.vue","mtime":1737610069384},{"path":"E:\\hz-zhhq-web\\babel.config.js","mtime":1737610069371},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.string.starts-with\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport { generateTitle } from '@/utils/i18n';\nimport pathToRegexp from 'path-to-regexp';\nexport default {\n data: function data() {\n return {\n levelList: \"\"\n };\n },\n watch: {\n $route: function $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: function created() {\n this.getBreadcrumb();\n },\n methods: {\n generateTitle: generateTitle,\n getBreadcrumb: function getBreadcrumb() {\n // only show routes with meta.title\n var matched = this.$route.matched.filter(function (item) {\n return item.meta && item.meta.title;\n });\n var first = matched[0];\n\n // if (!this.isDashboard(first)) {\n // matched = [{ path: '/dashboard', meta: { title: 'dashboard' }}].concat(matched)\n // }\n\n this.levelList = matched.filter(function (item) {\n return item.meta && item.meta.title && item.meta.breadcrumb !== false;\n });\n // console.log(this.levelList,47)\n },\n isDashboard: function isDashboard(route) {\n var name = route && route.name;\n if (!name) {\n return false;\n }\n return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase();\n },\n pathCompile: function pathCompile(path) {\n // To solve this problem https://github.com/PanJiaChen/vue-element-adxxmin/issues/561\n var params = this.$route.params;\n var toPath = pathToRegexp.compile(path);\n return toPath(params);\n },\n handleLink: function handleLink(item) {\n var redirect = item.redirect,\n path = item.path;\n if (redirect) {\n this.$router.push(redirect);\n return;\n }\n this.$router.push(this.pathCompile(path));\n }\n }\n};",null]}
|