ViewLineGroup.vue 1000 Bytes
<!--
 * @Description: 一行两个一组
 * @Author: huyue
 * @Date: 2022-06-23 11:28:03
 * @LastEditors: huyue
 * @LastEditTime: 2024-01-26 21:10:18
-->
<template>
  <div class="line-group">
    <template v-for="(i, index) in items">
      <div class="chat-box" :key="index" :style="[{ height: height }, { 'margin-bottom': hideMargin ? 0 : '1vh' }]">
        <slot :name="i"></slot>
      </div>
    </template>
  </div>
</template>

<script type="text/ecmascript-6">
import datas from '../../../utils/data'
export default {
  name: 'ViewLineGroup',
  props: {
    height: {
      type: String,
      default: datas.DefaultData.defaultLineHeight + 'vh'
    },
    hideMargin: Boolean
  },
  data() {
    return {
      items: [1, 2, 3]
    }
  },
  mounted() {},
  methods: {}
}
</script>

<style scoped lang="scss">
.line-group {
  display: flex;
  justify-content: space-between;
}
.chat-box {
  background-color: rgba(11, 44, 142, 0.28);
}
</style>