網站首頁 編程語言 正文
注冊頁面沒什么好說的,相應的路由項要增加,主頁面中的按鈕也要綁定
<script setup>
import {reactive} from "vue";
import router from "@/router";
import {Lock, User, Message} from "@element-plus/icons-vue";
const form=reactive(({
username: '',
password:'',
password_repeat:'',
email:'',
code:''
}))
const rule={
}
</script>
<template>
<div style="text-align: center;margin:0 20px">
<div style="margin-top: 100px">
<div style="font-size: 25px;font-weight: bold">注冊新用戶</div>
<div style="font-size: 14px;color:grey">歡迎注冊我們的學習平臺,請在下方填寫相關信息</div>
</div>
<div style="margin-top:50px">
<el-form :model="form" :rules="rule">
<el-form-item>
<el-input v-model="form.username" maxlength="10" type="text" placeholder="用戶名">
<template #prefix>
<el-icon> <User /> </el-icon>
</template>
</el-input>
</el-form-item>
<el-form-item>
<el-input v-model="form.password" maxlength="10" type="password" placeholder="密碼">
<template #prefix>
<el-icon> <Lock /> </el-icon>
</template>
</el-input>
</el-form-item>
<el-form-item>
<el-input v-model="form.password_repeat" maxlength="10" type="password" placeholder="重復密碼">
<template #prefix>
<el-icon> <Lock /> </el-icon>
</template>
</el-input>
</el-form-item>
<el-form-item>
<el-input v-model="form.email" maxlength="10" type="text" placeholder="電子郵件地址">
<template #prefix>
<el-icon> <Message /> </el-icon>
</template>
</el-input>
</el-form-item>
<el-form-item>
<el-row :gutter="10" style="width: 100%">
<el-col :span="17">
<el-input v-model="form.code" maxlength="10" type="password" placeholder="驗證碼">
<template #prefix>
<el-icon> <Message /> </el-icon>
</template>
</el-input>
</el-col>
<el-col :span="5">
<el-button type="success" >獲取驗證碼</el-button>
</el-col>
</el-row>
</el-form-item>
</el-form>
<div style="">
<el-button style="width: 270px" type="warning" plain>
立即注冊
</el-button>
</div>
<div style="margin-top: 20px">
<span style="font-size: 14px;color: grey;line-height: 15px">已有賬號?</span>
<el-link style="translate:0 -1px" @click="router.push('/')">立即登錄</el-link>
</div>
</div>
</div>
</template>
<style scoped>
</style>
Component inside renders non-element root node that cannot be animated.注意這里transition報錯,在所有頁面的template中都要使用div包裹起來
在welcomeview中加入過渡動畫
<template>
<div style="width: 100vw;height: 100vh;overflow: hidden;display: flex">
<div style="flex: 1;background-color: black">
<el-image src="http://pic.bizhi360.com/bbpic/53/11153.jpg" style="width: 100%;height: 100%" fit="cover"/>
</div>
<div class="welcome-title">
<div style="font-size: 30px;font-weight: bold">歡迎來到全球最大同性交友網站</div>
<div style="margin-top: 10px;">在這里你可以學習哲學,并且與哲學之父密切交流</div>
<div style="margin-top: 5px">在這里你可以同性交友,因為都是男的,沒有學哲學的女生</div>
</div>
<div class="right-card">
<router-view v-slot="{ Component }">
<Transition name="el-fade-in-linear" mode="out-in">
<component :is="Component"></component>
</Transition>
</router-view>
</div>
</div>
</template>
原文鏈接:https://blog.csdn.net/qq_40369277/article/details/133650572
- 上一篇:沒有了
- 下一篇:沒有了
相關推薦
- 2023-07-09 Golang syncMap 詳解
- 2022-06-19 Python?matplotlib實現條形統計圖_python
- 2022-03-12 Android導航欄功能項的顯示與屏蔽介紹_Android
- 2022-06-02 關于Python使用turtle庫畫任意圖的問題_python
- 2022-10-06 C++?pimpl機制詳細講解_C 語言
- 2023-06-03 Django使用jinja2模板的實現_python
- 2022-04-08 C語言互換最大值與最小值的位置_C 語言
- 2022-05-15 Web?API中使用Autofac實現依賴注入_實用技巧
- 欄目分類
-
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支