基于AntDesign Vue的响应式登录页面

article/2025/10/12 18:14:27

为了做一个自己的前后端分离的后台管理系统,特地做了一下登录页面。大概的架子如下,后面需要替换一下顶部导航的信息。先大概贴一下代码,以后直接复制使用。整体的布局是自己写的样式,如果后面要替换为其他的UI框架,比如element ui 、 iview,只需要替换表单元素之类的东西,少量替换即可。
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
代码如下:

<template><div id="login" class="loginContainer"><div class="loginHeader"><span>TianSJ后台管理系统</span></div><div class="loginMainWrapper"><div class="loginWrapper"><div class="loginTipsWrapper" style="color: #ffffff"><span class="siteSummaryTitle">田少蛟博客管理系统</span><div class="siteSummary"><ul><li><a-icon type="check-square" style="margin-right: 10px"/><span>统一方便的资源管理</span></li><li><a-icon type="check-square" style="margin-right: 10px"/><span>友好的界面展示,基于AntDesign组件库</span></li><li><a-icon type="check-square" style="margin-right: 10px"/><span>基于角色权限划分,更利于资源隔离</span></li><li><a-icon type="check-square" style="margin-right: 10px"/><span>前后端分离,便于维护</span></li><li><a-icon type="check-square" style="margin-right: 10px"/><span>前后端均支持多实例部署</span></li></ul></div></div><div class="loginBoxWrapper"><a-form-model :model="formInline" @submit="handleSubmit" @submit.native.prevent style="width: 100%"><a-form-model-item style="text-align: center"><h1>欢迎登录</h1></a-form-model-item><a-form-model-item><a-input v-model="formInline.user" placeholder="账号"><a-icon slot="prefix" type="user" style="color:rgba(0,0,0,.25)" /></a-input></a-form-model-item><a-form-model-item><a-input v-model="formInline.password" type="password" placeholder="密码"><a-icon slot="prefix" type="lock" style="color:rgba(0,0,0,.25)" /></a-input></a-form-model-item><a-form-model-item><div class="rememberMeWrapper"><a-checkbox-group v-model="formInline.resource"><a-checkbox value="true" name="type">记住密码</a-checkbox></a-checkbox-group><a href="">忘记密码</a></div></a-form-model-item><a-form-model-item><router-link to="/admin" style="width: 100%" class="ant-btn ant-btn-primary">立即登录</router-link>还没有账号?<a href="" class="ant-btn ant-btn-link">立即注册</a></a-form-model-item><a-divider>其他登录方式</a-divider><a-form-model-item style="text-align: center"><a-space size="large"><a-icon type="weibo" style="font-size: 2em;cursor: pointer;color:#f50"/><a-icon type="qq" style="font-size: 2em;cursor: pointer;color:#2b92e4;"/><a-icon type="github" style="font-size: 2em;cursor: pointer;color:#333;"/></a-space></a-form-model-item></a-form-model></div></div><div class="loginFooter">© 2018-2021 CoreCmd 版权所有.ICP18063315-1 贵公网安备 52038202001416</div></div></div>
</template><script>export default {name: "login",data() {return {formInline: {user: '',password: '',resource:'',},};},methods: {handleSubmit(e) {console.log(this.formInline);},},}
</script><style scoped>.loginContainer{width: 100%;position: relative;background: url(https://img1.baidu.com/it/u=564468332,1185985646&fm=26&fmt=auto&gp=0.jpg);background-attachment: fixed;background-repeat: no-repeat !important;background-size: cover;background-position: center;padding-top: 105px;min-height: 100%;}.loginHeader{width: 100%;height: 64px;background-color: #ffffff;position: fixed;left: 0;right: 0;top: 0;z-index: 1000;box-shadow: 0 2px 15px rgba(0,0,0,.2);display: flex;align-items: center;justify-content: flex-start;flex-direction: row;padding: 10px;}.loginHeader span{font-size: 25px;font-weight: 700;}.loginMainWrapper{width: 100%;display: flex;justify-content: space-between;flex-direction: column;align-items: center;}.loginWrapper{width: 90%;display: flex;align-items: flex-start;justify-content: center;flex-direction: row;height: 100%;}.loginFooter{width: 100%;min-height: 64px;display: flex;justify-content: center;align-items: flex-start;flex-direction: row;text-align: center;color: #ffffff;margin-top: 40px;}.siteSummary ul{list-style: none;padding: 0;}.siteSummary ul li{margin-top: 10px;list-style: none;}@media screen and (min-width: 1200px){.loginTipsWrapper{padding: 20px 30px;display: flex;align-items: flex-start;justify-content: center;flex-direction: column;min-height: 100%;}.loginBoxWrapper{background-color: #ffffff;padding: 20px;width: 400px;height: 100%;border-radius: 5px;}}@media screen and (min-width: 769px) and (max-width: 1200px){.loginTipsWrapper{padding: 20px 30px;display: flex;align-items: flex-start;justify-content: center;flex-direction: column;height: 100%;}.loginBoxWrapper{background-color: #ffffff;padding: 20px;width: 400px;height: 100%;border-radius: 5px;}}@media screen and (max-width: 768px){.loginTipsWrapper{display: none;}.loginBoxWrapper{background-color: #ffffff;padding: 20px;width: 100%;border-radius: 5px;}}.rememberMeWrapper{width: 100%;display: flex;align-items: center;justify-content: space-between;flex-direction: row;}.siteSummaryTitle{color: #ffffff;font-size: 1.5rem;font-weight: 700;}.siteSummary{margin-top: 25px;color: #ffffff;font-size: 1.2rem;font-weight: 300;}
</style>

http://chatgpt.dhexx.cn/article/Z8nEp2DE.shtml

相关文章

Angular最新教程-第六节编写响应式导航栏

这节课我们讲解如何使用bootstrap 4 编写响应式布局。 参考图我们还是参照Angular中文社区http://www.angularjs.cn/ 图中标注红色的部分,我自己不是很喜欢,所以做了一点小改动。 他这里也没有做响应式布局,所以样式就不抄他的,我们自己重写。 首先我们先简要的分析一…

什么是响应式网页设计?响应式布局的实现原理

2019独角兽企业重金招聘Python工程师标准>>> 概念 响应式网页设计最初是由 Ethan Marcotte 提出的一个概念&#xff1a;为什么一定要为每个用户群各自打造一套设计和开发方案&#xff1f;Web设计应该做到根据不同设备环境自动响应及调整。当然响应式Web设计不仅仅是…

【Bootstrap】两个常用布局,居中布局和全屏左右布局,响应式布局

居中布局 居中布局&#xff0c;上面为菜单&#xff0c;下面为内容&#xff0c;内容居中&#xff0c;无论屏幕多宽&#xff0c;内容总是在中间 代码 <!DOCTYPE html> <html> <head><meta http-equiv"Content-Type" content"text/html; cha…

响应式页面实现

响应式网页设计最初是由 Ethan Marcotte 提出的一个概念&#xff1a;为什么一定要为每个用户群各自打造一套设计和开发方案&#xff1f;Web设计应该做到根据不同设备环境自动响应及调整。当然响应式Web设计不仅仅是关于屏幕分辨率自适应以及自动缩放的图片等等&#xff0c;它更…

移动端页面布局(响应式布局)以及meta标签的设置

响应式网站设计 什么是响应式布局? 1、服务器根据不同的浏览器用户端,为用户呈现不同的页面效果。 2、可以让一个网站兼容不同分辨率的设备,给用户更好的视觉使用体验。 3、移动互联网催生了响应式布局的诞生。 响应式设计优缺点 优点: 解决了设备之间的差异化展示,让不同的…

移动端基础及响应式布局

目录 1.移动端概述和hybird模式 2.响应式布局基础 3.响应式布局之流式布局 4.做移动端项目之前的准备 5.响应式布局demo 6.rem响应式布局 7.swiper的使用和轮播图 8.综合案例-微信场景应用 1.移动端概述和hybird模式 移动端&#xff1a;运行在移动设备上的产品 产品…

linux 透明图片,FreeImage 生成带透明通道的GIF

FreeImage 生成带透明通道的GIF 主要方法&#xff1a; 加载图像及读取参数 FreeImage_Load FreeImage_GetWidth FreeImage_GetHeight FreeImage_Allocate FreeImage_GetPixelColor FreeImage_SetPixelColor 保存GIF FreeImage_OpenMultiBitmap FreeImage_SetMetadata FreeImage…

freeimage转到cvmat 单通道图像转到3通道[freeimage][cvmat]

0 结果 1 代码 将freeImage转为cv::mat&#xff0c;代码如下&#xff1a; #include <FreeImage.h> #include <opencv2\opencv.hpp> using namespace cv;// #define _CRT_SECURE_NO_WARNINGS #pragma warning(disable : 4996) void FI2MAT(FIBITMAP* src, Mat&…

linux系统下替换图片,Linux(ubuntu系统)下使用FreeImage库

Linux(ubuntu系统)下使用FreeImage库 Linux(ubuntu系统)下使用FreeImage库 最近在搞一个图像处理的项目,需要用到FreeImage,之前在Windows下用过,很简单,因为FreeImage官网提供了可供使用的静态库动态库,直接包含就行了。现在需要在Linux平台下使用,发现官网并没有提供直…

计算机中缺失freeimage.dll,修复freeimage.dll

freeimage.dll是一款如果丢失会造成系统无法造成运行等问题的重要文件。今天久友下载站小编教大家一个修复freeimage.dll文件的方法&#xff0c;来久友下载站下载 freeimage.dll进行安装修复即可。Freeimage.dll是程序访问的组合文件&#xff0c;支持方便的程序打开&#xff0c…

Linux FreeImage安装编译

1.下载FreeImage 安照包 wget http://downloads.sourceforge.net/freeimage/FreeImage3170.zip #解压 unzip FreeImage3170.zip -d freeImage 2.对安装包进行编译 cd freeImagesudo make 类型转换错误解决&#xff1a; Source/LibRawLite/./internal/dcraw_common.cpp: 在…

c语言freeimage库文件,FreeImage使用方法amp;FreeImage Tutorial

前言 四大图像库&#xff1a;OpenCV&#xff1a;功能十分的强大&#xff0c;而且支持目前先进的图像处理技术&#xff0c;体系十分完善&#xff0c;操作手册很详细&#xff0c;手册首先给大家补计算机视觉的知识&#xff0c;几乎涵盖了近10年内的主流算法&#xff1b; http://s…

windows下FreeImage编译

windows下FreeImage编译 FreeImage下载 FreeImage下载地址 点击左边的“Download” 选择 “Download FreeImage 3.18.0 [WIN32/WIN64]” vs2019打开工程 下载后解压&#xff0c;直接打开&#xff1a;FreeImage.2017.sln 生成dll、lib文件 接下来编译C Wraper的 测试工程…

Qt Creator配置FreeImage库

第零步&#xff1a;前言 根据官网介绍&#xff1a; FreeImage 是一个开源库项目&#xff0c;面向希望支持当今多媒体应用程序所需的流行图形图像格式&#xff08;如 PNG&#xff0c;BMP&#xff0c;JPEG&#xff0c;TIFF 和其他格式&#xff09;的开发人员。FreeImage 易于使用…

FreeImage

freeimage.lib下载地址&#xff1a; http://freeimage.sourceforge.net/ FreeImage is an Open Source library project for developers who would like to support popular graphics image formats like PNG, BMP, JPEG, TIFF and others as needed by todays multimedia ap…

FreeImage库的配置及部分使用(windows)

1、首先下载FreeImage库&#xff0c;http://freeimage.sourceforge.net/download.html&#xff0c;下载如下 2、解压后&#xff0c;如下图所示&#xff1a; 打开2013sln&#xff0c;编译FreeImageLib这个项目&#xff08;设为启动项&#xff09;&#xff0c;根据debug/release版…

void *的使用

void * 为 “不确定类型指针”。 void *不可以解引用 &#xff08;1&#xff09;void *可以接受任何类型的赋值&#xff1a; 任何类型的指针都可以直接赋值给void *型指针&#xff0c;无需进行强制类型转换&#xff0c;相当于void *包含了其他类型的指针。 &#xff08;2&a…

C语言中void的高级应用

C语言中void的高级应用 C语言中的void关键字&#xff0c;void 表示为“无”、“空”、“没有”的意思。所以void是不能用来定义变量的&#xff0c;因为变量是需要固定的空间的 //定时时&#xff0c;编译不通过 void ch a; void a 10;一、void的常用场景 1.1 函数的参数 v…

【C语言】void 和 void* 类型

一. void 类型 1. 为何不能定义 void 类型的变量 为什么不能定义 void 类型的变量&#xff1f;因为它是空类型&#xff0c;不能够为变量提供空间吗&#xff1f; 定义变量的本质是开辟空间&#xff0c;我们用 sizeof 来计算 void 类型的大小&#xff1a; 在vs2017下&#xf…

函数类型——void(无类型函数)

void属于函数类型中的无类型函数之对应的还有实型&#xff08;float,double&#xff09;&#xff0c;整型&#xff08;int&#xff09;&#xff0c;布尔型&#xff08;bool&#xff09;和字符型&#xff08;char&#xff09;。 在介绍void之前先介绍“返回值”&#xff1a; 就…