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

asp.net做网站武汉全网营销推广公司

asp.net做网站,武汉全网营销推广公司,中国电子商务平台有哪些,wordpress注册会员收费下载插件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/113598.html

相关文章:

  • 高端网站建设方案报价百度上免费创建网站
  • 在家用电脑做网站互联网营销师培训多少钱
  • 网站平台被骗了怎么办云搜索系统
  • 酒类做网站市场营销
  • 做网站生意深圳搜索seo优化排名
  • 济宁商城网站开发设计深圳网络推广服务公司
  • 现在哪个行业做网站需求多点免费网站排名优化软件
  • 网站开发流程图qq群排名优化
  • 大连网站设计公司如何快速网络推广
  • 推销别人做网站有什么作用营销策略分析论文
  • 小程序代理骗局88个seo网站优化基础知识点
  • 闵行专业做网站爱站网关键词挖掘查询
  • 昆明网站建设外包网络营销服务外包
  • 东营政府网站建设seo是什么品牌
  • 如何优选网站建设公司千锋教育介绍
  • 阜阳 做网站百度图像搜索
  • 旅游网站设计的意义软件开发培训多少钱
  • 自己做服务器的网站最新国内新闻重大事件
  • 做网站推广汉狮网络网站seo排名优化工具在线
  • 网站seo优化服务网络营销的模式有哪些?
  • 附近做网站的公司百度商城官网
  • c 网站开发工程师招聘哪个软件可以自动排名
  • 西安网站建设地址今日头条新闻
  • 做网站接广告百度网址链接是多少
  • 东莞网站建设公司口碑排名google官网
  • 无锡优化网站公司东营seo网站推广
  • 企业官方网站建设教程打广告在哪里打最有效
  • 南宁微网站制作需要多少钱比较好的免费网站
  • wordpress房屋网站模板上海百度公司总部
  • 有没有做古装衣服的网站网站设计模板网站