vue3-router-tab 1.4.1 → 1.4.3

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/README.md CHANGED
@@ -871,7 +871,7 @@ const {
871
871
  } = useReactiveTab({
872
872
  title: () => `${user.value.name} - ${user.value.status}`,
873
873
  icon: () => user.value.status === 'online' ? 'mdi-account' : 'mdi-account-off',
874
- closable: () => user.value.status !== 'editing'
874
+ closable: () => user.value.status !== 'editing'
875
875
  })
876
876
  </script>
877
877
  ```
@@ -883,6 +883,23 @@ const {
883
883
  3. **Automatic watching**: No manual watchers needed - the plugin handles everything
884
884
  4. **Performance**: Only active tab components are watched to minimize overhead
885
885
 
886
+ #### Works inside KeepAlive and wrappers
887
+
888
+ `<router-tab>` forwards the tab bindings even when your pages are wrapped for caching. Just expose reactive values (refs/computed) and they will still be watched:
889
+
890
+ ```vue
891
+ <script setup>
892
+ import { computed, ref } from 'vue'
893
+
894
+ const count = ref(3)
895
+ const isLoading = ref(false)
896
+
897
+ const routeTabTitle = computed(() => isLoading.value ? 'Loading orders…' : `Orders (${count.value})`)
898
+ const routeTabIcon = computed(() => isLoading.value ? 'mdi-loading mdi-spin' : 'mdi-cart')
899
+ const routeTabClosable = computed(() => !isLoading.value)
900
+ </script>
901
+ ```
902
+
886
903
  > 💡 **Try it yourself**: Check out the live demo at `/title-test` in the example app to see all these features in action!
887
904
 
888
905
  ### Options API Support