-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cf748e6
commit 43e46c5
Showing
6 changed files
with
74 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 9 additions & 11 deletions
20
src/layout/components/lay-notice/components/NoticeList.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
<script setup lang="ts"> | ||
import { PropType } from "vue"; | ||
import { ListItem } from "../data"; | ||
import { useI18n } from "vue-i18n"; | ||
import NoticeItem from "./NoticeItem.vue"; | ||
import { transformI18n } from "@/plugins/i18n"; | ||
const props = defineProps({ | ||
defineProps({ | ||
list: { | ||
type: Array as PropType<Array<ListItem>>, | ||
default: () => [] | ||
}, | ||
emptyText: { | ||
type: String, | ||
default: "" | ||
} | ||
}); | ||
const { t } = useI18n(); | ||
</script> | ||
|
||
<template> | ||
<div v-if="props.list.length"> | ||
<NoticeItem | ||
v-for="(item, index) in props.list" | ||
:key="index" | ||
:noticeItem="item" | ||
/> | ||
<div v-if="list.length"> | ||
<NoticeItem v-for="(item, index) in list" :key="index" :noticeItem="item" /> | ||
</div> | ||
<el-empty v-else :description="t('status.pureNoMessage')" /> | ||
<el-empty v-else :description="transformI18n(emptyText)" /> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters