I want to create a 2-D array where the number of rows of the first dimension can be increased while clicking on a specific button.
<script setup>
...
//if define the table like that:
var tab=ref([])
//this is the function called on the click
function addrow(){
tab.value.push()
...
}
</script>
You don't need to add a ref, the tab
's value is already a reactive array, just add an array:
<script setup>
...
//if define the table like that:
var tab=ref([])
//this is the function called on the click
function addrow(){
tab.value.push([])
...
}
</script>