hz-zhhq-web/node_modules/.cache/babel-loader/bcc98dd8cd25f69640f92819c31...

1 line
7.7 KiB
JSON
Raw Normal View History

2025-02-25 13:43:48 +08:00
{"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\\layout\\components\\TagsView\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\layout\\components\\TagsView\\index.vue","mtime":1737610069393},{"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.regexp.replace\";\nimport _createForOfIteratorHelper from \"E:/hz-zhhq-web/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js\";\nimport _toConsumableArray from \"E:/hz-zhhq-web/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";\nimport _objectSpread from \"E:/hz-zhhq-web/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport ScrollPane from \"./ScrollPane\";\nimport { generateTitle } from '@/utils/i18n';\nimport path from 'path';\nexport default {\n components: {\n ScrollPane: ScrollPane\n },\n data: function data() {\n return {\n visible: false,\n top: 0,\n left: 0,\n selectedTag: {},\n affixTags: []\n };\n },\n computed: {\n visitedViews: function visitedViews() {\n return this.$store.state.tagsView.visitedViews;\n },\n routes: function routes() {\n return this.$store.state.permission.routes;\n }\n },\n watch: {\n $route: function $route() {\n this.addTags();\n this.moveToCurrentTag();\n },\n visible: function visible(value) {\n if (value) {\n document.body.addEventListener('click', this.closeMenu);\n } else {\n document.body.removeEventListener('click', this.closeMenu);\n }\n }\n },\n mounted: function mounted() {\n this.initTags();\n this.addTags();\n },\n methods: {\n generateTitle: generateTitle,\n // generateTitle by vue-i18n\n isActive: function isActive(route) {\n return route.path === this.$route.path;\n },\n filterAffixTags: function filterAffixTags(routes) {\n var _this = this;\n var basePath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '/';\n var tags = [];\n routes.forEach(function (route) {\n if (route.meta && route.meta.affix) {\n var tagPath = path.resolve(basePath, route.path);\n tags.push({\n fullPath: tagPath,\n path: tagPath,\n name: route.name,\n meta: _objectSpread({}, route.meta)\n });\n }\n if (route.children) {\n var tempTags = _this.filterAffixTags(route.children, route.path);\n if (tempTags.length >= 1) {\n tags = [].concat(_toConsumableArray(tags), _toConsumableArray(tempTags));\n }\n }\n });\n return tags;\n },\n initTags: function initTags() {\n var affixTags = this.affixTags = this.filterAffixTags(this.routes);\n var _iterator = _createForOfIteratorHelper(affixTags),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var tag = _step.value;\n // Must have tag name\n if (tag.name) {\n this.$store.dispatch('tagsView/addVisitedView', tag);\n