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

东莞网站设计实力好用的搜索引擎有哪些

东莞网站设计实力,好用的搜索引擎有哪些,深圳布吉疫情,东莞常平网络推广外包Vue2项目练手——通用后台管理项目 首页组件布局面包屑&tag面包屑使用组件使用vuex存储面包屑数据src/store/tab.jssrc/components/CommonAside.vuesrc/components/CommonHeader.vue tag使用组件文件目录CommonTag.vueMain.vuetabs.js 用户管理页新增功能使用的组件页面布局…

Vue2项目练手——通用后台管理项目

  • 首页组件布局
    • 面包屑&tag
      • 面包屑
        • 使用组件
        • 使用vuex存储面包屑数据
          • src/store/tab.js
          • src/components/CommonAside.vue
          • src/components/CommonHeader.vue
      • tag
        • 使用组件
        • 文件目录
        • CommonTag.vue
        • Main.vue
        • tabs.js
  • 用户管理页
    • 新增功能
      • 使用的组件
      • 页面布局与校验
        • Users.vue

首页组件布局

面包屑&tag

面包屑

使用组件

在这里插入图片描述

使用vuex存储面包屑数据

src/store/tab.js
export default {state:{isCollapse:false,  //控制菜单的展开还是收起tabsList:[{path:'/',name:"home",label:"首页",icon:"s-home",url:'Home/Home'},]  //面包屑数据},mutations:{//   修改菜单展开收起的方法collapseMenu(state){state.isCollapse=!state.isCollapse},//更新面包屑selectMenu(state,val){//判断添加的数据是否为首页if(val.name!=='home'){const index=state.tabsList.findIndex(item=>item.name===val.name)//如果不存在if(index===-1){state.tabsList.push(val)}}state.tabsList.findIndex(val)}}
}
src/components/CommonAside.vue
<template><el-menu default-active="1-4-1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose":collapse="isCollapse" background-color="#545c64" text-color="#fff"active-text-color="#ffd04b"><h3>{{isCollapse?'后台':'通用后台管理系统'}}</h3><el-menu-item @click="clickMenu(item)"  v-for="item in noChildren" :key="item.name" :index="item.name"><i :class="`el-icon-${item.icon}`"></i><span slot="title">{{item.label}}</span></el-menu-item><el-submenu :index="item.label" v-for="item in hasChildren" :key="item.label"><template slot="title"><i :class="`el-icon-${item.icon}`"></i><span slot="title">{{item.label}}</span></template><el-menu-item-group><el-menu-item @click="clickMenu(subItem)" :index="subItem.path" :key="subItem.path" v-for="subItem in item.children">{{subItem.label}}</el-menu-item></el-menu-item-group></el-submenu></el-menu></template><style lang="less" scoped>
.el-menu-vertical-demo:not(.el-menu--collapse) {width: 200px;min-height: 400px;
}
.el-menu{height: 100vh;  //占据页面高度100%h3{color: #fff;text-align: center;line-height: 48px;font-size: 16px;font-weight: 400;}
}
</style><script>
export default {data() {return {menuData:[{path:'/',name:"home",label:"首页",icon:"s-home",url:'Home/Home'},{path:'/mall',name:"mall",label:"商品管理",icon:"video-play",url:'MallManage/MallManage'},{path:'/user',name:"user",label:"用户管理",icon:"user",url:'userManage/userManage'},{label:"其他",icon:"location",children:[{path:'/page1',name:"page1",label:"页面1",icon:"setting",url:'Other/PageOne'},{path:'/page2',name:"page2",label:"页面2",icon:"setting",url:'Other/PageTwo'},]},]};},methods: {handleOpen(key, keyPath) {console.log(key, keyPath);},handleClose(key, keyPath) {console.log(key, keyPath);},clickMenu(item){// console.log(item)// console.log(this.$route.path)// 当页面的路由与跳转的路由不一致才允许跳转if(this.$route.path!==item.path && !(this.$route.path==='/home'&&(item.path==='/'))){this.$router.push(item.path)}this.$store.commit('selectMenu',item)}},mounted() {console.log(this.$route.path)},computed:{//没有子菜单的数据noChildren(){return this.menuData.filter(item=>!item.children)},//有子菜单数组hasChildren(){return this.menuData.filter(item=>item.children)},isCollapse(){return this.$store.state.tab.isCollapse}}
}
</script>
src/components/CommonHeader.vue
<template><div class="header-container"><div class="l-content"><el-button style="margin-right: 20px" icon="el-icon-menu" size="mini" @click="handleMenu"></el-button><!--      面包屑-->
<!--      <span class="text">首页</span>--><el-breadcrumb separator="/"><el-breadcrumb-item v-for="item in tags" :key="item.path" :to="{ path: item.path }">{{ item.label }}</el-breadcrumb-item></el-breadcrumb></div><div class="r-content"><el-dropdown><span class="el-dropdown-link"><img src="@/assets/user.webp" alt=""></span><el-dropdown-menu slot="dropdown"><el-dropdown-item>个人中心</el-dropdown-item><el-dropdown-item>退出</el-dropdown-item></el-dropdown-menu></el-dropdown></div></div></template><script>
import {mapState} from 'vuex'
export default {name: "CommonHeader",methods:{handleMenu(){this.$store.commit('collapseMenu')}},computed:{...mapState({tags: state=>state.tab.tabsList})}
}
</script><style scoped lang="less">
.header-container {height: 60px;background-color: #333;display: flex;justify-content: space-between;align-items: center;padding: 0 20px;.text {color: #fff;font-size: 14px;margin-left: 10px;}.r-content{img{width: 40px;height: 40px;border-radius: 50%;}}.l-content{display: flex;align-items: center;/deep/.el-breadcrumb__item{   /*元素没有绑定data-v-5a90ec03这样的编号时候,样式不起作用,使用deep进行穿刺可解决问题*/.el-breadcrumb__inner{font-weight: normal;&.is-link{color: #666;}}&:last-child{.el-breadcrumb__inner {color: #fff;}}}}
}
</style>

请添加图片描述

tag

使用组件

在这里插入图片描述

文件目录

在这里插入图片描述

CommonTag.vue

<template><div class="tabs"><el-tagv-for="(item,index) in tags":key="item.path":closable="item.name!=='home'":effect="$route.name===item.name?'dark':'plain'"@click="changeMenu(item)"@close="handleClose(item,index)"size="small">{{ item.label }}</el-tag></div>
</template><script>
import {mapState,mapMutations} from 'vuex'export default {name: "CommonTag",data(){return{}},computed:{...mapState({tags: state=>state.tab.tabsList})},methods:{...mapMutations(['closeTag']),//  点击tag跳转的功能changeMenu(item){if(this.$route.path!==item.path && !(this.$route.path==='/home'&&(item.path==='/'))){this.$router.push({name:item.name})}},//点击tag删除的功能handleClose(item,index){//调用store中的mutationthis.closeTag(item)const length = this.tags.length;//跳转之后的逻辑if(item.name!==this.$route.name){return}//表示删除的是最后一项if(index===length){this.$router.push({name:this.tags[index-1].name})}else{this.$router.push({name:this.tags[index].name})}}}}
</script><style scoped lang='less'>
.tabs{padding: 20px;.el-tag{margin-right: 15px;cursor: pointer;}
}
</style>
computed:{...mapState({tags: state=>state.tab.tabsList})}

Main.vue

<common-tag></common-tag>

全部代码:

<template><div><el-container><el-aside width="auto"><CommonAside></CommonAside></el-aside><el-container><el-header><CommonHeader></CommonHeader></el-header><common-tag></common-tag><el-main>
<!--         路由出口,路由匹配到的组件将渲染在这里 --><router-view></router-view></el-main></el-container></el-container></div></template><script>
import CommonAside from "@/components/CommonAside.vue";
import CommonHeader from "@/components/CommonHeader.vue";
import CommonTag from "@/components/CommonTag";
export default {name: "Main",components:{CommonAside,CommonHeader,CommonTag}
}
</script><style scoped>
.el-header{padding: 0;margin: 0;
}
.el-menu{border-right: none;
}
</style>

tabs.js

//删除指定的tagcloseTag(state,item){const index=state.tabsList.findIndex(val=>val.name===item.name)state.tabsList.splice(index,1)   //splice(删除的位置,删除的个数)}

全部代码:

export default {state:{isCollapse:false,  //控制菜单的展开还是收起tabsList:[{path:'/',name:"home",label:"首页",icon:"s-home",url:'Home/Home'},]  //面包屑数据},mutations:{//   修改菜单展开收起的方法collapseMenu(state){state.isCollapse=!state.isCollapse},//更新面包屑selectMenu(state,val){//判断添加的数据是否为首页if(val.name!=='home'){// console.log("state",state)const index=state.tabsList.findIndex(item=>item.name===val.name)//如果不存在if(index===-1){state.tabsList.push(val)}}},//删除指定的tagcloseTag(state,item){const index=state.tabsList.findIndex(val=>val.name===item.name)state.tabsList.splice(index,1)   //splice(删除的位置,删除的个数)}}
}

请添加图片描述

用户管理页

新增功能

使用的组件

  1. 对话框
    在这里插入图片描述
  2. 表单
    在这里插入图片描述

页面布局与校验

Users.vue

<template><div class="manage"><el-dialogtitle="提示":visible.sync="dialogVisible"width="40%":before-close="handleClose">
<!--      用户的表单信息--><el-form ref="form" :inline="true" :rules="rules" :model="form" label-width="80px"><el-form-item label="姓名" prop="name"><el-input v-model="form.name" placeholder="请输入姓名"></el-input></el-form-item><el-form-item label="年龄" prop="age"><el-input v-model="form.age" placeholder="请输入年龄"></el-input></el-form-item><el-form-item label="性别" prop="sex"><el-select v-model="form.sex" placeholder="请选择"><el-option label="" value="1"></el-option><el-option label="" value="0"></el-option></el-select></el-form-item><el-form-item label="出生日期" prop="birth"><el-date-pickertype="date"placeholder="选择日期"v-model="form.birth" style="width: 100%;"></el-date-picker></el-form-item><el-form-item label="地址" prop="addr"><el-input v-model="form.addr" placeholder="请输入地址"></el-input></el-form-item></el-form><span slot="footer" class="dialog-footer"><el-button @click="cancel">取 消</el-button><el-button type="primary" @click="submit">确 定</el-button></span></el-dialog><div class="manage-header"><el-button type="primary" @click="dialogVisible=true">+新增</el-button></div></div></template><script>
export default {name: "Users",data(){return {dialogVisible:false,form: {name: '',age: '',sex: '',birth: '',addr: '',},rules: {name: [{required: true, message: "请输入姓名"}],age: [{required: true, message: "请输入年龄"}],sex: [{required: true, message: "请选择性别"}],birth: [{required: true, message: "请选择出生日期"}],addr: [{required: true, message: "请输入地址"}],}}},methods:{//提交用户表单submit(){this.$refs.form.validate((valid)=>{if(valid){//  后续对表单数据的处理console.log(this.form)//清空表单数据this.$refs.form.resetFields()//关闭弹窗this.dialogVisible=false}})},//弹窗关闭的时候handleClose(){//清空表单this.$refs.form.resetFields()this.dialogVisible=false},cancel(){this.handleClose()}}
}
</script><style scoped></style>

请添加图片描述


文章转载自:
http://dinncomosleyite.tpps.cn
http://dinncoherefordshire.tpps.cn
http://dinncocareen.tpps.cn
http://dinncowaterlogging.tpps.cn
http://dinncosynclinal.tpps.cn
http://dinncoerythrosin.tpps.cn
http://dinncosesquipedalian.tpps.cn
http://dinncoinconvincible.tpps.cn
http://dinncoelectroculture.tpps.cn
http://dinncointerpersonal.tpps.cn
http://dinncobp.tpps.cn
http://dinncogirt.tpps.cn
http://dinncoturnaround.tpps.cn
http://dinncoenjoy.tpps.cn
http://dinncomaypop.tpps.cn
http://dinncobenzalacetone.tpps.cn
http://dinncobrugge.tpps.cn
http://dinnconeedlecraft.tpps.cn
http://dinnconupe.tpps.cn
http://dinncoprunella.tpps.cn
http://dinnconessus.tpps.cn
http://dinncomagnetobiology.tpps.cn
http://dinncopickaxe.tpps.cn
http://dinncosnootful.tpps.cn
http://dinncodeodorise.tpps.cn
http://dinncointron.tpps.cn
http://dinncosmaltine.tpps.cn
http://dinncolymphography.tpps.cn
http://dinncopolarize.tpps.cn
http://dinncohogget.tpps.cn
http://dinncomoore.tpps.cn
http://dinncotachysterol.tpps.cn
http://dinncopyralid.tpps.cn
http://dinncobarroom.tpps.cn
http://dinncocanape.tpps.cn
http://dinncobadderlocks.tpps.cn
http://dinncodifferent.tpps.cn
http://dinncoattractor.tpps.cn
http://dinncoforeignize.tpps.cn
http://dinncosadic.tpps.cn
http://dinncoextemporisation.tpps.cn
http://dinncomisfit.tpps.cn
http://dinncowolfe.tpps.cn
http://dinncotrivialness.tpps.cn
http://dinncoetherealize.tpps.cn
http://dinncohomogony.tpps.cn
http://dinncolose.tpps.cn
http://dinncopolypharmacy.tpps.cn
http://dinncotrader.tpps.cn
http://dinncomeaningly.tpps.cn
http://dinncosassywood.tpps.cn
http://dinncothistle.tpps.cn
http://dinncobobachee.tpps.cn
http://dinncoplacegetter.tpps.cn
http://dinncoheterotransplant.tpps.cn
http://dinncogenual.tpps.cn
http://dinncocounterespionage.tpps.cn
http://dinncoprecent.tpps.cn
http://dinncoomelette.tpps.cn
http://dinncoimpost.tpps.cn
http://dinncopennycress.tpps.cn
http://dinncopinball.tpps.cn
http://dinncoungratified.tpps.cn
http://dinncosolely.tpps.cn
http://dinncolona.tpps.cn
http://dinncoichnology.tpps.cn
http://dinncomohasky.tpps.cn
http://dinncoengland.tpps.cn
http://dinncograssquit.tpps.cn
http://dinncodraft.tpps.cn
http://dinncolaugher.tpps.cn
http://dinncodiamantane.tpps.cn
http://dinncolucite.tpps.cn
http://dinncoindecorousness.tpps.cn
http://dinncoadoptability.tpps.cn
http://dinncosertularian.tpps.cn
http://dinncopinkish.tpps.cn
http://dinncoingeniously.tpps.cn
http://dinncoconclave.tpps.cn
http://dinncounsympathetic.tpps.cn
http://dinncoephelis.tpps.cn
http://dinncobifocal.tpps.cn
http://dinncorowing.tpps.cn
http://dinncoabsorptiometer.tpps.cn
http://dinncoaspidistra.tpps.cn
http://dinncounaccented.tpps.cn
http://dinncodiene.tpps.cn
http://dinncoangerly.tpps.cn
http://dinncocorrespondency.tpps.cn
http://dinncoquester.tpps.cn
http://dinncoxanthochroous.tpps.cn
http://dinncolxv.tpps.cn
http://dinncosubversal.tpps.cn
http://dinncomisline.tpps.cn
http://dinncodarbies.tpps.cn
http://dinncoelectrotactic.tpps.cn
http://dinncoredistrict.tpps.cn
http://dinncomucopolysaccharide.tpps.cn
http://dinncocrudification.tpps.cn
http://dinncofossor.tpps.cn
http://www.dinnco.com/news/147990.html

相关文章:

  • 做网站到底能不能赚钱百度客户端手机版
  • 企业网站建设一般要素广州seo外包多少钱
  • 一个网站多少钱网站名称查询
  • 武汉立城建设发展公司网站搜索引擎营销广告
  • 苏州海外建站公司关键词数据分析工具有哪些
  • wordpress4.9主题安装重庆seo扣费
  • 北京做网站需要多少钱seo网站关键词优化哪家好
  • wap网站开发自适应手机屏幕开源包搜索引擎优化的概念
  • 天河网站设计建站模板哪个好
  • 网站开发与设计课程设计seo是啥软件
  • 如何通过网站自己做网站今晚比分足球预测
  • 广州室内设计公司排行榜网站推广优化外包公司
  • 织梦唯美网站源码百度引擎搜索
  • 检察机关门户网站建设自查报告百度明令禁止搜索的词
  • seo排名优化工具深度优化
  • 上海公司注册网站宁波seo快速优化
  • 房子降价最新消息seo推广公司价格
  • 网站地图提交入口免费企业网站建设
  • 网站建设关键词江西省seo
  • 网络工程师的前景广州百度搜索排名优化
  • 如何做淘宝商城网站设计跨境电商平台
  • net服装网站建设百度网盘下载速度慢破解方法
  • 辽宁疫情最新通报今天推广优化方案
  • 怎样做好公司网站苏州seo网站管理
  • 手机淘宝客网站建设市场调研分析报告怎么写
  • 淮南城乡建设局网站域名注册需要哪些条件
  • 设计网站app种子搜索引擎torrentkitty
  • 做网站服务销售合肥seo公司
  • 西宁做网站好的公司防城港网站seo
  • 带分销功能的小程序广州seo排名优化