当前位置: 首页 > wzjs >正文

推广展示类网站三门县正规营销型网站建设地址

推广展示类网站,三门县正规营销型网站建设地址,东莞seo网络营销策划,网件路由器登录密码1.删除创建项目默认代码项目启动&#xff0c;默认是以下页面代码所在目录 src>components>HelloWorld.vue直接删除此文件就可以&#xff0c;同时进入app.vue文件&#xff0c;重置此页面代码代码改为一下 <template><router-view /> </template> <sc…

1.删除创建项目默认代码

        项目启动,默认是以下页面

代码所在目录 src>components>HelloWorld.vue

直接删除此文件就可以,同时进入app.vue文件,重置此页面代码

 

代码改为一下 

<template><router-view />
</template>
<script setup lang="ts"></script>
<style scoped lang="less"></style>

2.创建登录页面文件

在src目录下面创建views文件夹存放页面文件

创建login.vue作为登录页面,并初始化页面代码(部分开发软件创建vue会自动生成初始化代码)

<template></template>
<script lang="ts" setup></script>
<style lang="less" scoped></style>

3.配置router文件

path:'/',代表是项目启动初始化页面

注:如果配置完成页面显示空白,查看main.ts文件是否引入router文件 ,如果引入还未显示,查看app.use(router)代码是否在app.mount('#app')代码之前,如果在此代码后,则修改前置

正确格式如下

4.编写login.vue 代码

<template><div id="login"><el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form" label-position='top' :hide-required-asterisk='true'><div class="title"><h1>欢迎登录</h1></div><el-form-item prop="userName" label="账号"><el-inputv-model="loginForm.userName"type="text"size="large"auto-complete="off"placeholder="请输入账号"><template #prefix><svg-icon icon-class="user" class="el-input__icon input-icon" /></template></el-input></el-form-item><el-form-item prop="password" label="密码"><el-inputv-model="loginForm.password"type="password"size="large"auto-complete="off"placeholder="请输入密码"show-password@keyup.enter="handleLogin"><template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template></el-input></el-form-item><el-form-item style="width: 100%"><el-button:loading="loading"size="large"type="primary"style="width: 100%"@click.prevent="handleLogin"><span v-if="!loading">登 录</span><span v-else>登 录 中...</span></el-button></el-form-item></el-form></div>
</template>
<script lang="ts" setup>
import { FormInstance } from 'element-plus';
import { reactive, ref } from 'vue';
const loading = ref(false);const loginForm = reactive({userName: '',password: ''
})
const loginRules = {userName: [{ required: true, trigger: 'blur', message: '请输入您的账号' }],password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }],code: [{ required: true, trigger: 'change', message: '请输入验证码' }],
};
const loginRef = ref<FormInstance>();
function handleLogin(){loginRef.value?.validate(valid => {})
}
</script>
<style lang="less" scoped>
#login{display: flex;justify-content: end;align-items: center;height: 100%;background-image: url('../assets/image/login-background.jpg');background-size: cover;padding-right: 228px;.login-form {border-radius: 6px;background: #ffffff;width: 400px;padding: 25px 25px 5px 25px;.el-input {height: 40px;input {height: 40px;}}.input-icon {height: 39px;width: 14px;margin-left: 0px;}
}
.login-tip {font-size: 13px;text-align: center;color: #bfbfbf;
}
.login-code {width: 33%;height: 40px;float: right;img {cursor: pointer;vertical-align: middle;}
}
.el-login-footer {height: 40px;line-height: 40px;position: fixed;bottom: 0;width: 100%;text-align: center;color: #fff;font-family: Arial;font-size: 12px;letter-spacing: 1px;
}
.login-code-img {height: 40px;padding-left: 12px;
}
::v-deep .el-form{width: 478px;padding: 50px;.title{display: flex;align-items: center;justify-content: center;img{width: 80px;height: 80px;margin-bottom: 18px;}h1{font-size: 32px;color: #1B1E24;font-weight: bolder;margin-bottom: 6px;}h3{font-size: 20px;color: #727272;margin-bottom: 30px;}}.el-form-item__label{font-weight: initial;}.el-form-item:last-child{margin-top: 46px;}
}
}
</style>

5.可能出现问题

设置父级代码(最外层)宽高为100%不生效?

解决方式:修改src文件下的style.css代码,给html,body增加样式宽高为100%

html,body{width: 100%;height: 100%;
}

 6.初始化css样式代码

因为可能会出现上述5的问题,提供一下初始化代码,可以在上述css文件全量替换,看自己情况,酌情考虑是否使用一下初始化代码样式

*{padding: 0;margin: 0;box-sizing: border-box;
}
html,body{width: 100%;height: 100%;overflow: hidden;
}
#app{width: 100%;height: 100%;overflow-x: auto;
}
HTML, body, div, ul, ol, dl, li, dt, dd, p, blockquote,
pre, form, fieldset, table, th, td {border:none;font-family:"微软雅黑","黑体","宋体";font-size:14px;margin:0px;padding:0px;
}
address, caption, cite, code, dfn, em, strong, th, var {font-style: normal;font-weight: normal;
}
a{text-decoration:none;
}
a:link{color:#fff;
}
a:visited{color:#fff;
}
a:hover{color:#fff;
}
a:active{color:#fff;
}
input::-ms-clear{display:none;
}
input::-ms-reveal{display:none;
}
input{-webkit-appearance: none;margin: 0;outline: none;padding: 0;
}
input::-webkit-input-placeholder{color: #ccc;
}
input::-ms-input-placeholder{color: #ccc;
}
input::-moz-placeholder{color: #ccc;
}
input[type=submit],input[type=button]{cursor: pointer;
}
button[disabled], input[disabled] {cursor: default;
}
img{border:none;
}
ul,ol,li{list-style-type:none;
}
/*公共方法*/
.clear{clear: both;
}
.clearleft{clear: left;
}
.clearright{clear: right;
}
.floatleft{float: left;
}
.floatright{float: right;
}
.cursor{cursor: pointer;
}
/*背景及色值表*/
.bg000{background: #000;
}
.color000{color: #000;
}
.content{flex: 1;}
.content-box{width: 100%;height: 100%;background: #fff;border-radius: 10px;padding: 20px;
}
.title{font-weight: bolder;font-size: 24px;text-indent: initial !important;
}
h1,h2,h3,h4,h5{margin-bottom: 10px;
}
/* 可以添加一些样式来美化代码显示 */
pre {background-color: #f8f8f8;border: 1px solid #ddd;border-radius: 4px;padding: 10px;overflow-x: auto;
}
code {font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;font-size: 12px;color: #333333;text-align: left;
}

