Skip to content

Commit e0dbfe3

Browse files
committed
moved some logic from template to setup()
1 parent 14badbb commit e0dbfe3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/components/AuthorCardViewing.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<q-card
33
bordered
4-
v-bind:class="['bg-formcard', [...emailErrors, ...orcidErrors].length > 0 ? 'red-border has-error' : '']"
4+
v-bind:class="['bg-formcard', authorErrors.length > 0 ? 'red-border has-error' : '']"
55
flat
66
style="display: flex; flex-direction: row"
77
>
@@ -81,7 +81,9 @@ export default defineComponent({
8181
.filter(byError(errors.value))
8282
.map(query => query.replace.message)
8383
})
84+
const authorErrors = [...emailErrors.value, ...orcidErrors.value]
8485
return {
86+
authorErrors,
8587
emailErrors,
8688
orcidErrors
8789
}

0 commit comments

Comments
 (0)