gaoluyang
2026-06-24 712aa51536236d43e87273e4ce45ac5691dffad8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<script setup lang="ts">
import type { NoticeBarProperty } from './config';
 
import { IconifyIcon } from '..\..\..\..\..\..\..\..\packages\icons\src';
 
import { Carousel, Divider, Image } from 'ant-design-vue';
 
/** 公告栏 */
defineOptions({ name: 'NoticeBar' });
 
defineProps<{ property: NoticeBarProperty }>();
</script>
 
<template>
  <div
    class="flex items-center py-1 text-xs"
    :style="{
      backgroundColor: property.backgroundColor,
      color: property.textColor,
    }"
  >
    <Image :src="property.iconUrl" class="h-[18px]" :preview="false" />
    <Divider type="vertical" />
    <Carousel
      :autoplay="true"
      :dots="false"
      vertical
      class="flex-1 pr-2"
      style="height: 24px"
    >
      <div v-for="(item, index) in property.contents" :key="index">
        <div class="h-6 truncate leading-6">{{ item.text }}</div>
      </div>
    </Carousel>
    <IconifyIcon icon="lucide:arrow-right" />
  </div>
</template>