<template>
  <el-cascader
    v-model="value"
    :options="options"
    clearable="clearable"
    :show-all-levels="showAllLevels"
    :props="{
      expandTrigger: isHover ? 'hover' : 'click',
      multiple: multiple,
    }"
    collapse-tags
    :filterable="filterable"
  ></el-cascader>
</template>

<script>
export default {
  name: 'PsCascader',
  props: {
    filterable: {
      value: Boolean,
      default: false,
    },
    isHover: {
      value: Boolean,
      default: false,
    },
    showAllLevels: {
      value: Boolean,
      default: true,
    },
    clearable: {
      value: Boolean,
      default: true,
    },
    multiple: {
      value: Boolean,
      default: false,
    },
    options: {
      value: Array,
      default: [],
    },
  },
  data() {
    return {
      value: [],
    }
  },
}
</script>
