我如何從computedVue.js 中返回一個數組?我收到此錯誤:“currentData”計算屬性 vue/no-side-effects-in-computed-properties 中的錯誤意外副作用...我的代碼如下:export default { computed: { currentData: function() { this.series[0].data = [1, 2, 3, 4, 5, 6, 7, 8]; return this.series[0].data; } }};<template> <div> {{currentData}} </div></template>
“currentData”計算屬性中的意外副作用
米琪卡哇伊
2023-06-09 14:57:08