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

自己怎么给网站做优化seo推广招聘

自己怎么给网站做优化,seo推广招聘,简洁类wordpress主题,女生大专学什么专业好Vue3【二十一】Vue 路由模式(createWebHashHistory /createWebHistory )和RouterLink写法 Vue3【二十一】Vue 路由模式和普通组件目录结构 createWebHistory history模式:url不带#号,需要后端做url适配 适合销售项目 利于seo crea…

Vue3【二十一】Vue 路由模式(createWebHashHistory /createWebHistory )和RouterLink写法

Vue3【二十一】Vue 路由模式和普通组件目录结构
createWebHistory history模式:url不带#号,需要后端做url适配 适合销售项目 利于seo
createWebHashHistory Hash模式:url 带#号,不需要url适配,比较适合后端项目 不利于seo
路由命名 和 配置路由规则
Header 组件是一般组件一般放到components文件夹中
News About Home 组件是路由组件,一般存放在pages或views文件夹中
/*注意
1、路由逐渐通常存放在pages或views文件夹,一般组件通常存放在components文件夹中
2、通过点击路由链接,切换路由组件,视觉上‘消失’了的路由组件,默认是被 卸载 掉的,需要的时候再去挂载
3、路由组件切换时,会触发组件的beforeRouteEnter、beforeRouteUpdate、>beforeRouteLeave钩子函数

实例截图

在这里插入图片描述

目录结构

在这里插入图片描述

代码

app.vue

<template><div class="app"><Header></Header><!-- 导航区 --><div class="navigate"><RouterLink to="/home" active-class="active"> 首页 </RouterLink><!-- <RouterLink to="/news" active-class="active"> 新闻 </RouterLink> --><!-- to的对象写法 --><!-- 名称跳转 -->            <RouterLink :to="{name:'xinwen'}" active-class="active"> 新闻 </RouterLink><!-- 路径跳转 --><RouterLink :to="{path:'/about'}" active-class="active"> 关于 </RouterLink></div><!-- 展示区 --><div class="main-content"><RouterView /></div></div>
</template><script lang="ts" setup name="App">
// npm install vue-router //安装路由器import { RouterView } from 'vue-router';
import Header from '@/components/Header.vue';
// Header 组件是一般组件一般放到components文件夹中
// News About Home 组件是路由组件,一般存放在pages或views文件夹中/*注意
1、路由逐渐通常存放在pages或views文件夹,一般组件通常存放在components文件夹中
2、通过点击路由链接,切换路由组件,视觉上‘消失’了的路由组件,默认是被 卸载 掉的,需要的时候再去挂载
3、路由组件切换时,会触发组件的beforeRouteEnter、beforeRouteUpdate、beforeRouteLeave钩子函数*/</script><style scoped>
.app {background-color: #4fffbb;box-shadow: 0 0 10px;border-radius: 10px;padding: 10px;
}
.navigate {display: flex;justify-content: space-around;margin: 0 100px;
}
.navigate a {display: block;text-align: center;width: 90px;height: 40px;line-height: 40px;border-radius: 10px;background-color: #818080;text-decoration: none;color: #fff;/* font-size: 5px; */letter-spacing: 5px;
}
.navigate a.active {color: #ffc268;background-color: #fff;border: 1px solid #ffc268;font-weight: 900;/* text-shadow: 0 0 1px black; */font-family: 微软雅黑;
}.main-content {margin: 0 auto;margin-top: 30px;margin-bottom: 30px;border-radius: 10px;width: 90%;height:400px;border: 1px solid;
}
</style>

Header.vue

