selectLink.mjs 345 B

1234567891011121314151617
  1. // Utilities
  2. import { nextTick, watch } from 'vue';
  3. // Types
  4. export function useSelectLink(link, select) {
  5. watch(() => link.isActive?.value, isActive => {
  6. if (link.isLink.value && isActive && select) {
  7. nextTick(() => {
  8. select(true);
  9. });
  10. }
  11. }, {
  12. immediate: true
  13. });
  14. }
  15. //# sourceMappingURL=selectLink.mjs.map