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