File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 3131 <button class =" action-btn play-btn" @click =" $emit('play', item)" title =" Iniciar" >
3232 <i class =" fas fa-play" ></i >
3333 </button >
34- <button class =" action-btn edit-btn" @click =" $emit('edit', item)" title =" Editar" >
34+ <button
35+ class =" action-btn edit-btn"
36+ @click =" $emit('edit', { event: 'edit', item })"
37+ title =" Editar"
38+ >
3539 <i class =" fas fa-edit" ></i >
3640 </button >
37- <button class =" action-btn delete-btn" @click =" $emit('delete', item)" title =" Excluir" >
41+ <button
42+ class =" action-btn delete-btn"
43+ @click =" $emit('delete', { event: 'delete', item })"
44+ title =" Excluir"
45+ >
3846 <i class =" fas fa-trash" ></i >
3947 </button >
4048 </div >
Original file line number Diff line number Diff line change 22 <link rel =" stylesheet" href =" https://cdn.jsdelivr.net/npm/bulma@1.0.4/css/bulma.min.css" />
33 <DefaultMain :primary-text =" 'Projetos'" :second-text =" 'Organize seu trabalho em projetos'" >
44 <CreateButton :name =" name" />
5- <List :list =" projectsList" />
5+ <List :list =" projectsList" @edit = " CrudOperation " @delete = " CrudOperation " />
66 </DefaultMain >
77</template >
88
@@ -27,6 +27,11 @@ export default defineComponent({
2727 name: ' projeto' ,
2828 }
2929 },
30+ methods: {
31+ CrudOperation(data : Record <string , any >) {
32+ console .log ({ event: data .event , data: data .item })
33+ },
34+ },
3035 async created() {
3136 this .projectsList = await getGenericEndPoint (' projects' )
3237 },
You can’t perform that action at this time.
0 commit comments