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

2023-11-06

为了做一个自己的前后端分离的后台管理系统,特地做了一下登录页面。大概的架子如下,后面需要替换一下顶部导航的信息。先大概贴一下代码,以后直接复制使用。整体的布局是自己写的样式,如果后面要替换为其他的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>

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

基于AntDesign Vue的响应式登录页面 的相关文章

随机推荐

  • C++继承和多态特性

    文章目录 前言 1 什么是面向对象的继承特性 2 C 继承中的权限管控 3 继承体系下子类和父类的关系 4 派生类和基类的构造析构关系 5 派生类和基类的同名成员问题 6 子类和父类的类型兼容规则 7 继承的优势与不良继承 8 组合介绍以及
  • windows10家庭版远程桌面连接报错:CredSSP加密oracle修正

    原地址 https www cnblogs com lindajia p 9021082 html Windows10远程桌面连接 报错信息 网上找到方法 但是奈何是 Win10家庭版 不能使用这个办法 具体操作可以看最后的引用链接 策略路
  • 【应急响应】后门攻击检测指南&Rookit&内存马&权限维持&WIN&Linux

    文章目录 Windows实验 常规后门 网络对外连接查看 自启动测试 隐藏账户 映像劫持 屏保 登录 Linux实验 常规后门 Rootkit后门 GScan rkhunter 权限维持后门 GScan rkhunter Web层面 通用系
  • 秋叶大神的Stable Diffusion整合包

    前段时间在研究Stable Diffusion本地化部署 但是对于新手小白来说算是比较难得 不过没关系 我在B站发现了秋叶大神的Stable Diffusion整合包 我在用很方便 必须分享出来 Stable Diffusion整合包下载地
  • 基于vue的页面加载动画

    基本原理是 在window加载之前 渲染出加载动画 页面渲染完成后 移除加载动画即可 在vue项目中一般只需二步 第一步 写css和dom 在vue项目的index html中引入css 第二步 在app vue created中移除加载动
  • pytorch_lighting

    1 pytorch lighting 简介 1 1 pytorch lighting 是什么 1 1 1 pytorch lightning 是什么 PyTorch Lightning 是一个开源的 PyTorch 加速框架 它旨在帮助研究
  • vue+Element-ui实现树形组件、表格树

    需求 要做出如下图所示的 树形表格 也就是数据之间有父子类关系的这种 可以点击展开 收缩 像上图这样的表格树 实现 1 使用树形组件 在学习树形表格之前 肯定得先搞懂普通的树形组件是怎么搞的 然后将其套到表格中就好了 请参考ElementU
  • linux real时间,【整理】RT-linux 实时Linux RealTime Linux

    折腾 整理 数控系统 操作系统 期间 看提到了RT linux 去研究看看 RT linux Vanilla kernel的问题 Linux kernel在spinlock irq上下文方面无法抢占 因此高优先级任务被唤醒到得以执行的时间并
  • 力扣刷题:两数相加

    给你两个 非空 的链表 表示两个非负的整数 它们每位数字都是按照 逆序 的方式存储的 并且每个节点只能存储 一位 数字 请你将两个数相加 并以相同形式返回一个表示和的链表 你可以假设除了数字 0 之外 这两个数都不会以 0 开头 输入 l1
  • Android Studio Proxy Setting 设置(详细图文说明)

    Android Studio代理设置 Android Studio Proxy Setting 设置 在很多时候编译依赖的相关库文件都是需要墙出去的 所以我们得学会怎么翻 具体可以查查网上很多详细的攻略 这里只介绍墙完后Android St
  • 【深入理解C++】空类对象所占用的空间大小

    文章目录 1 须知 2 空类对象所占用的空间大小 3 一个类继承空类 4 空类作为另一个类的成员 1 须知 类本身是没有大小的 类的大小指的是类的对象所占的大小 如果用 sizeof 运算符对一个类型名操作 得到的是具有该类型实体的大小 2
  • 移植4- uboot之网卡驱动移植

    linux 中 网络分为许多层 网卡处理物理与DATA LINK层 linux驱动就是将DATALINK层的数据包送到TCP IP层进行处理 主要是通过struct net device这个结构 struct net device实现了支持
  • 字符串转化使用String.valueOf(value) 代替 “ “ + value

    文章目录 把其它对象或类型转化为字符串时 使用String valueOf value 比 value 的效率更高 把其它对象或类型转化为字符串反例 int num 520 value String strLove num 把其它对象或类型
  • 2023年超全前端面试题-背完稳稳拿offer(欢迎补充)

    HTML CSS相关 HTML5 HTML5新特性 增强了表单 input新增了一些type color 定义调色板 tel 定义包含电话号码的输入域 email 定义包含email地址的输入域 search 定义搜索域 number 定义
  • innodb索引概念

    author skate time 2013 04 09 总结记录下innodb的索引概念 以备查看 innodb索引分类 聚簇索引 clustered index 1 有主键时 根据主键创建聚簇索引 2 没有主键时 会用一个唯一且不为空的
  • Qt+Pyhton实现麒麟V10系统下word文档读写功能

    目录 前言 1 C 调用python 1 1 安装Python开发环境 1 2 修改Qt工程配置 1 3 初始化Python环境 1 4 C 调用Python 函数 1 5 常用的Python接口 2 python虚拟环境 2 1Pytho
  • python 编码规范-代码的整体布局

    代码的整体布局主要囊括了代码在整体结构上应该注意的事项 缩进 空格 制表符 Python 在语法上使用缩进来确定代码块的开始和结束 对于每一级缩进 应为 4 个空格 并且不要混用空格与制表符 缩进本身是一种语法上的限制 是强制性的 有的ID
  • 【计算机网络系列】网络层④:详解IP数据包的格式

    IP数据报的格式 IP数据报的格式说明协议IP都具有什么功能 在协议IP的标准中 描述首部格式的宽度是32位 即4字节 下图是IP数据报的完整格式 从上图可看出 一个IP数据报由首部和数据两部分组成 首部的前一部分长度是固定的 共20字节
  • 炉石传说一直显示重新连接服务器,炉石传说一直显示战网开启中 炉石传说卡在启动战网解决办法...

    很多炉石玩家在登录战网客户端出现炉石传说正在启动战网不动的问题 下面小编为大家带来炉石传说卡在启动战网解决办法 一起来看下吧 很多炉石玩家在登录战网客户端出现炉石传说正在启动战网不动的问题 下面小编为大家带来炉石传说卡在启动战网解决办法 一
  • 基于AntDesign Vue的响应式登录页面

    为了做一个自己的前后端分离的后台管理系统 特地做了一下登录页面 大概的架子如下 后面需要替换一下顶部导航的信息 先大概贴一下代码 以后直接复制使用 整体的布局是自己写的样式 如果后面要替换为其他的UI框架 比如element ui ivie