Просмотр исходного кода

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

RuoYi лет назад: 5
Родитель
Сommit
bfd33f2412
2 измененных файлов с 1 добавлено и 9 удалено
  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
     "js-cookie": "2.2.1",
49
     "js-cookie": "2.2.1",
50
     "jsencrypt": "3.0.0-rc.1",
50
     "jsencrypt": "3.0.0-rc.1",
51
     "nprogress": "0.2.0",
51
     "nprogress": "0.2.0",
52
-    "path-to-regexp": "6.2.0",
53
     "quill": "1.3.7",
52
     "quill": "1.3.7",
54
     "screenfull": "5.0.2",
53
     "screenfull": "5.0.2",
55
     "sortablejs": "1.10.2",
54
     "sortablejs": "1.10.2",

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

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