Skip to content

Commit

Permalink
BC-5506: fix title-input and form-news
Browse files Browse the repository at this point in the history
  • Loading branch information
uidp committed Oct 16, 2023
1 parent 1ebe4cf commit 80b3c77
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
34 changes: 18 additions & 16 deletions src/components/molecules/TitleInput.vue
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
<template>
<base-input
v-bind="{ ...$attrs, ...$props }"
:model-value="vmodel"
v-model="value"
classes="h1"
:label-hidden="true"
/>
</template>
<script>
export default {
inheritAttrs: false,
model: {
prop: "vmodel",
event: "update:vmodel",
<script setup lang="ts">
import { computed } from "vue";
const props = defineProps({
modelValue: {
type: [String, Number],
required: true,
},
props: {
vmodel: {
type: [String, Number],
required: true,
},
});
const emit = defineEmits(["update:modelValue"]);
const value = computed({
get() {
return props.modelValue;
},
data() {
// This solely exists to appear in the coverage report
return {};
set(value) {
emit("update:modelValue", value);
},
};
});
</script>
6 changes: 1 addition & 5 deletions src/components/organisms/FormNews.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
:error="errors.content"
:required="true"
:placeholder="
$t('components.organisms.FormNews.editor.placeholder').toString()
$t('components.organisms.FormNews.editor.placeholder')
"
/>
<transition name="fade">
Expand Down Expand Up @@ -103,10 +103,6 @@ export default defineComponent({
TitleInput,
FormActions,
},
model: {
prop: "news",
event: "update:news",
},
props: {
news: {
type: Object,
Expand Down

0 comments on commit 80b3c77

Please sign in to comment.