|
|
@ -2,19 +2,39 @@
|
|
|
|
<div class="shot">
|
|
|
|
<div class="shot">
|
|
|
|
<button class="remove" @click="emit('remove')">x</button>
|
|
|
|
<button class="remove" @click="emit('remove')">x</button>
|
|
|
|
<img :src="img">
|
|
|
|
<img :src="img">
|
|
|
|
<div class="meta">
|
|
|
|
<div class="meta" v-if="!edit" @dblclick="edit=true">
|
|
|
|
<span class="order">{{order}}</span>
|
|
|
|
<span class="order">{{order}}</span>
|
|
|
|
<h3 class="title" >{{title}}</h3>
|
|
|
|
<h3 class="title" >{{title}}</h3>
|
|
|
|
<p class="description">{{description}}</p>
|
|
|
|
<p class="description">{{description}}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<form class="meta" v-else>
|
|
|
|
|
|
|
|
<input class="title" v-model="shotTitle">
|
|
|
|
|
|
|
|
<textarea class="description" v-model="shotDescription"></textarea>
|
|
|
|
|
|
|
|
<button @click.prevent="update">Confirm</button>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script setup>
|
|
|
|
<script setup>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import {ref } from 'vue'
|
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps(['title', 'description', 'img', 'order'])
|
|
|
|
const props = defineProps(['title', 'description', 'img', 'order'])
|
|
|
|
const emit = defineEmits(['remove'])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const shotTitle = ref(props.title)
|
|
|
|
|
|
|
|
const shotDescription = ref(props.description)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const emit = defineEmits(['remove', 'update'])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const edit = ref(false)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const update = () => {
|
|
|
|
|
|
|
|
emit('update', {title: shotTitle.value, description: shotDescription.value, order: props.order})
|
|
|
|
|
|
|
|
edit.value = false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
<style>
|
|
|
|
<style>
|
|
|
|