惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
G
Google Developers Blog
博客园 - 三生石上(FineUI控件)
Last Week in AI
Last Week in AI
IT之家
IT之家
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
爱范儿
爱范儿
大猫的无限游戏
大猫的无限游戏
博客园 - Franky
U
Unit 42
Security Archives - TechRepublic
Security Archives - TechRepublic
C
Cisco Blogs
S
Schneier on Security
T
Threatpost
阮一峰的网络日志
阮一峰的网络日志
Microsoft Security Blog
Microsoft Security Blog
The Cloudflare Blog
博客园 - 聂微东
C
Cybersecurity and Infrastructure Security Agency CISA
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Blog — PlanetScale
Blog — PlanetScale
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Engineering at Meta
Engineering at Meta
M
MIT News - Artificial intelligence
aimingoo的专栏
aimingoo的专栏
博客园 - 叶小钗
Cisco Talos Blog
Cisco Talos Blog
P
Palo Alto Networks Blog
MongoDB | Blog
MongoDB | Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
V
V2EX
L
Lohrmann on Cybersecurity
Latest news
Latest news
小众软件
小众软件
有赞技术团队
有赞技术团队
Know Your Adversary
Know Your Adversary
Simon Willison's Weblog
Simon Willison's Weblog
B
Blog
雷峰网
雷峰网
K
Kaspersky official blog
美团技术团队
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Check Point Blog
Recorded Future
Recorded Future
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
H
Help Net Security

博客园 - 上官帅帅

vue 环境配置 vue html DOM树对象 idea maven pom配置文件 .net core dapper (5) .net core dapper (4) .net core dapper (3) .net core dapper (2) .net core dapper (1) c# 异步 async await jq_js window 使用vagrant搭建开发开发环境 判断元素的属性是否存在 js 查找树节点 数组去重 redis 基础知识 jQuey知识点三 解析json数据 mysql 基础操作一 ruby 基础知识三 读写文件 Active Record 数据迁移
vue3 - 01 路由的配置和使用
上官帅帅 · 2026-01-26 · via 博客园 - 上官帅帅

element-plus 官网组件

https://element-plus.org/zh-CN/component/overview

 路由的配置和使用

1 安装

npm install vue-router@next --save

1.1创建相关页面

image

2 配置路由 index.ts

import {createRouter,createWebHistory} from 'vue-router'
import LoginPage from '../views/index/LoginPage.vue'

const router=createRouter({
     history:createWebHistory(),
    routes:[
        {path:"/login",component:LoginPage}]
})

export default router;

3 main.ts 中use router

createApp(App)
.use(ElementPlus)
.use(router)
.mount('#app')

4 在app.vue 中加路由标签

<router-view></router-view>