0👍
You could created two seperate components, one for editing and one for rendering.
These could utilize components themselves to keep the overhead to a minimun.
You could also use the same component, but lazy load the editor features based on some condition like:
-
If youre fine with having the Editor only available during development you can create an env variable and check for
process.env.NODE_ENV !== 'production'
-
Another way would be to have some sort of authorization that combined with
v-if
would show the editor or hide it.
- [Vuejs]-With VueJS Cli how should do to have a variable common to all pages and be able to watch it in a page
- [Vuejs]-V-for with 3000+ recs loading REALLY slow (12+ seconds)
Source:stackexchange.com