25 lines
481 B
Vue
25 lines
481 B
Vue
|
<template>
|
||
|
<form @submit="check">
|
||
|
<h2>Vorschau</h2>
|
||
|
|
||
|
<button value="good">Sieht gesund aus. Absenden!</button>
|
||
|
<button value="bad" class="back">Da fehlt noch was. Zurück!</button>
|
||
|
</form>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
name: "Preview",
|
||
|
|
||
|
methods: {
|
||
|
check(event) {
|
||
|
if (event.submitter.value === "good") {
|
||
|
this.$emit("success");
|
||
|
} else {
|
||
|
this.$emit("failure");
|
||
|
}
|
||
|
event.preventDefault();
|
||
|
},
|
||
|
},
|
||
|
};
|
||
|
</script>
|