Commit c86dc207438b78059644fdd85e4e15da2cc2142d
1 parent
ecc7a8be
移除path-to-regexp正则匹配插件
Showing
2 changed files
with
1 additions
and
9 deletions
ruoyi-ui/package.json
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 | } | ... | ... |