2019-09-04 21:01:54 +05:30
|
|
|
<script>
|
2022-01-26 12:08:38 +05:30
|
|
|
import TreeContent from 'jh_else_ce/repository/components/tree_content.vue';
|
2020-03-13 15:44:24 +05:30
|
|
|
import preloadMixin from '../mixins/preload';
|
2021-03-11 19:13:27 +05:30
|
|
|
import { updateElementsVisibility } from '../utils/dom';
|
2019-09-04 21:01:54 +05:30
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
2019-12-26 22:10:19 +05:30
|
|
|
TreeContent,
|
2019-09-04 21:01:54 +05:30
|
|
|
},
|
2020-03-13 15:44:24 +05:30
|
|
|
mixins: [preloadMixin],
|
2019-09-04 21:01:54 +05:30
|
|
|
props: {
|
|
|
|
path: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: '/',
|
|
|
|
},
|
|
|
|
},
|
2019-12-26 22:10:19 +05:30
|
|
|
computed: {
|
|
|
|
isRoot() {
|
|
|
|
return this.path === '/';
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
isRoot: {
|
|
|
|
immediate: true,
|
|
|
|
handler: 'updateElements',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
updateElements(isRoot) {
|
|
|
|
updateElementsVisibility('.js-show-on-root', isRoot);
|
|
|
|
updateElementsVisibility('.js-hide-on-root', !isRoot);
|
|
|
|
},
|
|
|
|
},
|
2019-09-04 21:01:54 +05:30
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2020-03-13 15:44:24 +05:30
|
|
|
<tree-content :path="path" :loading-path="loadingPath" />
|
2019-09-04 21:01:54 +05:30
|
|
|
</template>
|