I'm trying to do something like a comprehensive system of automated activities. The program should have many modules. I plan to organize them according to windows principles. If desired, you can open a new module which you can then close, or open a new module without closing it and return later.
For example. I open the module for the list of available digital documents. I select the desired item, click Edit, which launches the edit form. I open any information guide, review the necessary data, and then return to the form. This is all done by analogy to the Windows taskbar.
I'm working on architecture. We load the module through vue-router. You can use keep-alive to store inactive module data, but management options are limited. You can only specify how many caches to keep, but some caches cannot be cleared, all data is retained. On the other hand, I'd like to be able to choose how much data to keep and which data is no longer needed as it becomes obsolete. I'm worried that large applications won't slow down or freeze on a low powered computer. On the one hand it is simple to implement and on the other hand it uses resources more efficiently.
In addition to keeping active state selections or storing state data in a separate structure, you may also consider other options. For example, open modules in separate tabs and transfer data management to the browser. Alternatively, you could implement the option to open modules in a dynamically added component array "components", using the v-show directive to temporarily hide unused modules. You can load modules into dialog boxes. There are other options you can consider. If you choose one of them, you have to bear its corresponding disadvantages.
Writing a test version of each option and then running the evaluation tests is a very time-consuming task. So hope to get your suggestions.
P粉5101277412023-09-15 00:04:34
For your use case, I think the dialog or any other component (tabs, etc.) will simply work when using v-if
and v-show
. You can use v-show for content that you want to persist in the DOM and v-if for content that you want to destroy after the user closes it.
See documentation on the differences between v-if
and v-show
here.