mirror of
https://github.com/45Drives/cockpit-navigator.git
synced 2025-07-30 09:05:23 +02:00
remove watch to make more lightweight
This commit is contained in:
parent
6b201edc55
commit
3f3e5b1da8
@ -81,7 +81,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ref, inject, watch, nextTick, onBeforeUnmount, onMounted, onActivated, onDeactivated } from 'vue';
|
import { ref, inject, watch, nextTick, onBeforeUnmount, onMounted, onActivated, onDeactivated, onUpdated } from 'vue';
|
||||||
import { DocumentIcon, FolderIcon, LinkIcon, DocumentRemoveIcon, ArrowNarrowRightIcon, XIcon, ChevronDownIcon, ChevronUpIcon } from '@heroicons/vue/solid';
|
import { DocumentIcon, FolderIcon, LinkIcon, DocumentRemoveIcon, ArrowNarrowRightIcon, XIcon, ChevronDownIcon, ChevronUpIcon } from '@heroicons/vue/solid';
|
||||||
import { settingsInjectionKey } from '../keys';
|
import { settingsInjectionKey } from '../keys';
|
||||||
import DirectoryEntryList from './DirectoryEntryList.vue';
|
import DirectoryEntryList from './DirectoryEntryList.vue';
|
||||||
@ -119,8 +119,6 @@ export default {
|
|||||||
const directoryEntryListRef = ref();
|
const directoryEntryListRef = ref();
|
||||||
const selectIntersectElement = ref();
|
const selectIntersectElement = ref();
|
||||||
|
|
||||||
// const selectedClasses = ref([]);
|
|
||||||
|
|
||||||
if (props.entry.type === 'd' || (props.entry.type === 'l' && props.entry.target?.type === 'd')) {
|
if (props.entry.type === 'd' || (props.entry.type === 'l' && props.entry.target?.type === 'd')) {
|
||||||
icon.value = FolderIcon;
|
icon.value = FolderIcon;
|
||||||
directoryLike.value = true;
|
directoryLike.value = true;
|
||||||
@ -158,9 +156,11 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
watch(selectIntersectElement, () =>
|
emit('setEntryProp', 'DOMElement', selectIntersectElement.value);
|
||||||
emit('setEntryProp', 'DOMElement', selectIntersectElement.value), { immediate: true }
|
})
|
||||||
);
|
|
||||||
|
onUpdated(() => {
|
||||||
|
emit('setEntryProp', 'DOMElement', selectIntersectElement.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user