<template>
  <div class="custom-component">
    <div style="min-height:80px">
      <template v-for="(item,index) in dataModel">
        <div :key="index">
          <span style="margin: 10px"> {{item.fullMessage}} </span>
          <span style="margin: 10px"> {{item.userName}} </span>
          <span style="margin: 10px"> {{item.time}} </span>
        </div>
      </template>
    </div>
  </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">
.custom-component{
  height: auto;

  span{
    +span{
      margin-left: 10px;
    }
  }
}
</style>
