Files
dvcp_v2_wxcp_app/src/apps/AppAskForm/AppAskForm.vue

60 lines
1023 B
Vue
Raw Normal View History

2021-11-22 16:39:07 +08:00
<template>
<div class="form">
2021-11-23 11:51:14 +08:00
<component
:is="component"
@change="onChange"
:params="params">
</component>
2021-11-22 16:39:07 +08:00
</div>
</template>
<script>
2021-11-23 11:51:14 +08:00
import Tabbar from './components/Tabbar.vue'
import AddForm from './components/AddForm.vue'
2021-12-03 15:05:29 +08:00
import Result from './components/Result.vue'
2021-11-22 16:39:07 +08:00
2021-11-23 11:51:14 +08:00
export default {
name: 'AppAskForm',
2021-11-25 16:02:53 +08:00
appName: '问卷表单管理',
2021-11-22 16:39:07 +08:00
2021-11-23 11:51:14 +08:00
data () {
return {
component: 'Tabbar',
params: {}
}
},
components: {
Tabbar,
2021-12-03 15:05:29 +08:00
Result,
2021-11-23 11:51:14 +08:00
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() {
2021-11-22 16:39:07 +08:00
if (this.currIndex === 0) {
2021-11-23 11:51:14 +08:00
this.$refs.list.getList()
2021-11-22 16:39:07 +08:00
}
}
}
</script>
<style lang="scss" scoped>
</style>