RuoYi
2020-12-17 c86dc207438b78059644fdd85e4e15da2cc2142d
移除path-to-regexp正则匹配插件
已修改2个文件
10 ■■■■ 文件已修改
ruoyi-ui/package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/components/Breadcrumb/index.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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",
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 @@
      }
      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)
    }
  }
}