|
@@ -21,7 +21,7 @@
|
|
|
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
|
|
|
</template>
|
|
|
<sidebar-item
|
|
|
- v-for="child in item.children"
|
|
|
+ v-for="child in item.children"
|
|
|
:key="child.path"
|
|
|
:is-nest="true"
|
|
|
:item="child"
|
|
@@ -40,9 +40,7 @@ import { isExternal } from "@/utils/validate";
|
|
|
import Item from "./Item";
|
|
|
import AppLink from "./Link";
|
|
|
import FixiOSBug from "./FixiOSBug";
|
|
|
-import {
|
|
|
- listCamera,
|
|
|
-} from "@/api/monitoring/camera";
|
|
|
+import { listCamera } from "@/api/monitoring/camera";
|
|
|
export default {
|
|
|
name: "SidebarItem",
|
|
|
components: { Item, AppLink },
|
|
@@ -65,17 +63,15 @@ export default {
|
|
|
data() {
|
|
|
this.onlyOneChild = null;
|
|
|
return {
|
|
|
- form:{},
|
|
|
- cameraList:[]
|
|
|
+ form: {},
|
|
|
+ cameraList: []
|
|
|
};
|
|
|
},
|
|
|
- mounted() {
|
|
|
-
|
|
|
- },
|
|
|
+ mounted() {},
|
|
|
methods: {
|
|
|
- a(indent){
|
|
|
- this.form=indent
|
|
|
- this.$bus.$emit("Click", this.form)
|
|
|
+ a(indent) {
|
|
|
+ this.form = indent;
|
|
|
+ this.$bus.$emit("Click", this.form);
|
|
|
},
|
|
|
hasOneShowingChild(children = [], parent) {
|
|
|
if (!children) {
|
|
@@ -106,7 +102,7 @@ export default {
|
|
|
},
|
|
|
resolvePath(routePath, routeQuery) {
|
|
|
// console.log(this.$route.path.lastIndexOf('/'))
|
|
|
- // let name=this.$route.path.slice(this.$route.path.lastIndexOf('/')+1,this.$route.path.length);
|
|
|
+ // let name=this.$route.path.slice(this.$route.path.lastIndexOf('/')+1,this.$route.path.length);
|
|
|
// console.log(routePath)
|
|
|
if (isExternal(routePath)) {
|
|
|
return routePath;
|
|
@@ -125,7 +121,8 @@ export default {
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
/* 左侧文字多余部分不隐藏 */
|
|
|
-#app .sidebar-container .el-menu-item, #app .sidebar-container .el-submenu__title{
|
|
|
+#app .sidebar-container .el-menu-item,
|
|
|
+#app .sidebar-container .el-submenu__title {
|
|
|
text-overflow: clip !important;
|
|
|
}
|
|
|
</style>
|