Vue state uses newspaper undefined in method

vuex uses mapstate to map state (attributeData: state = > state.kickoff.attributeData is used in the code), in the template < template VMI for = "(attritem, index) in attributeData" > you can use state to access state data, but in method you use this.attributeData and print, all undefined. I would like to ask why the attributeDatavalue cannot be obtained

Mar.13,2021

template acquires data. If the mechanism of obtaining data in method is different, use the computed attribute to convert it:

computed:{
    attrData(){
        return state.kickoff.attributeData
    }
}
Menu