Files
dvcp_v2_wxcp_app/src/apps/AppAskForm/AppAskForm.vue
yanran200730 821a946859 25153
2021-12-03 15:05:33 +08:00

60 lines
1023 B
Vue

<template>
<div class="form">
<component
:is="component"
@change="onChange"
:params="params">
</component>
</div>
</template>
<script>
import Tabbar from './components/Tabbar.vue'
import AddForm from './components/AddForm.vue'
import Result from './components/Result.vue'
export default {
name: 'AppAskForm',
appName: '问卷表单管理',
data () {
return {
component: 'Tabbar',
params: {}
}
},
components: {
Tabbar,
Result,
AddForm
},
onLoad () {
uni.$on('reload', () => {
if (this.currIndex === 0) {
this.$refs.list.reload()
} else {
this.$refs.addList.getList()
}
})
},
methods: {
onChange (e) {
this.params = e.params
this.component = e.type
},
},
onReachBottom() {
if (this.currIndex === 0) {
this.$refs.list.getList()
}
}
}
</script>
<style lang="scss" scoped>
</style>