Files
dvcp_v2_wxcp_app/src/apps/AppCountryAlbum/AppCountryAlbum.vue

52 lines
839 B
Vue
Raw Normal View History

2021-12-21 13:58:03 +08:00
<template>
<div class="AppCountryAlbum">
2021-12-31 17:23:43 +08:00
<component v-if="refresh" :is="component" @change="onChange" :params="params"/>
2021-12-21 13:58:03 +08:00
</div>
</template>
<script>
2021-12-22 19:11:23 +08:00
import Detail from './detail'
import List from './list'
2021-12-21 13:58:03 +08:00
export default {
name: 'AppCountryAlbum',
appName: '乡村相册',
data() {
return {
component: 'List',
2021-12-31 17:23:43 +08:00
params: {},
refresh: true
2021-12-21 13:58:03 +08:00
}
},
2021-12-31 17:23:43 +08:00
components: {Detail, List},
2021-12-24 19:57:02 +08:00
onShow() {
document.title = "乡村相册"
2021-12-31 17:23:43 +08:00
this.handleRefresh()
2021-12-24 19:57:02 +08:00
},
2021-12-21 13:58:03 +08:00
methods: {
onChange(e) {
this.params = e.params
this.component = e.type
2021-12-31 17:23:43 +08:00
},
handleRefresh() {
this.refresh = false
this.$nextTick(() => {
this.refresh = true
})
2021-12-21 13:58:03 +08:00
}
},
}
</script>
<style lang="scss" scoped>
2021-12-31 17:23:43 +08:00
uni-page-body {
2021-12-21 13:58:03 +08:00
height: 100%;
}
2021-12-31 17:23:43 +08:00
.AppCountryAlbum {
2021-12-21 13:58:03 +08:00
height: 100%;
}
2021-12-31 17:23:43 +08:00
</style>