Commit 8e6d1a7d792e20e2e99cf2b65f9043938dae8b2f
1 parent
5ba0395a4e
Exists in
master
and in
3 other branches
solve bugs uplaod image in news
Showing
1 changed file
with
4 additions
and
2 deletions
Show diff stats
src/pages/News/news.vue
... | ... | @@ -99,9 +99,9 @@ |
99 | 99 | <v-layout justify-center> |
100 | 100 | <v-flex xs3 v-for="Image in editedItem.newsImageUrl" :key="Image._id" v-if="editedItem.newsImageUrl" class="profile-image-wrapper"> |
101 | 101 | <img :src="Image.imageUrl" height="160" width="160" alt="News" class="pa-2"> |
102 | - <v-icon class="red edit-profile-icon" dark @click="deleteImage(image._id,editedItem._id)">close</v-icon> | |
102 | + <v-icon class="red edit-profile-icon" dark @click="deleteImage(Image._id,editedItem._id)">close</v-icon> | |
103 | 103 | </v-flex> |
104 | - <v-flex v-for="(file, index) in files" :key="index" v-if="files" v-else-if="editedItem.newsImageUrl"> | |
104 | + <v-flex v-for="(file, index) in files" :key="index"> | |
105 | 105 | <img :src="file" height="160" width="160" class="pa-2"> |
106 | 106 | </v-flex> |
107 | 107 | </v-layout> |
... | ... | @@ -553,6 +553,7 @@ export default { |
553 | 553 | }); |
554 | 554 | }, |
555 | 555 | editItem(item) { |
556 | + this.files = []; | |
556 | 557 | this.editedIndex = this.desserts.indexOf(item); |
557 | 558 | this.editedItem = Object.assign({}, item); |
558 | 559 | this.dialog = true; |
... | ... | @@ -598,6 +599,7 @@ export default { |
598 | 599 | this.text = "Image deleted Successfully"; |
599 | 600 | } |
600 | 601 | this.getNewsList(); |
602 | + this.close(); | |
601 | 603 | }) |
602 | 604 | .catch(error => { |
603 | 605 | console.log(error); | ... | ... |