17 lines
345 B
JavaScript
17 lines
345 B
JavaScript
|
// Utilities
|
||
|
import { nextTick, watch } from 'vue';
|
||
|
|
||
|
// Types
|
||
|
|
||
|
export function useSelectLink(link, select) {
|
||
|
watch(() => link.isActive?.value, isActive => {
|
||
|
if (link.isLink.value && isActive && select) {
|
||
|
nextTick(() => {
|
||
|
select(true);
|
||
|
});
|
||
|
}
|
||
|
}, {
|
||
|
immediate: true
|
||
|
});
|
||
|
}
|
||
|
//# sourceMappingURL=selectLink.mjs.map
|