<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 () {
    },

    methods: {
      onChange (e) {
        this.params = e.params
        this.component = e.type
      },
    }
  }
</script>

<style lang="scss" scoped>
</style>
