You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
962 B
47 lines
962 B
4 years ago
|
<template>
|
||
|
<div class="container">
|
||
|
<el-tabs v-model="activeName" type="card">
|
||
|
<el-tab-pane label="登录" name="login">
|
||
|
<login :on-login="onLogin"/>
|
||
|
</el-tab-pane>
|
||
|
<el-tab-pane label="注册" name="register">
|
||
|
<register :on-register="onRegister"/>
|
||
|
</el-tab-pane>
|
||
|
</el-tabs>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import Login from '../../components/login'
|
||
|
import Register from '../../components/register'
|
||
|
|
||
|
export default {
|
||
|
name: 'index',
|
||
|
components: { Register, Login },
|
||
|
data() {
|
||
|
return {
|
||
|
activeName: 'login'
|
||
|
};
|
||
|
},
|
||
|
methods: {
|
||
|
onLogin(user,password){
|
||
|
console.info(user,password)
|
||
|
|
||
|
},
|
||
|
onRegister(user,password){
|
||
|
console.info(user,password)
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
<style>
|
||
|
.container {
|
||
|
margin: 0 auto;
|
||
|
min-height: 100vh;
|
||
|
display: flex;
|
||
|
justify-content: center;
|
||
|
align-items: center;
|
||
|
text-align: center;
|
||
|
}
|
||
|
</style>
|