|
|
@ -9,6 +9,8 @@ export default {
|
|
|
|
const logs = ref([""]);
|
|
|
|
const logs = ref([""]);
|
|
|
|
const who = ref("");
|
|
|
|
const who = ref("");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const sent = ref(false);
|
|
|
|
|
|
|
|
|
|
|
|
const disabled = computed(() => {
|
|
|
|
const disabled = computed(() => {
|
|
|
|
return [title, description, nature, logs, who].some((input) => input.value == "");
|
|
|
|
return [title, description, nature, logs, who].some((input) => input.value == "");
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -25,46 +27,72 @@ export default {
|
|
|
|
who: who.value,
|
|
|
|
who: who.value,
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
sent.value = true;
|
|
|
|
|
|
|
|
title.value = "";
|
|
|
|
|
|
|
|
description.value = "";
|
|
|
|
|
|
|
|
nature.value = "";
|
|
|
|
|
|
|
|
logs.value = [""];
|
|
|
|
|
|
|
|
who.value = "";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
return { title, description, nature, logs, who, disabled, submit };
|
|
|
|
return { title, description, nature, logs, who, disabled, submit, sent };
|
|
|
|
},
|
|
|
|
},
|
|
|
|
template: `
|
|
|
|
template: `
|
|
|
|
<section class='recipe'>
|
|
|
|
<section class='recipe'>
|
|
|
|
<div class="entry">
|
|
|
|
|
|
|
|
<label for="title">Title</label>
|
|
|
|
|
|
|
|
<input type="text" v-model='title'/>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="entry">
|
|
|
|
|
|
|
|
<label for="description">Description</label>
|
|
|
|
|
|
|
|
<textarea v-model="description"></textarea>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="entry">
|
|
|
|
<div v-if="sent">
|
|
|
|
<label for="nature">Nature of the input</label>
|
|
|
|
|
|
|
|
<input type="text" v-model="nature" />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="entry">
|
|
|
|
<div class="entry">
|
|
|
|
<label for="log">Process Log</label>
|
|
|
|
Thanks for sharing!
|
|
|
|
<textarea v-model="logs[index]" v-for="(log, index) in logs" :key="index" :placeholder="index + 1"></textarea>
|
|
|
|
Your entry is being added to the cookbook.
|
|
|
|
<button class="add" @click="logs.push('')">+</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="entry">
|
|
|
|
<div class="entry">
|
|
|
|
<label for="who">Who</label>
|
|
|
|
<button @click="sent = false">Send another</button>
|
|
|
|
<input type="text" v-model="who" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div v-else>
|
|
|
|
|
|
|
|
<div class="entry">
|
|
|
|
|
|
|
|
<label for="title">Title</label>
|
|
|
|
|
|
|
|
<input type="text" v-model='title'/>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="entry">
|
|
|
|
|
|
|
|
<label for="description">Description</label>
|
|
|
|
|
|
|
|
<textarea v-model="description"></textarea>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="entry">
|
|
|
|
|
|
|
|
<label for="nature">Nature of the input</label>
|
|
|
|
|
|
|
|
<input type="text" v-model="nature" />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="entry">
|
|
|
|
|
|
|
|
<label for="log">Process Log</label>
|
|
|
|
|
|
|
|
<textarea v-model="logs[index]" v-for="(log, index) in logs" :key="index" :placeholder="index + 1"></textarea>
|
|
|
|
|
|
|
|
<button class="add" @click="logs.push('')">+</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="entry">
|
|
|
|
|
|
|
|
<label for="who">Who</label>
|
|
|
|
|
|
|
|
<input type="text" v-model="who" />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="entry">
|
|
|
|
<div class="entry">
|
|
|
|
<button @click="submit" class="submit" :disabled="disabled">Submit</button>
|
|
|
|
<button @click="submit" class="submit" :disabled="disabled">Submit</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <dl>
|
|
|
|
<!-- <dl>
|
|
|
|
<dt>Title</dt>
|
|
|
|
<dt>Title</dt>
|
|
|
|
<dd>{{title}}</dd>
|
|
|
|
<dd>{{title}}</dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dt>Description</dt>
|
|
|
|
<dt>Description</dt>
|
|
|
|
<dd>{{description}}</dd>
|
|
|
|
<dd>{{description}}</dd>
|
|
|
|