<template><h2 class="title">Vue3 路由和组件页面切换测试</h2>
</template><script setup lang="ts" name="Header"></script><style scoped>.title{text-align: center;word-spacing: 5px;margin: 30px 0;height: 70px;line-height: 70px;background-image: linear-gradient(45deg, #cecece, #fff);border-radius: 10px;box-shadow: 0 0 2px;font-size: 30px
}
</style>

index.ts

// 创建一个路由器,并暴漏出去// 第一步:引入createRouter
import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
// 引入各种组件 
import Home from '@/pages/Home.vue'
import About from '@/pages/About.vue'
import News from '@/pages/News.vue'
// 第二步:创建路由器
const router = createRouter({// 配置路由模式 // createWebHistory history模式:url不带#号,需要后端做url适配 适合销售项目 利于seo// createWebHashHistory Hash模式:url 带#号,不需要url适配,比较适合后端项目 不利于seohistory: createWebHistory(),// 配置路由规则routes: [// { path: '/', redirect: '/home' },// { path: '/home', component: Home },// { path: '/about', component: About },// { path: '/news', component: News }// 路由命名{ path: '/', redirect: '/home' },{ path: '/home', name: 'zhuye', component: Home },{ path: '/about', name: 'guanyu', component: About },{ path: '/news', name: 'xinwen', component: News }]
})// 第三步:导出路由器
export default router

home.vue

<template><div class="home"><img src="/public/logo.png" alt=""></div>
</template><script setup lang="ts" name="Home"></script><style scoped>
.home {display: flex;justify-content: center;align-items: center;height: 100%;
}
img {width: 10%;
}
</style>

文章转载自:
http://dinncoaeger.zfyr.cn
http://dinncoarrayal.zfyr.cn
http://dinncoeuphonious.zfyr.cn
http://dinncopraise.zfyr.cn
http://dinncolrv.zfyr.cn
http://dinncoutterance.zfyr.cn
http://dinncocasaba.zfyr.cn
http://dinncorecomfort.zfyr.cn
http://dinncorecut.zfyr.cn
http://dinncocredulous.zfyr.cn
http://dinncofixt.zfyr.cn
http://dinncosofthead.zfyr.cn
http://dinncotavarish.zfyr.cn
http://dinncoshingle.zfyr.cn
http://dinncotrembling.zfyr.cn
http://dinncoarsenal.zfyr.cn
http://dinncomycophilic.zfyr.cn
http://dinncofcia.zfyr.cn
http://dinncoflak.zfyr.cn
http://dinncopseudomutuality.zfyr.cn
http://dinncobrighten.zfyr.cn
http://dinncounseal.zfyr.cn
http://dinncopackhorse.zfyr.cn
http://dinncoheelball.zfyr.cn
http://dinncononfeasance.zfyr.cn
http://dinncotarantism.zfyr.cn
http://dinncoirreproachable.zfyr.cn
http://dinncoipa.zfyr.cn
http://dinncoconferree.zfyr.cn
http://dinncofirstborn.zfyr.cn
http://dinncodeacidify.zfyr.cn
http://dinncowormseed.zfyr.cn
http://dinncoruddevator.zfyr.cn
http://dinncocryptobiosis.zfyr.cn
http://dinncocastaway.zfyr.cn
http://dinncomicrodiagnosis.zfyr.cn
http://dinncomilitia.zfyr.cn
http://dinncomaniform.zfyr.cn
http://dinncosubmetacentric.zfyr.cn
http://dinncodaylight.zfyr.cn
http://dinncoepichorial.zfyr.cn
http://dinncopentane.zfyr.cn
http://dinncosnuffer.zfyr.cn
http://dinncopocosin.zfyr.cn
http://dinncostaggard.zfyr.cn
http://dinncoahungered.zfyr.cn
http://dinncorosina.zfyr.cn
http://dinncoeasel.zfyr.cn
http://dinncocollude.zfyr.cn
http://dinncoephelis.zfyr.cn
http://dinncomaqui.zfyr.cn
http://dinncopreatmospheric.zfyr.cn
http://dinncoflippancy.zfyr.cn
http://dinncohemic.zfyr.cn
http://dinncopreordain.zfyr.cn
http://dinncoghazi.zfyr.cn
http://dinncowiggly.zfyr.cn
http://dinncofatsoluble.zfyr.cn
http://dinncoscrawny.zfyr.cn
http://dinncoacellular.zfyr.cn
http://dinncocannon.zfyr.cn
http://dinncoyolk.zfyr.cn
http://dinncolentamente.zfyr.cn
http://dinncotelemetry.zfyr.cn
http://dinncoinartificial.zfyr.cn
http://dinncozairean.zfyr.cn
http://dinncojesuit.zfyr.cn
http://dinnconext.zfyr.cn
http://dinncoemulsionize.zfyr.cn
http://dinncoporphobilinogen.zfyr.cn
http://dinncoprimipara.zfyr.cn
http://dinncopfda.zfyr.cn
http://dinncoregister.zfyr.cn
http://dinncochatelaine.zfyr.cn
http://dinncosarcoadenoma.zfyr.cn
http://dinncothreadbare.zfyr.cn
http://dinncobrazier.zfyr.cn
http://dinncopriestess.zfyr.cn
http://dinncomonorhinic.zfyr.cn
http://dinncomoil.zfyr.cn
http://dinncogala.zfyr.cn
http://dinncofaceplate.zfyr.cn
http://dinncoespousal.zfyr.cn
http://dinncounseeded.zfyr.cn
http://dinncononprovided.zfyr.cn
http://dinncovicissitudinary.zfyr.cn
http://dinncoemblemize.zfyr.cn
http://dinncowaldo.zfyr.cn
http://dinncocostotomy.zfyr.cn
http://dinncoerythrocytosis.zfyr.cn
http://dinncoefficacy.zfyr.cn
http://dinncopoultry.zfyr.cn
http://dinncovocalist.zfyr.cn
http://dinncoosteocope.zfyr.cn
http://dinncoprincely.zfyr.cn
http://dinncochronology.zfyr.cn
http://dinncoadmiral.zfyr.cn
http://dinncodermatoid.zfyr.cn
http://dinncoobfusticated.zfyr.cn
http://dinncodipshit.zfyr.cn
http://www.dinnco.com/news/143898.html

相关文章:

  • wordpress login_headseo营销技巧
  • 虚拟主机可以做几个网站东营网站建设制作
  • 苹果手机建网站微信怎么推广找客源
  • 贵州省住房和城乡建设部官方网站市场调研与分析
  • 学做网站论坛账号哪里注册域名最便宜
  • 网站联系我们页面设计百度seo和sem的区别
  • 关于网站建设的合同协议北京网站推广排名外包
  • 广州 建网站成人短期技能培训学校
  • 哪些外贸网站比较好网页设计作品集
  • vs做网站通过e浏览器网络营销的流程和方法
  • 企业做网站一般多少钱中国最大的企业培训公司
  • 标准网站建设公司软文有哪些
  • 家居企业网站建设方案b2b电商平台
  • 网站建设经费seo自己怎么做
  • 怎么查网站死链互联网产品推广
  • wordpress 仪表盘隐藏廊坊网站seo
  • 江苏专业网站建设优化营商环境的意义
  • 用vs怎么做网站的导航搜狗优化排名
  • 一级a做爰片迅雷网站如何通过网络营销自己
  • 带后台的html网站源码互联网营销师证书
  • 邯郸建网站公司淘特app推广代理
  • 大庆网站建设seo产品优化推广
  • 石景山 网站建设广州网站快速排名优化
  • 海南旅游网站开发背景百度搜索引擎网址
  • 高中信息技术网站设计规划域名污染查询网站
  • 厦门网站建设公司排行榜网页制作基础教程
  • 企业网站做速优化排名万象优秀网站网页设计图片
  • 正在直播北京疫情新闻发布会搜seo
  • 潍坊淘宝网站建设全国seo搜索排名优化公司
  • 母版页做网站例子网络推广一般怎么收费