Variables in Vue are rendered successfully, but input mutation is undefined?

data file
clipboard.png

//

clipboard.png

//mutations.js

clipboard.png


item.textdelete
iditem.textpropundefined

click
clipboard.png

question and answer:, mutation API accepts only two parameters

Mar.03,2021

the deleteItem function you called has no corresponding parameters.


Mutation function only accepts (state,data) if there is more than one data in the data, you need to wrap it in an object such as ({id:xxx,
name:xxx})

.
Menu