Handling unexpected side effect in computed properties - VueJS

前端 未结 4 474
闹比i
闹比i 2021-01-07 23:12

In the following code, I\'m trying to use the getTranslation object to map values present in originalKeys array and push the values in a new array

4条回答
  •  灰色年华
    2021-01-07 23:49

    As my above comment, you should not edit other data in computed property, you should use watch instead

    computed: {
        getkeys(){
            let tableHeaders = [];
            for( var i=0; i

提交回复
热议问题