乡村相册迁移位置
This commit is contained in:
64
src/project/caw/AppCountryAlbum/components/Tabbar.vue
Normal file
64
src/project/caw/AppCountryAlbum/components/Tabbar.vue
Normal file
@@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<div class="form-wrapper">
|
||||
<div class="form-content">
|
||||
<Home ref="Home" v-if="currIndex === 0" @change="onChange"/>
|
||||
<Organize ref="Organize" v-if="currIndex === 1" @change="onChange"/>
|
||||
</div>
|
||||
<AiTabbar :active.sync="currIndex" :list="tabBar"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Home from './Home.vue'
|
||||
import Organize from './Organize.vue'
|
||||
|
||||
export default {
|
||||
name: 'Tabbar',
|
||||
appName: '工作相册',
|
||||
|
||||
data() {
|
||||
return {
|
||||
currIndex: 0
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
Home,
|
||||
Organize
|
||||
},
|
||||
|
||||
computed: {
|
||||
tabBar() {
|
||||
const link = icon => `${this.$cdn}watermark/${icon}.png`
|
||||
return [
|
||||
{text: "相册", iconPath: "xiangce", selectedIconPath: "xiangce-active"},
|
||||
{text: "组织", iconPath: "zuzhi", selectedIconPath: "zuzhi-active"}
|
||||
].map(e => ({
|
||||
...e,
|
||||
iconPath: link(e.iconPath),
|
||||
selectedIconPath: link(e.selectedIconPath)
|
||||
}))
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
onChange(e) {
|
||||
this.$emit('change', e)
|
||||
},
|
||||
show() {
|
||||
if (this.currIndex == 0) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.Home.update()
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.currIndex === 0) {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
Reference in New Issue
Block a user