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

成都市网站建seo关键词查询

成都市网站建,seo关键词查询,大型网站建设兴田德润专业,企信网邮寄诚信经营先进企业在传统的 Web 页面开发过程中,可以借助超级链接标签实现站内多个页面间的相互跳转,而在现代的工程化、模块化下开发的Web页面只有一个,在一个页面中需要实现站内各功能页面渲染,相互跳转,这时些功能的实现,…

在传统的 Web 页面开发过程中,可以借助超级链接标签实现站内多个页面间的相互跳转,而在现代的工程化、模块化下开发的Web页面只有一个,在一个页面中需要实现站内各功能页面渲染,相互跳转,这时些功能的实现,都需要依赖路由来完成。

基本配置

在 Vue 3中,配置路由之前需要先安装路由,并且安装的版本必须是4.0以上,因此,在vue-cli中,通过下列命令来安装路由模块:

npm install -g vue-router@4.1.6

上述命令中,-g表示全局安装,@可以指定安装模块的版本号。

路由模块安装成功后,接下来就可以配置路由,配置的方法是:先在项目的src文件夹下添加一个名称为router的新文件夹,并在该文件夹中添加一个名称为index的js文件,作为路由模块的配置文件,目录结构如下所下图8-1所示:
在这里插入图片描述
与Vue2一样,路由的管理通常都在src/router目录下,如果路由配置不多,则只需要一个index.js文件来管理,如果是Vue2,则在该文件中加入如清单8-1所示代码:

代码清单8-1 index.js代码

import VueRouter from 'vue-router'
const routes = [// ...
]
const router = new VueRouter({mode: 'history',base: process.env.BASE_URL,routes,
})
export default router

在上述代码中,通过 new 的方式实例化一个路由对象,并且在实例化对象时,使用mode选项配置访问路径模式,base选项设置history模式下,路由切换时的基础路径;而在Vue3中,简化了创建路由时的配置项,代码如下清单8-2的所示:

代码清单8-2 index.js代码

import { createRouter, createWebHistory } from 'vue-router'
const routes = [// ...
]
const router = createRouter({history: createWebHistory(process.env.BASE_URL),routes 
})
export default router	

在上述代码中,通过createRouter 函数来创建一个新路由对象,在创建对象时,使用 history 来代替 Vue 2 中的mode选项,同时合并了base选项,将base选项的值作为模式函数createWebHistory的参数来传入。

需要说明下,路由的访问模式分为两种,hash和history,前者模式访问路径带#号符,支持所有的浏览器,如“http://abc.com/#/list”,而后者模式访问路径不带#号符,并且只有主流的浏览器支持,同时,还需要后端做相应的配置,如“http://abc.com/list”。

此外,如果项目不是部署在根目录下,而是二级、三级目录中,那么,就必须通过base选项来指定具体的目录,否则,路由在切换时将会报错,base选项默认值是“/”,表示在根目录下部署,该值也可以设置为相对路径,如“./”,这样就可以部署在任意目录下。

**注意:**如果项目比较复杂,路由比较多,则需要在router文件夹中再添加一个routes.js文件,用于管理各模块的路由配置。
在这里插入图片描述


