travel/admin/node_modules/.cache/vue-loader/42c11dbad81191afcb503d57ef0...

1 line
4.1 KiB
JSON

{"remainingRequest":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\phpstudy_pro\\WWW\\travel\\admin\\src\\components\\Breadcrumb\\index.vue?vue&type=style&index=0&id=b50ef614&lang=scss&scoped=true","dependencies":[{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\src\\components\\Breadcrumb\\index.vue","mtime":1718070785995},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\css-loader\\dist\\cjs.js","mtime":1718764958140},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":1718764960674},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\postcss-loader\\src\\index.js","mtime":1718764958994},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\sass-loader\\dist\\cjs.js","mtime":1718764957182},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1718764957200},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\vue-loader\\lib\\index.js","mtime":1718764959862}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKDQouYXBwLWJyZWFkY3J1bWIuZWwtYnJlYWRjcnVtYiB7DQogIGRpc3BsYXk6IGlubGluZS1ibG9jazsNCiAgZm9udC1zaXplOiAxNHB4Ow0KICBsaW5lLWhlaWdodDogNTBweDsNCiAgbWFyZ2luLWxlZnQ6IDhweDsNCg0KICAubm8tcmVkaXJlY3Qgew0KICAgIGNvbG9yOiAjOTdhOGJlOw0KICAgIGN1cnNvcjogdGV4dDsNCiAgfQ0KfQ0K"},{"version":3,"sources":["index.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA","file":"index.vue","sourceRoot":"src/components/Breadcrumb","sourcesContent":["<template>\r\n <el-breadcrumb class=\"app-breadcrumb\" separator=\"/\">\r\n <transition-group name=\"breadcrumb\">\r\n <el-breadcrumb-item v-for=\"(item,index) in levelList\" :key=\"item.path\">\r\n <span v-if=\"item.redirect==='noRedirect'||index==levelList.length-1\" class=\"no-redirect\">{{ item.meta.title }}</span>\r\n <a v-else @click.prevent=\"handleLink(item)\">{{ item.meta.title }}</a>\r\n </el-breadcrumb-item>\r\n </transition-group>\r\n </el-breadcrumb>\r\n</template>\r\n\r\n<script>\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: 'Dashboard' }}].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</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.app-breadcrumb.el-breadcrumb {\r\n display: inline-block;\r\n font-size: 14px;\r\n line-height: 50px;\r\n margin-left: 8px;\r\n\r\n .no-redirect {\r\n color: #97a8be;\r\n cursor: text;\r\n }\r\n}\r\n</style>\r\n"]}]}