travel/admin/node_modules/.cache/babel-loader/10325cc754e57a181f7d265a71d...

1 line
7.8 KiB
JSON

{"remainingRequest":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\babel-loader\\lib\\index.js!D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!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=script&lang=js","dependencies":[{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\src\\components\\Breadcrumb\\index.vue","mtime":1718070785995},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\babel.config.js","mtime":1718070785981},{"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\\babel-loader\\lib\\index.js","mtime":1718764959024},{"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:aW1wb3J0ICJjb3JlLWpzL21vZHVsZXMvZXMuYXJyYXkuY29uY2F0LmpzIjsKaW1wb3J0ICJjb3JlLWpzL21vZHVsZXMvZXMuYXJyYXkuZmlsdGVyLmpzIjsKaW1wb3J0ICJjb3JlLWpzL21vZHVsZXMvZXMuZnVuY3Rpb24ubmFtZS5qcyI7CmltcG9ydCAiY29yZS1qcy9tb2R1bGVzL2VzLm9iamVjdC50by1zdHJpbmcuanMiOwppbXBvcnQgImNvcmUtanMvbW9kdWxlcy9lcy5zdHJpbmcuc3RhcnRzLXdpdGguanMiOwppbXBvcnQgImNvcmUtanMvbW9kdWxlcy9lcy5zd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DsKICAgICAgaWYgKHJlZGlyZWN0KSB7CiAgICAgICAgdGhpcy4kcm91dGVyLnB1c2gocmVkaXJlY3QpOwogICAgICAgIHJldHVybjsKICAgICAgfQogICAgICB0aGlzLiRyb3V0ZXIucHVzaCh0aGlzLnBhdGhDb21waWxlKHBhdGgpKTsKICAgIH0KICB9Cn07"},{"version":3,"names":["pathToRegexp","data","levelList","watch","$route","route","path","startsWith","getBreadcrumb","created","methods","matched","filter","item","meta","title","first","isDashboard","concat","breadcrumb","name","trim","toLocaleLowerCase","pathCompile","params","toPath","compile","handleLink","redirect","$router","push"],"sources":["src/components/Breadcrumb/index.vue"],"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"],"mappings":";;;;;;;;;;;;;;;;;;AAYA,OAAAA,YAAA;AAEA;EACAC,IAAA,WAAAA,KAAA;IACA;MACAC,SAAA;IACA;EACA;EACAC,KAAA;IACAC,MAAA,WAAAA,OAAAC,KAAA;MACA;MACA,IAAAA,KAAA,CAAAC,IAAA,CAAAC,UAAA;QACA;MACA;MACA,KAAAC,aAAA;IACA;EACA;EACAC,OAAA,WAAAA,QAAA;IACA,KAAAD,aAAA;EACA;EACAE,OAAA;IACAF,aAAA,WAAAA,cAAA;MACA;MACA,IAAAG,OAAA,QAAAP,MAAA,CAAAO,OAAA,CAAAC,MAAA,WAAAC,IAAA;QAAA,OAAAA,IAAA,CAAAC,IAAA,IAAAD,IAAA,CAAAC,IAAA,CAAAC,KAAA;MAAA;MACA,IAAAC,KAAA,GAAAL,OAAA;MAEA,UAAAM,WAAA,CAAAD,KAAA;QACAL,OAAA;UAAAL,IAAA;UAAAQ,IAAA;YAAAC,KAAA;UAAA;QAAA,GAAAG,MAAA,CAAAP,OAAA;MACA;MAEA,KAAAT,SAAA,GAAAS,OAAA,CAAAC,MAAA,WAAAC,IAAA;QAAA,OAAAA,IAAA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