<template>
  <div class="custom-component">
    <el-select v-model="dataModel" placeholder="请选择">
      <el-option
        v-for="(item,index) in options"
        :key="index"
        :label="item.label"
        :value="item.value">
      </el-option>
    </el-select>
    <!-- <el-cascader
      ref="siteChoose"
      :options="options"
      v-model="dataModel"
      clearable
      :props="{ value: 'id', label: 'name', children: 'children',multiple: true }"
    >
    </el-cascader> -->
  </div>
</template>

<script>
export default {
  name: "custom-width-height",
  props: {
    value: {
      type: Array,
      default: () => [],
    },
    width: {
      type: Number,
      default: 100,
    },
    height: {
      type: Number,
      default: 100,
    },
    options: {
      type: Array,
      default: () => [],
    },
  },
  data() {
    return {
      dataModel: this.value,
    };
  },
  mounted() {},
  watch: {
    value: {
      handler(val) {
        this.dataModel = val;
      },
      immediate: true,
    },
    dataModel: {
      handler(val) {
        this.$emit("input", val);
      },
      immediate: true,
    },
  },
  methods: {},
};
</script>

<style lang="scss">
</style>
