How to realize this kind of registration switching effect by using vue framework

how do you realize that a registration page needs to switch between individual registration and institutional registration?

clipboard.png

May.27,2021

v-if/v-else or v-show isn't it over.


similar to the tab component, the content registered by an individual / institution is written as two components, view1,view2. Define a variable currentView, that defaults to view1.

<component :is="currentView"></component>

the two buttons above toggle the value of currentView when clicked.


A router-view, in the parent component clicks to switch routes to redirect


routes (reasonable is not recommended, and the organization is a bit complicated), v-if/v-show (reasonable is not good for maintenance), and two components (dynamic components, there are actually a little more similarities with the two components of keep-alive, but it will be clearer for each to maintain its own data). From a simple and easy-to-understand point of view, I recommend vMurshow, the component form should be a little more practical

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2bc95-2bab3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2bc95-2bab3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?