T
T
thehighhomie2019-09-05 21:00:13
Vue.js
thehighhomie, 2019-09-05 21:00:13

VueJS: Calling constants with string value of vuex method in html?

There is an option to use constants with a string method name to call a method in html, or only one option: create a method and run the this[SET_ACTIVE_DIALOG]('login') constant in it
, for example, this code does not work if the constant has a value that is not identical to its name (const SET_ACTIVE_DIALOG = 'SET_DIALOG'):
@click="SET_ACTIVE_DIALOG('login')" this code in html calls non-existent SET_DIALOG method and not SET_ACTIVE_DIALOG

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question