Skip to content

Commit caeea72

Browse files
committed
tree rerender and removed scrollbars
1 parent 630470d commit caeea72

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

src/components/CodeSnippet.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,7 @@ export default {
122122
// resize handled by vue lifecycle methods
123123
.code-editor {
124124
}
125+
::-webkit-scrollbar {
126+
display: none;
127+
}
125128
</style>

src/components/Tree.vue

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="container">
33
<tree
4-
:data="tree"
4+
:data="computedTree"
55
node-text="name"
66
layoutType="euclidean"
77
type="tree"
@@ -21,10 +21,11 @@ export default {
2121
},
2222
computed: {
2323
...mapState(['componentMap']),
24-
componentMap: {
25-
get () {
26-
return this.$store.state.componentMap
27-
}
24+
// getComponentMap () {
25+
// return this.$store.state.componentMap
26+
// },
27+
computedTree () {
28+
return this.buildTree()
2829
}
2930
},
3031
data () {
@@ -34,6 +35,7 @@ export default {
3435
},
3536
methods: {
3637
formatComponentMap (compMap) {
38+
console.log('compMap', compMap)
3739
let result = []
3840
Object.values(compMap).forEach(compData => {
3941
result.push({
@@ -62,14 +64,15 @@ export default {
6264
},
6365
buildTree () {
6466
let build = this.transformToTree(this.componentMap)
65-
this.tree = build['App']
67+
return build['App']
6668
}
6769
},
6870
mounted () {
6971
this.buildTree()
7072
}
7173
}
7274
</script>
75+
7376
<style>
7477
.container {
7578
height: 100%;

src/css/app.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ main {
66
background: black;
77
// background: rgb(22,108,105);
88
// background: linear-gradient(36deg, rgba(22,108,105,1) 0%, rgba(20,32,23,1) 100%);
9-
}
9+
}

src/layouts/MyLayout.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,7 @@ export default {
7373
// background: white;
7474
background: #272822;
7575
}
76+
::-webkit-scrollbar {
77+
display: none;
78+
}
7679
</style>

0 commit comments

Comments
 (0)