viewweiwu / vue-tabs-chrome

chrome tab like.
https://viewweiwu.github.io/vue-tabs-chrome/
232 stars 48 forks source link

Not refresh #57

Closed LiThaM closed 2 years ago

LiThaM commented 2 years ago

Hello friend, I have loved your vue tabs, but I am having a problem and it is that when I change the tab it is updating or rendering me again. How can I disable that refresh?

viewweiwu commented 2 years ago

Thank you for using it. But when you change the tag value, it will definitely trigger the rendering of the component. If you don't want to render it repeatedly , then don't change the value of it.

LiThaM commented 2 years ago

I understand that you are talking to me about this, right?

let currTab = this.tabs.find((item) => item.key === this.tab); let url = ""; if (currTab) { url = currTab.component || ""; } return url;

viewweiwu commented 2 years ago

Sorry, I didn't understand what the code was trying to say. Can you come up with a more detailed code? Or create a simple demo using CodeSandbox. https://codesandbox.io/s/kind-wave-00ipv

LiThaM commented 2 years ago

Thanks friend for answering you, in the end I solve the issue myself. I realized that I had v-if to differentiate the tabs and that made it render again. Trade it for a V-show and you're done. Thanks

El mar, 30 nov 2021 a las 3:00, viewweiwu @.***>) escribió:

Sorry, I didn't understand what the code was trying to say. Can you come up with a more detailed code? Or create a simple demo using CodeSandbox. https://codesandbox.io/s/kind-wave-00ipv

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/viewweiwu/vue-tabs-chrome/issues/57#issuecomment-982208277, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALREKYUB7VQ76PFYQYB45TUOQV4DANCNFSM5I5TLZ6Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

viewweiwu commented 2 years ago

Ok。 Thank you for using。😄

rajeshjoshi8792 commented 2 years ago

Thanks friend for answering you, in the end I solve the issue myself. I realized that I had v-if to differentiate the tabs and that made it render again. Trade it for a V-show and you're done. Thanks El mar, 30 nov 2021 a las 3:00, viewweiwu @.***>) escribió: Sorry, I didn't understand what the code was trying to say. Can you come up with a more detailed code? Or create a simple demo using CodeSandbox. https://codesandbox.io/s/kind-wave-00ipv — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#57 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALREKYUB7VQ76PFYQYB45TUOQV4DANCNFSM5I5TLZ6Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

i want to make same functionality that you are doing. can you help me? i dont want to render tab again when i back to same tab