<template>
  <div>
    <tree-select
      v-model="value"
      value-format="object"
      :multiple="false"
      :always-open="alwaysOpen"
      :clearable="clearable"
      :options="treeData"
      :default-expand-level="1"
      placeholder="메뉴 검색"
    />
  </div>
</template>

<script>
export default {
  props: {
    treeData: {
      type: Array,
    },
  },
  data() {
    return {
      /* tree */
      value: null,
      alwaysOpen: true,
      clearable: false,
      options: [],
      temp: [],
      /* tree end */
    };
  },
  watch: {
    value() {
      this.$emit('menu-params', this.value);
    },
  },
};
</script>
