From 408c0ef4315080b91d2da5e4159784234fc79098 Mon Sep 17 00:00:00 2001 From: Maxim Stogniy Date: Thu, 21 May 2020 22:14:52 +1200 Subject: [PATCH] Works connected to backend --- src/admin/components/Works/Work.vue | 51 ++++++++++++++++---- src/admin/components/Works/WorkEdit.vue | 33 ++++++------- src/admin/components/Works/Works.vue | 62 ++++++------------------- src/admin/store/modules/works.js | 5 +- 4 files changed, 74 insertions(+), 77 deletions(-) diff --git a/src/admin/components/Works/Work.vue b/src/admin/components/Works/Work.vue index e42fa63..4f2b551 100644 --- a/src/admin/components/Works/Work.vue +++ b/src/admin/components/Works/Work.vue @@ -2,7 +2,7 @@ .work.card .work__preview .work__image-wrap - img(:src="value.image").work__image + img(:src="workImage").work__image .work__tags ul.work__tags-list li.work__tag( @@ -11,19 +11,33 @@ ) .tag {{tag}} .work__info - .work__title {{value.title}} + .work__title {{work.title}} .work__decs - p {{value.desc}} - a(:href="value.link").work__link http:{{value.link}} + p {{work.description}} + a(:href="work.link").work__link {{work.link}} .work__btns - CardBtn(title="Править" icon="edit") - CardBtn(title="Удалить" icon="delete") + CardBtn( + title="Править" + icon="edit" + @click="editWork" + ) + CardBtn( + title="Удалить" + icon="delete" + @click="deleteWork(work.id)" + )