<template>
  <div class="title layout1">
    <span class="warn-title">{{ title }}：</span>
    <span class="jump-icon" @click="toDetail">>></span>
  </div>
  <div class="content">
    <div class="item" v-for="item in listInfo" :key="item">
      <img src="@/assets/icons/notice.png" alt="" />{{ item }}
    </div>
  </div>
</template>
<script setup>
const emit = defineEmits(["jumpPage"]);
const props = defineProps({
  listInfo: {
    type: Array,
    default: () => [],
  },
  title: {
    type: String,
    default: "告警",
  },
});
const toDetail = () => {
  emit("jumpPage");
};
</script>
<style scoped lang="scss">
.title {
  height: 20px;
  .warn-title {
    font-weight: bold;
    color: rgb(217, 10, 10);
  }
  .jump-icon {
    font-weight: bold;
    color: #018796;
    cursor: pointer;
  }
}
.content {
  width: 100%;
  height: calc(15vh - 30px);
  padding: 10px 0px 10px 30px;
  box-sizing: border-box;
  overflow: hidden;
  overflow-y: auto;
  .item {
    width: 100%;
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    padding: 4px 0px 4px 2px;
    box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 10px 0px,
      rgba(0, 0, 0, 0.15) 0px 2px 4px 0px;
    font-size: 14px;
    color: #fff;
    background-color: #232a31;
    border-radius: 4px;
    img {
      width: 20px;
      height: auto;
      margin-right: 10px;
    }
  }
}

.content::-webkit-scrollbar {
  width: 0px;
  background-color: rgba(58, 63, 69, 0.5);
}

.layout1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
</style>