Skip to content

Commit

Permalink
perf: 优化所有el-emptydescription内容。图标选择器内容为空时加上el-empty
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxian521 committed Jan 2, 2024
1 parent 9968787 commit cf5fcc8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/components/ReAnimateSelector/src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ defineOptions({
const inputValue = defineModel({ type: String });
const searchVal = ref();
const animatesList = ref(animates);
const copyAnimatesList = cloneDeep(animatesList);
Expand Down Expand Up @@ -48,6 +49,7 @@ function onClear() {
}
function filterMethod(value: any) {
searchVal.value = value;
animatesList.value = copyAnimatesList.value.filter((i: string | any[]) =>
i.includes(value)
);
Expand Down Expand Up @@ -110,7 +112,7 @@ function onMouseleave() {
</ul>
<el-empty
v-show="animatesList.length === 0"
description="暂无动画"
:description="`${searchVal} 动画不存在`"
:image-size="60"
/>
</el-scrollbar>
Expand Down
5 changes: 5 additions & 0 deletions src/components/ReIcon/src/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ watch(
/>
</li>
</ul>
<el-empty
v-show="pageList.length === 0"
:description="`${filterValue} 图标不存在`"
:image-size="60"
/>
</el-scrollbar>
</el-tab-pane>
</el-tabs>
Expand Down
2 changes: 1 addition & 1 deletion src/layout/components/notice/noticeList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ const props = defineProps({
:noticeItem="item"
/>
</div>
<el-empty v-else description="暂无数据" />
<el-empty description="暂无消息" />
</template>
2 changes: 1 addition & 1 deletion src/views/list/card/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const handleManageProduct = product => {
v.name.toLowerCase().includes(searchValue.toLowerCase())
).length === 0
"
description="暂无数据"
:description="`${searchValue} 产品不存在`"
/>
<template v-if="pagination.total > 0">
<el-row :gutter="16">
Expand Down

3 comments on commit cf5fcc8

@xiaoxian521
Copy link
Member Author

@xiaoxian521 xiaoxian521 commented on cf5fcc8 Jan 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

图标选择器组件内容为空时:
image

AnimateCss选择器组件内容为空时:
image

@jack20211101
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/layout/components/notice/noticeList.vue
这个是不是更新漏了 v-else 现在显示这样了:
image

@xiaoxian521
Copy link
Member Author

@xiaoxian521 xiaoxian521 commented on cf5fcc8 Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.