File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed
resources/js/screens/posts Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 3737 this .close ();
3838 },
3939
40+ /**
41+ * Remove image
42+ */
43+ removeImage () {
44+ this .imageUrl = null ;
45+ this .$emit (' removed' );
46+ },
47+
4048
4149 /**
4250 * Close the modal.
7684 <preloader v-if =" uploading" ></preloader >
7785
7886 <div v-if =" imageUrl && !uploading" >
79- <img :src =" imageUrl" class =" max-w-full" >
87+ <div class =" relative" >
88+ <button @click =" removeImage"
89+ class =" btn-sm bg-red absolute pin-t pin-r border-black rounded mr-1 mt-1 h-6 w-8 bg-very-light" >
90+ <svg xmlns =" http://www.w3.org/2000/svg" fill =" none" viewBox =" 0 0 24 24" stroke =" currentColor" >
91+ <path stroke-linecap =" round" stroke-linejoin =" round" stroke-width =" 2" d =" M6 18L18 6M6 6l12 12" />
92+ </svg >
93+ </button >
94+ <img :src =" imageUrl" class =" max-w-full" >
95+ </div >
8096
8197 <div class =" input-group" >
8298 <label class =" input-label" >Caption</label >
Original file line number Diff line number Diff line change 271271 },
272272
273273
274+ /**
275+ * Handle the change event of featured images.
276+ */
277+ featuredImageRemoved () {
278+ this .form .featured_image = null ;
279+ this .form .featured_image_caption = null ;
280+ },
281+
282+
274283 /**
275284 * Close the SEO modal.
276285 */
507516 <!-- Featured Image Modal -->
508517 <featured-image-uploader :post-id =" this.form.id"
509518 @changed =" featuredImageChanged"
519+ @removed =" featuredImageRemoved"
510520 :current-image-url =" form.featured_image"
511521 :current-caption =" form.featured_image_caption" ></featured-image-uploader >
512522 </div >
You can’t perform that action at this time.
0 commit comments