From c86dc207438b78059644fdd85e4e15da2cc2142d Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: Thu, 17 Dec 2020 12:05:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4path-to-regexp=E6=AD=A3?= =?UTF-8?q?=E5=88=99=E5=8C=B9=E9=85=8D=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/package.json | 1 - ruoyi-ui/src/components/Breadcrumb/index.vue | 9 +-------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index a5c2bc06..6f07a954 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -49,7 +49,6 @@ "js-cookie": "2.2.1", "jsencrypt": "3.0.0-rc.1", "nprogress": "0.2.0", - "path-to-regexp": "6.2.0", "quill": "1.3.7", "screenfull": "5.0.2", "sortablejs": "1.10.2", diff --git a/ruoyi-ui/src/components/Breadcrumb/index.vue b/ruoyi-ui/src/components/Breadcrumb/index.vue index dec8bfe7..9955ad2a 100644 --- a/ruoyi-ui/src/components/Breadcrumb/index.vue +++ b/ruoyi-ui/src/components/Breadcrumb/index.vue @@ -10,8 +10,6 @@ </template> <script> -import pathToRegexp from 'path-to-regexp' - export default { data() { return { @@ -49,18 +47,13 @@ export default { } return name.trim() === '首页' }, - pathCompile(path) { - const { params } = this.$route - var toPath = pathToRegexp.compile(path) - return toPath(params) - }, handleLink(item) { const { redirect, path } = item if (redirect) { this.$router.push(redirect) return } - this.$router.push(this.pathCompile(path)) + this.$router.push(path) } } }