This commit is contained in:
yanran200730
2022-01-13 15:37:17 +08:00
parent b7327e5613
commit 8ea705ba54
4 changed files with 25 additions and 15 deletions

View File

@@ -34,17 +34,22 @@
methods: {
onChange (data) {
if (data.type === 'list') {
this.component = 'List'
this.isShowDetail = false
this.params = data.params
}
if (data.type === 'Detail') {
this.component = 'Detail'
this.isShowDetail = true
this.params = data.params
}
if (data.type === 'list') {
this.component = 'List'
this.params = data.params
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getList()
}
})
}
}
}
}

View File

@@ -1,7 +1,7 @@
<template>
<ai-detail>
<template slot="title">
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(true)">
</ai-title>
</template>
<template slot="content">

View File

@@ -34,17 +34,22 @@
methods: {
onChange (data) {
if (data.type === 'list') {
this.component = 'List'
this.isShowDetail = false
this.params = data.params
}
if (data.type === 'Detail') {
this.component = 'Detail'
this.isShowDetail = true
this.params = data.params
}
if (data.type === 'list') {
this.component = 'List'
this.params = data.params
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getList()
}
})
}
}
}
}

View File

@@ -246,10 +246,10 @@
})
},
cancel (isRefresh) {
cancel () {
this.$emit('change', {
type: 'list',
isRefresh: !!isRefresh
isRefresh: true
})
}
}