{"remainingRequest":"D:\\jiayue\\pig-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jiayue\\pig-ui\\src\\page\\index\\sidebar\\sidebarItem.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jiayue\\pig-ui\\src\\page\\index\\sidebar\\sidebarItem.vue","mtime":1619070292874},{"path":"D:\\jiayue\\pig-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jiayue\\pig-ui\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jiayue\\pig-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jiayue\\pig-ui\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\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//\n//\n//\n\r\nimport { mapGetters } from \"vuex\";\r\nimport { validatenull } from \"@/util/validate\";\r\nimport config from \"./config.js\";\r\nexport default {\r\n name: \"sidebarItem\",\r\n data() {\r\n return {\r\n config: config\r\n };\r\n },\r\n props: {\r\n menu: {\r\n type: Array\r\n },\r\n screen: {\r\n type: Number\r\n },\r\n first: {\r\n type: Boolean,\r\n default: false\r\n },\r\n props: {\r\n type: Object,\r\n default: () => {\r\n return {};\r\n }\r\n },\r\n collapse: {\r\n type: Boolean\r\n }\r\n },\r\n created() {},\r\n mounted() {},\r\n computed: {\r\n ...mapGetters([\"roles\"]),\r\n labelKey() {\r\n return this.props.label || this.config.propsDefault.label;\r\n },\r\n pathKey() {\r\n return this.props.path || this.config.propsDefault.path;\r\n },\r\n iconKey() {\r\n return this.props.icon || this.config.propsDefault.icon;\r\n },\r\n childrenKey() {\r\n return this.props.children || this.config.propsDefault.children;\r\n },\r\n nowTagValue() {\r\n return this.$router.$avueRouter.getValue(this.$route);\r\n }\r\n },\r\n methods: {\r\n vaildAvtive(item) {\r\n const groupFlag = (item[\"group\"] || []).some(ele =>\r\n this.$route.path.includes(ele)\r\n );\r\n return this.nowTagValue === item[this.pathKey] || groupFlag;\r\n },\r\n vaildRoles(item) {\r\n item.meta = item.meta || {};\r\n return item.meta.roles ? item.meta.roles.includes(this.roles) : true;\r\n },\r\n validatenull(val) {\r\n return validatenull(val);\r\n },\r\n open(item) {\r\n if (this.screen <= 1) this.$store.commit(\"SET_COLLAPSE\");\r\n this.$router.$avueRouter.group = item.group;\r\n this.$router.push({\r\n path: this.$router.$avueRouter.getPath({\r\n name: item[this.labelKey],\r\n src: item[this.pathKey]\r\n }),\r\n query: item.query\r\n }).catch(() => {});\r\n }\r\n }\r\n};\r\n",{"version":3,"sources":["sidebarItem.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"sidebarItem.vue","sourceRoot":"src/page/index/sidebar","sourcesContent":["\r\n \r\n\r\n\r\n\r\n"]}]}