| | |
| | | "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",
|
| | |
| | | </template>
|
| | |
|
| | | <script>
|
| | | import pathToRegexp from 'path-to-regexp'
|
| | |
|
| | | export default {
|
| | | data() {
|
| | | return {
|
| | |
| | | }
|
| | | 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)
|
| | | }
|
| | | }
|
| | | }
|