element表格变化后自动刷新的方法有哪些
方案一:
在table上加上:key="Math.random()",但是这种方法需要触发热更新才会刷新数据,比如保存
{{ scope.row.id }} name: {{ scope.row.name }}{{ scope.row.name }} ... {{ scope.row.price }}Edit Delete
方案二:
定义成响应式数据
如果定义成 const goodsList = [ ] 是不会自动刷新的
定义成 const goodsList = ref([ ]) 就行