♻️ (production flow) use of defineModel
This commit is contained in:
@@ -2,22 +2,15 @@
|
|||||||
defineProps<{
|
defineProps<{
|
||||||
id: string
|
id: string
|
||||||
label: string
|
label: string
|
||||||
modelValue: string
|
|
||||||
}>()
|
|
||||||
defineEmits<{
|
|
||||||
(event: "update:modelValue", value: string): void
|
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
const modelValue = defineModel<string>()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="form-input">
|
<div class="form-input">
|
||||||
<label :for="id">{{ label }}</label>
|
<label :for="id">{{ label }}</label>
|
||||||
<input
|
<input type="text" id="id" v-model="modelValue" />
|
||||||
type="text"
|
|
||||||
id="id"
|
|
||||||
:value="modelValue"
|
|
||||||
@input="$emit('update:modelValue', $event.target?.value ?? '')"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const newTeam = ref("")
|
|||||||
|
|
||||||
const addTeam = () => {
|
const addTeam = () => {
|
||||||
store.addTeam({
|
store.addTeam({
|
||||||
name: "User Acceptance Testing",
|
name: newTeam.value,
|
||||||
outputs: ["Go for live"],
|
outputs: ["Go for live"],
|
||||||
prerequisites: ["new app version is step in staging environment"],
|
prerequisites: ["new app version is step in staging environment"],
|
||||||
intention:
|
intention:
|
||||||
|
|||||||
Reference in New Issue
Block a user