英文:
Vue JS keep tab component alive
问题
抱歉,以下是您要翻译的内容:
All,
I need some help making keepAlive in VueJS3 composition api work.
I have a page to configure profiles ( business feature ) where I have some tabs created dynamicly based on user selection from a drop down.
Here is my profile model :
So Each tab is an entry to the realm attribute array.
The VTAB component I am using is from vuero library : https://vuero.cssninja.io/
That I am using this way :
While making modifications, the user should be able to switch tabs without losing the modification he made while switching tabs.
From official documentation, keepalive is the directive to be used for such use case. Unfortunatly I am not able to make it work. I lose all the modifications when I switch the tab.
Do you have any suggestions, to make this work .
Thanks A lot.
英文:
All,
I need some help making keepAlive in VueJS3 composition api work.
I have a page to configure profiles ( business feature ) where I have some tabs created dynamicly based on user selection from a drop down.
Here is my profile model :
So Each tab is an entry to the realm attribute array.
The VTAB component I am using is from vuero library : https://vuero.cssninja.io/
That I am using this way :
While making modifications, the user should be able to switch tabs without losing the modification he made while switching tabs.
From official documentation, keepalive is the directive to be used for such use case. Unfortunatly I am not able to make it work. I lose all the modifications when I switch the tab.
Do you have any suggestions, to make this work .
Thanks A lot.
答案1
得分: 0
这似乎是 vuero 组件的限制。我采用了一个自定义解决方案,通过监听 onBeforeUnmount 事件。
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论