You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
621 B
Vue
37 lines
621 B
Vue
<template>
|
|
<div>
|
|
<div v-show="step === 0">
|
|
<Welcome />
|
|
</div>
|
|
<div v-show="step === 1">
|
|
<LoginForm />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { ref } from '../../utils/transformVue'
|
|
import LoginForm from './components/login-form.vue'
|
|
import Welcome from './components/welcome.vue'
|
|
import { onLoad, onUnload } from '@dcloudio/uni-app'
|
|
|
|
const step = ref(0) // 0: 欢迎页 1: 登录页
|
|
onLoad(() => {
|
|
uni.$on('login', () => {
|
|
step.value = 1
|
|
})
|
|
})
|
|
|
|
onUnload(() => {
|
|
uni.$off('login')
|
|
})
|
|
</script>
|
|
|
|
<style>
|
|
|
|
page {
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
}
|
|
</style>
|