Calling Named Actions from HTML Vue Events
You can do direct mutations to the model :
model :<button @click="model.count = model.count + 1" >Do Something</button>
// increase the model.count by 1You can run action scripts on events too:
<button @click="namedAction('handleButton')" >Do Something</button>
// runs the namedAction called 'handleButton'Advanced:
<some-component @someEvent="function(){ namedAction('handleEvents',{arguments:arguments})}" ></some-component>
// passes the arguments that the component passed, into all the actions.
// action.options.arguments will contain an array of the following
// pageSchema, model, action, app, arguments
//ES6 variant ( modern browsers only )
<some-component @someEvent="(something)=>namedAction('handleEvents',{something:something})" ></some-component>
// action.options.something will contain the parameter 'something' objectLast updated
Was this helpful?