<template>
  <cms-form-tree
    :multiple="false"
    :query-params="queryParams"
    :form-model="formModel"
    :match-key="matchKey"
    :placeholder="placeholder"
    @select="selectEvent"
    v-bind="$attrs"
    v-model="inputValue">
  </cms-form-tree>
</template>

<script>
  export default {
    name: "CmsCommonSelect",
    computed: {
      inputValue: {
        get() {
          return this.value
        },
        set(val) {
          this.$emit('input', val);
        }
      }
    },
    methods: {
      selectEvent(row) {

      }
    },
    props: {
      queryParams: {
        type: Object,
        default: () => {
          return {}
        }
      },
      formModel: {
        type: Object,
        default: () => {
          return {}
        }
      },
      matchKey: {
        type: Object,
        default: undefined
      },
      value: {
        type: String,
        default: undefined
      },
      placeholder: {
        type: String,
        default: undefined
      }
    }
  }
</script>

<style scoped>

</style>
