<template>
  <div class="app-scrollview-page">
    <p class="app-scrollview-title" v-text="title"></p>
    <Row class="app-scrollview-tags" gutter="16">
      <Col
        class="app-scrollview-tag"
        :style="{ height: `${height}px`,marginTop:'16px' }"
        v-for="(item, index) in data"
        :key="index"
        :span="span"
      >
        <ViewDetail :data="item" :height="height" :nobg="nobg"/>
      </Col>
    </Row>
  </div>
</template>

<script setup>
import { Row, Col } from '@king-design/vue';
import ViewDetail from './detail.vue';
const props = defineProps({
  data: {
    type: Array,
    default: [],
  },
  title: {
    type: String,
    default: '',
  },
  span: {
    type: String,
    default: '12',
  },
  height: {
    type: String,
    default: '110',
  },
  nobg: {
    type: Boolean,
    default: false,
  },
});
</script>

<style lang="less" scoped>
.app-scrollview-title {
  font-size: 14px;
  font-weight: 500;
  color: #151b1e;
  margin: 0px;
}
:deep(.app-scrollview-tag) {
  font-size: 12px;
  height: 100%;
  border-radius: 4px;
  i {
    margin-right: 12px;
    position: relative;
    top: 2px;
  }
}
</style>
