![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
冰(Icez)
这个作者很懒,什么都没留下…
展开
-
如何部分路由保持状态
如何部分路由保持状态keep-alive exclude 指那些是可以不被保证状态,多个以逗号风格 include 指那些是可以被保持状态,默认所以保持,多个以逗号分隔<template> <div id="app"> <div style="display: flex;flex-direction: row;height: 100%;width: 100%;"> <div style="height: 100%;back原创 2020-09-19 18:36:32 · 266 阅读 · 0 评论 -
切换路由,再次回来如何保持状态
切换路由,再次回来如何保持状态keep-alive<template> <div id="app"> <div style="display: flex;flex-direction: row;height: 100%;width: 100%;"> <div style="height: 100%;background-color: antiquewhite;flex-grow: 1"> <ul style原创 2020-09-19 18:20:45 · 428 阅读 · 0 评论 -
如何设置指定页面title
如何设置指定页面titlebeforeEach、meta 源码设置页面titleimport VueRouter from "vue-router"import Vue from "vue"const Home = ()=> import ("@/components/Home")const About = ()=> import ("@/components/About")const Btn1Component = ()=> import ("@/compo原创 2020-09-19 15:21:52 · 179 阅读 · 0 评论 -
路由参数传递
路由参数传递参数传递<template> <div id="app"> <div style="display: flex;flex-direction: row;height: 100%;width: 100%;"> <div style="height: 100%;background-color: antiquewhite;flex-grow: 1"> <ul style="padding: 0px"原创 2020-09-19 14:04:01 · 75 阅读 · 0 评论 -
路由嵌套
路由嵌套router index.jsimport VueRouter from "vue-router"import Vue from "vue"const Home = ()=> import ("@/components/Home")const About = ()=> import ("@/components/About")const Btn1Component = ()=> import ("@/components/Btn1Component")cons原创 2020-09-19 13:33:23 · 88 阅读 · 0 评论 -
动态路由
动态路由path: ‘/dynamic/:params’, params 指参数key,key前面必须要:import VueRouter from "vue-router"import Vue from "vue"import Home from "@/components/Home"import About from "@/components/About"import Btn1Component from "@/components/Btn1Component"import Bt原创 2020-09-19 02:09:44 · 79 阅读 · 0 评论 -
router-link、router-view解析
router-link、router-view解析router-linkrouter-link 默认渲染成<a></a>标签属性1、tag='li' 把router-link指定的标签2、active-class="active" 用来标识选中状态自定样式,类名可以自定义.active{ color: red;}3、全局路由选中自定义样式,类名可以自定义;不推荐这样做,推荐使用active-class属性(1)这是源码export interf原创 2020-09-19 01:38:37 · 696 阅读 · 0 评论 -
Vue 3.0 路由基本使用
路由基本使用下载Vue-Routernpm install vue-router配置路由router/index.jsimport VueRouter from "vue-router"import Vue from "vue"import Home from "@/components/Home"import About from "@/components/About"/** * 安装插件 */Vue.use(VueRouter)/** * 创建路由对象 *原创 2020-09-17 23:46:28 · 5062 阅读 · 9 评论