Bläddra i källkod

移除path-to-regexp正则匹配插件

RuoYi 5 år sedan
förälder
incheckning
bfd33f2412
2 ändrade filer med 1 tillägg och 9 borttagningar
  1. 0 1
      ruoyi-ui/package.json
  2. 1 8
      ruoyi-ui/src/components/Breadcrumb/index.vue

+ 0 - 1
ruoyi-ui/package.json

@@ -49,7 +49,6 @@
49 49
     "js-cookie": "2.2.1",
50 50
     "jsencrypt": "3.0.0-rc.1",
51 51
     "nprogress": "0.2.0",
52
-    "path-to-regexp": "6.2.0",
53 52
     "quill": "1.3.7",
54 53
     "screenfull": "5.0.2",
55 54
     "sortablejs": "1.10.2",

+ 1 - 8
ruoyi-ui/src/components/Breadcrumb/index.vue

@@ -10,8 +10,6 @@
10 10
 </template>
11 11
 
12 12
 <script>
13
-import pathToRegexp from 'path-to-regexp'
14
-
15 13
 export default {
16 14
   data() {
17 15
     return {
@@ -49,18 +47,13 @@ export default {
49 47
       }
50 48
       return name.trim() === '首页'
51 49
     },
52
-    pathCompile(path) {
53
-      const { params } = this.$route
54
-      var toPath = pathToRegexp.compile(path)
55
-      return toPath(params)
56
-    },
57 50
     handleLink(item) {
58 51
       const { redirect, path } = item
59 52
       if (redirect) {
60 53
         this.$router.push(redirect)
61 54
         return
62 55
       }
63
-      this.$router.push(this.pathCompile(path))
56
+      this.$router.push(path)
64 57
     }
65 58
   }
66 59
 }