<template>
  <div>
    <component
      :is="cptType"
      @closePane="closePane"
    />
  </div>
</template>

<script>
  import filterSelect from './filterSelect'
  import filterText from './filterText'

  export default {
    name: 'FilterComponent',
    components: {
      filterSelect,
      filterText,
    },
    props: {
      //type can choose :text,select,
      type: {
        type: String,
        default: 'text',
      },
    },
    data () {
      return {
        cptType: 'filter-' + this.type,
        test:{
          a:'1',
          b:'1',
        },
      }
    },
    computed: {},
    watch: {},
    created () {
    },
    mounted () {

    },
    methods: {
      closePane (value) {
        this.$emit("closePane",value)
      },
      showPane () {
      },
      getVal () {
      },
      setVal () {
      },
    },
  }
</script>

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

</style>
