mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-09 13:53:38 +08:00
25 lines
552 B
Vue
25 lines
552 B
Vue
<script setup lang="ts">
|
|
import { PropType } from "vue";
|
|
import { ListItem } from "../data";
|
|
import NoticeItem from "./NoticeItem.vue";
|
|
import { transformI18n } from "@/plugins/i18n";
|
|
|
|
defineProps({
|
|
list: {
|
|
type: Array as PropType<Array<ListItem>>,
|
|
default: () => []
|
|
},
|
|
emptyText: {
|
|
type: String,
|
|
default: ""
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<div v-if="list.length">
|
|
<NoticeItem v-for="(item, index) in list" :key="index" :noticeItem="item" />
|
|
</div>
|
|
<el-empty v-else :description="transformI18n(emptyText)" />
|
|
</template>
|