0👍
tiny recomendations
‘:class’ directive instead of native code:
document.querySelector('.dialog').classList.toggle('hidden');
components:
import Modal from './modal'
export default {
...
components:
Modal
}
...
}
instead of
Vue.component('modal', require('./modal.vue'));
.. also Vuex is a good point for this case
additional:
0👍
As it turns out the problem was the moment I called the querySelector method.
Assigning the .dialog
element to a const in mounted()
solved my problem.
- [Vuejs]-Toggle components with radio buttons in Vue
- [Vuejs]-How to select rows based on string options in html vue js?
Source:stackexchange.com