1 line
3.7 KiB
JSON
1 line
3.7 KiB
JSON
{"remainingRequest":"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\\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":["\"use strict\";\n\nvar _interopRequireDefault = require(\"E:/hz-zhhq-web/node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _objectSpread2 = _interopRequireDefault(require(\"E:/hz-zhhq-web/node_modules/@babel/runtime/helpers/objectSpread2.js\"));\nvar _path = _interopRequireDefault(require(\"path\"));\nvar _i18n = require(\"@/utils/i18n\");\nvar _validate = require(\"@/utils/validate\");\nvar _Item = _interopRequireDefault(require(\"./Item\"));\nvar _Link = _interopRequireDefault(require(\"./Link\"));\nvar _FixiOSBug = _interopRequireDefault(require(\"./FixiOSBug\"));\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//\nvar _default = exports.default = {\n name: 'SidebarItem',\n components: {\n Item: _Item.default,\n AppLink: _Link.default\n },\n mixins: [_FixiOSBug.default],\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 = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, parent), {}, {\n path: '',\n noShowingChildren: true\n });\n return true;\n }\n return false;\n },\n resolvePath: function resolvePath(routePath) {\n if ((0, _validate.isExternal)(routePath)) {\n return routePath;\n }\n if ((0, _validate.isExternal)(this.basePath)) {\n return this.basePath;\n }\n return _path.default.resolve(this.basePath, routePath);\n },\n generateTitle: _i18n.generateTitle\n }\n};",null]} |