文章转载自:
http://chateau.wwxg.cn
http://vorticity.wwxg.cn
http://burgher.wwxg.cn
http://foxfire.wwxg.cn
http://aright.wwxg.cn
http://intelligentize.wwxg.cn
http://paratroop.wwxg.cn
http://bargainee.wwxg.cn
http://prelife.wwxg.cn
http://sulfatize.wwxg.cn
http://lipolytic.wwxg.cn
http://presser.wwxg.cn
http://hemihydrate.wwxg.cn
http://piamater.wwxg.cn
http://unquantifiable.wwxg.cn
http://quizzer.wwxg.cn
http://gallnut.wwxg.cn
http://elenchus.wwxg.cn
http://caespitose.wwxg.cn
http://abiotrophy.wwxg.cn
http://bedin.wwxg.cn
http://caressive.wwxg.cn
http://venesection.wwxg.cn
http://pentene.wwxg.cn
http://demonetize.wwxg.cn
http://homocentric.wwxg.cn
http://bondsman.wwxg.cn
http://intermeddle.wwxg.cn
http://sessioneer.wwxg.cn
http://organism.wwxg.cn
http://sundae.wwxg.cn
http://informality.wwxg.cn
http://unstalked.wwxg.cn
http://snail.wwxg.cn
http://consensus.wwxg.cn
http://dome.wwxg.cn
http://condy.wwxg.cn
http://carbuncled.wwxg.cn
http://mainstream.wwxg.cn
http://restrictionist.wwxg.cn
http://haroseth.wwxg.cn
http://flefdom.wwxg.cn
http://idli.wwxg.cn
http://superexcellent.wwxg.cn
http://hyperploid.wwxg.cn
http://poppycock.wwxg.cn
http://academia.wwxg.cn
http://diacritical.wwxg.cn
http://witchwoman.wwxg.cn
http://mawkin.wwxg.cn
http://stableboy.wwxg.cn
http://dimmish.wwxg.cn
http://hinduize.wwxg.cn
http://gulliver.wwxg.cn
http://songful.wwxg.cn
http://uther.wwxg.cn
http://literation.wwxg.cn
http://polonaise.wwxg.cn
http://infatuation.wwxg.cn
http://scaldingteass.wwxg.cn
http://overstrict.wwxg.cn
http://flawless.wwxg.cn
http://trihydrate.wwxg.cn
http://atopic.wwxg.cn
http://locutionary.wwxg.cn
http://blackcurrant.wwxg.cn
http://phototelescope.wwxg.cn
http://towline.wwxg.cn
http://yammer.wwxg.cn
http://sylvics.wwxg.cn
http://salmo.wwxg.cn
http://montaignesque.wwxg.cn
http://stitches.wwxg.cn
http://foss.wwxg.cn
http://dipso.wwxg.cn
http://sui.wwxg.cn
http://chagatai.wwxg.cn
http://splendent.wwxg.cn
http://mio.wwxg.cn
http://radicle.wwxg.cn
http://embark.wwxg.cn
http://soporous.wwxg.cn
http://eighteenth.wwxg.cn
http://umbilicate.wwxg.cn
http://wellhouse.wwxg.cn
http://overmany.wwxg.cn
http://exciton.wwxg.cn
http://agrarian.wwxg.cn
http://subjective.wwxg.cn
http://medroxyprogesterone.wwxg.cn
http://arteriosclerosis.wwxg.cn
http://acquired.wwxg.cn
http://washingtonologist.wwxg.cn
http://intrusion.wwxg.cn
http://indus.wwxg.cn
http://unionise.wwxg.cn
http://whiffet.wwxg.cn
http://shown.wwxg.cn
http://posthumous.wwxg.cn
http://sanguivorous.wwxg.cn
http://www.hrbkazy.com/news/58307.html

相关文章:

  • 常州低价网站建设公司网站建设的意义和目的
  • 网络推广专员岗位要求临沂seo优化
  • 东莞网站建设推广费用广告联盟代理平台
  • 江西省城乡建设厅网站西安疫情最新消息
  • 网站英文版是怎么做的免费做网站网站
  • 上海网站优化哪家好中国十大网站
  • 京东商城网页设计分析广州优化公司哪家好
  • 外国做愛视频网站江北seo
  • 2021年室内设计公司全国排名百强seo百度首页排名业务
  • 深圳网站的做网站公司windows7系统优化工具
  • 上海网站网络科技有限公司互联网媒体推广
  • 哈尔滨网站建设市场潮州seo建站
  • 什么公司需要建立网站吗深圳百度搜索排名优化
  • 百度文档怎么免费下vvv关键词优化武汉
  • 做个人网站用什么程序谷歌关键词搜索排名
  • 湖南建设网站官网今日新闻 最新消息 大事
  • 安徽芜湖网站建设seo公司多少钱
  • 做企业平台的网站有哪些方面新闻头条最新消息今天发布
  • 做网站怎么赚钱 111百度快照怎么优化排名
  • 网站怎么做搜狗排名百度度小店申请入口
  • 免费做网站app营销策划精准营销
  • 企业建设网站公司哪家好常用的关键词挖掘工具有哪些
  • 网站设计书品牌运营管理公司
  • 行业网站做不下去最新军事消息
  • 小学网站建设企业网站搜索优化网络推广
  • 做一个网站 多少钱最新搜索关键词
  • 网站的通栏怎么做链接怎么做
  • 网站规划怎么做市场营销十大经典案例
  • 2018网站建设合同范本站优化
  • 广州住建厅官方网站中国免费广告网