hz-zhhq-web/node_modules/.cache/babel-loader/2f893ad823f7fd389d6c301ebe6...

1 line
3.4 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\\layout\\components\\Sidebar\\SidebarItem.vue?vue&type=script&lang=js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\layout\\components\\Sidebar\\SidebarItem.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 _objectSpread from \"E:/hz-zhhq-web/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";\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 path from 'path';\nimport { generateTitle } from '@/utils/i18n';\nimport { isExternal } from '@/utils/validate';\nimport Item from \"./Item\";\nimport AppLink from \"./Link\";\nimport FixiOSBug from \"./FixiOSBug\";\nexport default {\n name: 'SidebarItem',\n components: {\n Item: Item,\n AppLink: AppLink\n },\n mixins: [FixiOSBug],\n props: {\n // route object\n item: {\n type: Object,\n required: true\n },\n isNest: {\n type: Boolean,\n default: false\n },\n basePath: {\n type: String,\n default: ''\n }\n },\n data: function data() {\n // To fix https://github.com/PanJiaChen/vue-adxxmin-template/issues/237\n // TODO: refactor with render function\n this.onlyOneChild = \"\";\n return {};\n },\n created: function created() {\n // console.log(this.item)\n },\n methods: {\n hasOneShowingChild: function hasOneShowingChild() {\n var _this = this;\n var children = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var parent = arguments.length > 1 ? arguments[1] : undefined;\n var showingChildren = children.filter(function (item) {\n if (item.hidden) {\n return false;\n } else {\n // Temp set(will be used if only has one showing child)\n _this.onlyOneChild = item;\n return true;\n }\n });\n\n // When there is only one child router, the child router is displayed by default\n if (showingChildren.length === 1) {\n return true;\n }\n\n // Show parent if there are no child router to display\n if (showingChildren.length === 0) {\n this.onlyOneChild = _objectSpread(_objectSpread({}, parent), {}, {\n path: '',\n noShowingChildren: true\n });\n return true;\n }\n return false;\n },\n resolvePath: function resolvePath(routePath) {\n if (isExternal(routePath)) {\n return routePath;\n }\n if (isExternal(this.basePath)) {\n return this.basePath;\n }\n return path.resolve(this.basePath, routePath);\n },\n generateTitle: generateTitle\n }\n};",null]}