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

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() {

View File

@@ -1,11 +1,11 @@
<template>
<div class="document-flow">
<ai-top-fixed>
<AiTopFixed>
<header class="pad">
<u-search placeholder="请输入公文名称" v-model="documentName" @clear="documentName='',getList()" @search="getList"
clearabled :show-action="false" height="64"></u-search>
</header>
</ai-top-fixed>
</AiTopFixed>
<div class="list pad" v-if="list.length">
<div class="card" v-for="(item,index) in list" :key="index" @click="handleClick(item)">
<u-row>