File tree Expand file tree Collapse file tree 2 files changed +36
-5
lines changed Expand file tree Collapse file tree 2 files changed +36
-5
lines changed Original file line number Diff line number Diff line change 11 <template >
2-  <div  class =" text-color-secondary text-3xl font-semibold m-5"  >Edit Book </div >
2+  <div  class =" text-color-secondary text-3xl font-semibold m-5"  >{{ title }} </div >
33 <Fieldset  class =" mx-6"   legend =" Godfather I"  >
44 <div  class =" mb-4"  >
55 <label  for =" id"   class =" block text-base font-medium mb-2"  >Id</label >
6565 <label  for =" year"   class =" block text-base font-medium mb-2"  >Year</label >
6666 <InputText  id =" year"   type =" text"   class =" w-full"   />
6767 </div >
68+ 
69+  <!--  <Button label="Delete" icon="pi pi-trash" /> --> 
70+ 
71+  <div  class =" grid my-6"  >
72+  <div  class =" col"  >
73+  <Button 
74+  label =" Cancel" 
75+  icon =" pi pi-times" 
76+  class =" w-full p-button-outlined" 
77+  />
78+  </div >
79+  <div  class =" col"  >
80+  <Button  label =" Save"   icon =" pi pi-check"   class =" w-full"   />
81+  </div >
82+  </div >
6883 </Fieldset >
6984</template >
7085
@@ -77,5 +92,13 @@ export default {
7792 default:  0 , 
7893 }, 
7994 }, 
95+  computed:  { 
96+  isAddMode () { 
97+  return  ! this .id ; 
98+  }, 
99+  title () { 
100+  return  ` ${ this .isAddMode  ?  " Add"   :  " Edit" }   Book`  ; 
101+  }, 
102+  }, 
80103}; 
81104 </script >
Original file line number Diff line number Diff line change 11<template >
22 <div  class =" text-color-secondary text-3xl font-semibold m-5"  >
33 Books
4-  <Button 
5-  icon =" pi pi-plus" 
6-  class =" p-button-rounded p-button-secondary p-button-outlined ml-5" 
7-  />
4+ 
5+  <router-link 
6+  :to =" { name: 'book-detail', params: { id: 0 } }" 
7+  custom 
8+  v-slot =" { navigate }" 
9+  >
10+  <Button 
11+  icon =" pi pi-plus" 
12+  class =" p-button-rounded p-button-secondary p-button-outlined ml-5" 
13+  @click =" navigate" 
14+  />
15+  </router-link >
816 </div >
917
1018 <Message  class =" mx-5"   :closable =" false"   :severity =" messageSeverity"  >{{
                                 You can’t perform that action at this time. 
               
                  
0 commit comments