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

赌城网站怎么做网络营销成功的案例分析

赌城网站怎么做,网络营销成功的案例分析,网站建设的分类,网站建设发展主页面搭建 页面主体结构 路由 子路由 主页面搭建 页面主体结构 在vuews目录下新建Layout.vue文件 主页面内容主体代码 <script setup> import {Management,Promotion,UserFilled,User,Crop,EditPen,SwitchButton,CaretBottom } from element-plus/icons-vue imp…

主页面搭建

页面主体结构 

路由 

子路由

 

主页面搭建

页面主体结构 

在vuews目录下新建Layout.vue文件

 主页面内容主体代码

<script setup>
import {Management,Promotion,UserFilled,User,Crop,EditPen,SwitchButton,CaretBottom
} from '@element-plus/icons-vue'
import avatar from '@/assets/default.png'
</script><template><el-container class="layout-container"><!-- 左侧菜单 --><el-aside width="200px"><div class="el-aside__logo"></div><el-menu active-text-color="#ffd04b" background-color="#232323"  text-color="#fff"router><el-menu-item ><el-icon><Management /></el-icon><span>文章分类</span></el-menu-item><el-menu-item ><el-icon><Promotion /></el-icon><span>文章管理</span></el-menu-item><el-sub-menu ><template #title><el-icon><UserFilled /></el-icon><span>个人中心</span></template><el-menu-item ><el-icon><User /></el-icon><span>基本资料</span></el-menu-item><el-menu-item ><el-icon><Crop /></el-icon><span>更换头像</span></el-menu-item><el-menu-item ><el-icon><EditPen /></el-icon><span>重置密码</span></el-menu-item></el-sub-menu></el-menu></el-aside><!-- 右侧主区域 --><el-container><!-- 头部区域 --><el-header><div>用户:<strong>acc</strong></div><el-dropdown placement="bottom-end"><span class="el-dropdown__box"><el-avatar :src="avatar" /><el-icon><CaretBottom /></el-icon></span><template #dropdown><el-dropdown-menu><el-dropdown-item command="profile" :icon="User">基本资料</el-dropdown-item><el-dropdown-item command="avatar" :icon="Crop">更换头像</el-dropdown-item><el-dropdown-item command="password" :icon="EditPen">重置密码</el-dropdown-item><el-dropdown-item command="logout" :icon="SwitchButton">退出登录</el-dropdown-item></el-dropdown-menu></template></el-dropdown></el-header><!-- 中间区域 --><el-main><div style="width: 1290px; height: 570px;border: 1px solid red;">内容展示区</div></el-main><!-- 底部区域 --><el-footer>大事件 ©2024</el-footer></el-container></el-container>
</template><style lang="scss" scoped>
.layout-container {height: 100vh;.el-aside {background-color: #232323;&__logo {height: 120px;background: url('@/assets/logo.png') no-repeat center / 120px auto;}.el-menu {border-right: none;}}.el-header {background-color: #fff;display: flex;align-items: center;justify-content: space-between;.el-dropdown__box {display: flex;align-items: center;.el-icon {color: #999;margin-left: 10px;}&:active,&:focus {outline: none;}}}.el-footer {display: flex;align-items: center;justify-content: center;font-size: 14px;color: #666;}
}
</style>

在App.vue中引入主页面文件

但是发现都在一个页面里面 

路由 

  • 路由,决定从起点到终点的路径的进程
  • 在前端工程中,路由指的是根据不同的访问路径,展示不同组件的内容
  • Vue Router是Vue.js的官方路由 

在项目目录下安装路由

npm install vue-router@4

在src目录下创建 router,再在router目录下创建router.js文件

创建路由器,并导出  

import {createRouter,createWebHistory} from 'vue-router';//导入组件
import LoginVue from '@/views/Login.vue'
import LayoutVue from './views/Layout.vue';//定义路由关系
const routes = [{path:'/login',component:LoginVue},{path:'/',component:LayoutVue}
]//创建路由器
const router = createRouter({history:createWebHistory(),routes:routes
})//导出路由
export default router

 在main.js文件中应用实例中使用vue-router

修改App.vue文件声明router-view标签,展示组件内容

<template><router-view/>
</template><script>export default {name: 'App',components: {}
}
</script><style></style>

 浏览器访问查看路由

在登录页面Login.vue文件中设置登录成功时从登录页跳转切换到主页面

 保存查看效果

子路由

在views目录下创建五个组件

 ArticleCategory.vue

<template>文章分类
</template>

ArticleManage.vue

<template>文章管理
</template>

 UserAvatar.vue

<template>更换头像
</template>

UserInfo.vue 

<template>基本资料
</template>

 UserResetPassword.vue

<template>重置密码
</template>

在router.js文件中配置子路由

//导入子路由组件
import ArticleCategoryVue from '@/views/ArticleCategory.vue'
import ArticleManageVue from '@/views/ArticleManage.vue'
import UserAvatarVue from '@/views/UserAvatar.vue'
import UserInfoVue from '@/views/UserInfo.vue'
import UserResetPasswordVue from '@/views/UserResetPassword.vue'//定义路由关系
const routes = [{path:'/login',component:LoginVue},{path:'/',component:LayoutVue,//重定向 为首页页面默认展示的子路由页面redirect: '/article/manage',//子路由children: [{ path: '/article/category', component: ArticleCategoryVue },{ path: '/article/manage', component: ArticleManageVue },{ path: '/user/info', component: UserInfoVue },{ path: '/user/avatar', component: UserAvatarVue },{ path: '/user/password', component: UserResetPasswordVue }]}
]

在Layout.vue文件中的中区区域代码部分 声明router-view标签

在Layout.vue主页面文件中为菜单项 el-menu-item 设置index属性(为router子路由的路径一致),设置点击后的路由路径 。

 设置完成后即可完成点击菜单子路由页面跳转

http://www.yidumall.com/news/67477.html

相关文章:

  • 好的网站收入最近三天的新闻大事摘抄
  • 2024免费网站推广网络推广外包代理
  • 护卫神做的网站访问网站如何做seo排名
  • 网站的首页怎么做东莞网站优化公司哪家好
  • 建网站上海写文章一篇30元兼职
  • dede中国风网站模板百度竞价推广课程
  • 建设厅网站上传不了身份证神马seo服务
  • 做图书出版 外国网站今日重大国际新闻
  • 电子商务网站建设考试营销策略国内外文献综述
  • 服务器在香港的网站企业网站怎么注册
  • 网站底部备案号京东seo搜索优化
  • 做网站的软件叫什么软件精准引流客源的方法可靠吗
  • 商业网站设计方案产品营销策划方案怎么做
  • 网站模板炫酷网站seo排名优化方法
  • 六安网站定制个人主页网页设计模板
  • 用备忘录制作一个网站的制作环球贸易网
  • 网页视频下载用什么软件最好seo关键词优化报价
  • 上海市交通建设工程安全质量监督站网站网站推广主要是做什么
  • 短租网站那家做的好网页设计与制作考试试题及答案
  • dz做网站缺点山西seo优化
  • 企业网站flash网络营销师证
  • 余姚有专业做网站的吗外包公司排名
  • 网站后台界面设计市场营销计划
  • 长宁网站建设宁波seo快速优化公司
  • 深圳外贸批发市场抖音seo排名优化
  • 做网站买二手域名seo管理系统培训运营
  • 钢材公司网站建设链接转二维码
  • 怎么查看网站是哪个公司做的网络推广平台软件
  • 怎么做电视台网站网络广告营销的特点
  • 怎么制作网站的链接宏企业产品推广策划方案