按测试意见调整

This commit is contained in:
aixianling
2024-07-16 09:08:47 +08:00
parent af5c7fb279
commit 42aca4d540
2 changed files with 6 additions and 5 deletions

View File

@@ -15,14 +15,15 @@ export default {
currentPage() { currentPage() {
let {hash} = this.$route let {hash} = this.$route
return hash == "#add" ? Add : List return hash == "#add" ? Add : List
} },
appName: v => v.menuName || v.$options.label
}, },
} }
</script> </script>
<template> <template>
<section class="AppCopilotConfig"> <section class="AppCopilotConfig">
<component :is="currentPage" v-bind="$props"/> <component :is="currentPage" v-bind="$props" :appName="appName"/>
</section> </section>
</template> </template>

View File

@@ -41,7 +41,7 @@ export default {
}, },
handleAdd(row = {}) { handleAdd(row = {}) {
const {appIconUrl: url, fileId} = row const {appIconUrl: url, fileId} = row
this.form = this.$copy({...row, appIconUrl: [{url, fileId}]}) this.form = this.$copy({...row, appIconUrl: url ? [{url, fileId}] : []})
this.dialog = true this.dialog = true
// this.$router.push({hash: "#add", query: {id}}) // this.$router.push({hash: "#add", query: {id}})
}, },
@@ -94,14 +94,14 @@ export default {
<template> <template>
<section class="ccList"> <section class="ccList">
<ai-list> <ai-list>
<ai-title slot="title" title="定制方案" isShowBottomBorder/> <ai-title slot="title" :title="$attrs.appName" isShowBottomBorder/>
<template #content> <template #content>
<ai-search-bar> <ai-search-bar>
<template #left> <template #left>
<el-button type="primary" icon="iconfont iconAdd" @click="handleAdd()">添加</el-button> <el-button type="primary" icon="iconfont iconAdd" @click="handleAdd()">添加</el-button>
</template> </template>
<template #right> <template #right>
<el-input size="small" placeholder="搜索" v-model="search.appName" clearable <el-input size="small" placeholder="请输入应用名称" v-model="search.appName" clearable
@change="page.current=1,getTableData()"/> @change="page.current=1,getTableData()"/>
</template> </template>
</ai-search-bar> </ai-search-bar>