<template>
  <view class="zk-quick-action" v-if="quickForm">
	  <quick-action1 v-if="widget.value.quickType==1" :widget="quickForm"></quick-action1>
	  <quick-action2 v-if="widget.value.quickType==2" :widget="quickForm"></quick-action2>
	  <quick-action3 v-if="widget.value.quickType==3" :widget="quickForm"></quick-action3>
  </view>
</template>

<script>
  import ala from '@/service/ala'
  import quickAction1 from './widget/quick-action1'
  import quickAction2 from './widget/quick-action2'
  import quickAction3 from './widget/quick-action3'
  export default {
	components:{
		quickAction1,
		quickAction2,
		quickAction3
	},
    data () {
      return {
        widgetModel: {},
        quickForm: null
      }
    },
    props: {
      widget: {}
    },
    created () {
      this.init()
    },
    methods: {
      async init () {
        if (this.widget && this.widget.value) {
          var data = []
          this.widget.value.quickForm.forEach(element => {
            if (element.isEnable) {
              data.push(element)
            }
          })
          this.quickForm = data
		}
      }
    }
  }
</script>

<style lang="scss">
  .zk-quick-action {
    background-color: #ffffff;
  }
</style>
