javascript - Replace vuejs variables with blade if vuejs variables is empty -


i'm using laravel blade vue js in same view. test if vueobject exists display vue js tag, if not display bladearray blade template tag below :

<p v-if="vueobject"> @{{ vueobject.firstname }} </p> <p v-if="!vueobject"> {{ $bladearray['firstname'] }} </p>  <p v-if="vueobject"> @{{ vueobject.lastname }} </p> <p v-if="!vueobject"> {{ $bladearray['lastname'] }} </p>  <p v-if="vueobject"> @{{ vueobject.email }} </p> <p v-if="!vueobject"> {{ $bladearray['email'] }} </p>  <p v-if="vueobject"> @{{ vueobject.phone }} </p> <p v-if="!vueobject"> {{ $bladearray['phone'] }} </p>  ......... 

i have 30 vars (firstname, lastname.....). issue it's make conditions code above. there better solution that?


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -