<td v-if="currentId != loop.id" class="text-center"> <div :set="currentId = loop.id">{{ loop.id }}</div> </td> <td v-else></td>
Need to achieve this goal It is a multidimensional parent/child array and needs to be printed on a table. So when the first parent prints on a line, we stop printing duplicate parents until its children are finished. console warning I have set currentId as loop.id, it is showing console warning.
P粉3889454322024-04-03 09:36:56
data() { return { currentId: '0', } }, methods: { assignCurrentId: function(id) { if( this.currentId == id) { return false; } else{ Object.defineProperty(this, 'currentId', {value: id, writeable: false}); return true; } }
Found something here to stop/disable the reactivity of variables and it's working now - https://stackoverflow.com/a/52844620/5156910