sprintify-ui 0.0.69 → 0.0.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.0.69",
3
+ "version": "0.0.71",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -18,7 +18,7 @@ export default {
18
18
  };
19
19
 
20
20
  const template = `
21
- <BaseDataIterator v-bind="args">
21
+ <BaseDataIterator v-bind="args" :url-query="urlQuery">
22
22
  <template #default="{ items, loading }">
23
23
  <div class="relative">
24
24
  <div class="space-y-1.5">
@@ -106,7 +106,15 @@ const Template = (args) => ({
106
106
  BaseSelect,
107
107
  },
108
108
  setup() {
109
- return { args };
109
+ const urlQuery = ref({});
110
+
111
+ setTimeout(() => {
112
+ urlQuery.value = {
113
+ type: 'video',
114
+ };
115
+ }, 3000);
116
+
117
+ return { args, urlQuery };
110
118
  },
111
119
  template: template,
112
120
  });
@@ -471,6 +471,13 @@ watch(
471
471
  }
472
472
  );
473
473
 
474
+ watch(
475
+ () => props.urlQuery,
476
+ () => {
477
+ fetch();
478
+ }
479
+ );
480
+
474
481
  function getRouteQuery() {
475
482
  return config.parseQueryString(window.location.search.replace(/^(\?)/, ''));
476
483
  }
@@ -62,8 +62,6 @@ const props = defineProps({
62
62
 
63
63
  const emit = defineEmits(['click']);
64
64
 
65
- const router = useRouter();
66
-
67
65
  async function onClick() {
68
66
  emit('click');
69
67
  }
@@ -73,11 +71,9 @@ const routeActive = computed((): boolean => {
73
71
  return false;
74
72
  }
75
73
 
76
- const itemRoute = router.resolve(props.item.to);
74
+ const link = useLink({ to: props.item.to });
77
75
 
78
- return router.currentRoute.value.matched.some((route) => {
79
- return itemRoute.path == route.path;
80
- });
76
+ return link.isActive.value;
81
77
  });
82
78
 
83
79
  const showSubActions = computed((): boolean => {