![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/vreg/components/Forms/ |
<template> <p v-if="errorMsg" v-html="errorMsg" class="form-error-msg"></p> </template> <script> export default { name: "FormErrorMsg", props: { msg: { type: String } }, data() { return { errorMsg: '' } }, mounted() { this.setFormErrorMsg(this.msg); }, methods: { setFormErrorMsg(msg) { this.errorMsg = msg; } }, beforeMount() { this.$eventBus.$on('setFormErrorMsg', this.setFormErrorMsg) }, watch: { msg() { this.setFormErrorMsg(this.msg); } } } </script> <style scoped> .form-error-msg { text-align: right; margin-top: 10px; color: red; font-weight: bold; } </style>