http://www.dtcms.com/wzjs/798330.html

相关文章:

  • 网站头部怎么做网站开发的前后台的步骤分别为
  • 加强网站队伍建设wordpress中文免费主题
  • 51购物网官方网站网站开发毕业设计开题报告
  • 网站建设的需求方案重庆市证书查询官网
  • 徐州企业网站建设企业宣传网站多大主机
  • 中国工商银行官方网站登录做企业网站有什么用
  • 自己做博客网站成都网络营销网站
  • 小型微利企业所得税优惠政策网站百度关键词优化
  • 做网站和易语言网站开发流程图解释含义
  • win10建设本地网站建筑工程承包平台
  • 网站维护 关站 seo株洲新站seo
  • 来宾北京网站建设网站速度优化方案
  • 青岛网站建设公司wordpress中文留言板
  • 网站推广的策略重庆公司社保缴费比例
  • 摄影网站制作设计php网站开发数据列表排重
  • 免费网站现在是怎么了城市建设网
  • 建设像京东一样的网站WordPress换主题图片不适应
  • 怎样免费建企业网站免费网站建设空间
  • 如何让一个网站排名掉贵州住房和城乡建设部网站
  • 影视公司网站模板谷歌账号
  • 木门行业网站该怎么做手机app安装下载
  • 湘潭网站建设定制磐石网络每平每屋设计家官网
  • 网站转移码wordpress 加速 谷歌
  • 怎么做查询网站石家庄网络开发公司
  • 陕西公司网站建设优化设计三年级上册答案
  • 做网站怎么改关键词大学院系网站建设
  • 网站申请注册个域名网络营销推广代理
  • 使用django做网站纯html5网站源码
  • 想找人做网站 要怎么选择wordpress手机验证码
  • 做网站买什么空间建e室内设计网3d模型