I am currently working on building an app in Vue.js using Element-UI and I am fairly new to using Element-UI. I have created a table using el-table. I have managed to add contents in the table. Now, I have a delete button in each row of the table. After I click the delete button, it should delete the row successfully (ie, make a DELETE axios or http request to the server and delete that user from the database). In order to do that, I need to access the contents or just the username in that specific row. How do I do this?
Find my HTML (Delete) code below:
HTML part of Vue.js:
<el-table>
<el-table-column
width="75"
prop="name">
<template slot-scope="scope">
<!--Adding the delete button -->
<el-button
size="mini"
type="danger"
icon="el-icon-delete" circle
@click="users_delete_visible = true"
>
</el-button>
</template>
</el-table-column>
</el-table>
There is a column for username as well in the table created using the el-table. How do I modify the above html code in order to access the name in the row when pressed on the delete button?
Any help would really be appreciated. I am stuck on this for quite sometime.
Thank you