修复获取应用列表筛选异常

This commit is contained in:
aixianling
2022-03-10 14:01:30 +08:00
parent 5e0f48682a
commit 5d3c2c30e1
2 changed files with 5 additions and 5 deletions

View File

@@ -29,8 +29,9 @@ export default {
...mapState(['token', 'openUser', 'user']),
appsList() {
let {search, currentLib} = this
return this.apps.filter(e => (currentLib == "apps" && e.path.indexOf("project")) || e.path.indexOf(currentLib) > -1)
.filter(e => !!search ? e.name.indexOf(search) > -1 : true) || []
return this.apps.filter(e => {
return (currentLib == "apps" && e.path.indexOf("project") > -1) || e.path.indexOf(currentLib) > -1
}).filter(e => !!search ? e.name.indexOf(search) > -1 : true) || []
},
currentApp() {
return this.apps.find(e => e.key == this.$route.query.app) || {}
@@ -52,7 +53,6 @@ export default {
...mapMutations(['logout']),
...mapActions(['agentSign']),
handleGotoApp(app) {
console.log(app)
uni.navigateTo({url: `${app.path}`})
},
handleLogin() {