feat: Update all packages to latest version.

This commit is contained in:
EdwinBetanc0urt
2020-08-26 17:25:01 -04:00
parent 5e7113935c
commit cb936b3a94
9 changed files with 78 additions and 62 deletions

View File

@@ -10,7 +10,7 @@
</template>
<script>
import pathToRegexp from 'path-to-regexp'
import { compile } from 'path-to-regexp'
export default {
data() {
@@ -52,16 +52,16 @@ export default {
pathCompile(path) {
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
const { params } = this.$route
var toPath = pathToRegexp.compile(path)
const toPath = compile(path)
return toPath(params)
},
handleLink(item) {
const { redirect, path } = item
if (redirect) {
this.$router.push(redirect)
this.$router.push(redirect, () => {})
return
}
this.$router.push(this.pathCompile(path))
this.$router.push(this.pathCompile(path), () => {})
}
}
}

View File

@@ -12,7 +12,12 @@
class="header-search-select"
@change="change"
>
<el-option v-for="item in options" :key="item.path" :value="item" :label="item.title.join(' > ')" />
<el-option
v-for="element in options"
:key="element.item.path"
:value="element.item.path"
:label="element.item.title.join(' > ')"
/>
</el-select>
</div>
</template>
@@ -69,8 +74,8 @@ export default {
this.options = []
this.show = false
},
change(val) {
this.$router.push(val.path)
change(path) {
this.$router.push(path, () => {})
this.search = ''
this.options = []
this.$nextTick(() => {