feat: 增加no-data组件
This commit is contained in:
@ -91,10 +91,6 @@ const handleDopdownClick = (index: any, ind: any) => {
|
||||
:selected-keys="selectedKey"
|
||||
:default-selected-keys="[`${MENU_GROUP_IDS.WORK_BENCH_ID}`]"
|
||||
>
|
||||
<template #collapse-icon>
|
||||
<icon-caret-down size="16" />
|
||||
<icon-caret-up size="16" />
|
||||
</template>
|
||||
<a-menu-item :key="`${MENU_GROUP_IDS.WORK_BENCH_ID}`" @click="handleSelect(0)">
|
||||
<span class="menu-item-text">工作台</span>
|
||||
</a-menu-item>
|
||||
@ -102,7 +98,7 @@ const handleDopdownClick = (index: any, ind: any) => {
|
||||
<a-dropdown :popup-max-height="false" class="layout-menu-item-dropdown">
|
||||
<a-button>
|
||||
<span class="menu-item-text mr-2px"> {{ item.name }}</span>
|
||||
<icon-caret-down size="16" />
|
||||
<icon-caret-down size="16" class="arco-icon-down !mr-0" />
|
||||
</a-button>
|
||||
<template #content>
|
||||
<a-doption v-for="(child, ind) in item.children" :key="ind" @click="handleDopdownClick(index, ind)">
|
||||
@ -204,6 +200,12 @@ const handleDopdownClick = (index: any, ind: any) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
.arco-icon-down {
|
||||
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
.arco-dropdown-open .arco-icon-down {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
.cneter-tip {
|
||||
font-size: 16px;
|
||||
|
||||
BIN
src/components/no-data/img/icon-empty.png
Normal file
BIN
src/components/no-data/img/icon-empty.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
49
src/components/no-data/index.vue
Normal file
49
src/components/no-data/index.vue
Normal file
@ -0,0 +1,49 @@
|
||||
<!--
|
||||
* @Author: RenXiaoDong
|
||||
* @Date: 2025-07-01 16:09:21
|
||||
-->
|
||||
<template>
|
||||
<div class="no-data">
|
||||
<slot name="pic">
|
||||
<img :src="emptyIcon" class="img" alt="" width="106" height="72" />
|
||||
</slot>
|
||||
<slot>
|
||||
<div v-if="text" class="text mt-36px">{{ text }}</div>
|
||||
</slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import icon from './img/icon-empty.png';
|
||||
|
||||
const props = defineProps({
|
||||
text: {
|
||||
type: String,
|
||||
default: '暂无数据',
|
||||
},
|
||||
emptyIcon: {
|
||||
type: String,
|
||||
default: icon,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.no-data {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
padding-top: 10%;
|
||||
padding-bottom: 10%;
|
||||
line-height: 1.5em;
|
||||
.text {
|
||||
color: var(--Text-3, #737478);
|
||||
font-family: 'PuHuiTi-Regular';
|
||||
font-size: 14px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: 22px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
0
src/components/no-data/style.scss
Normal file
0
src/components/no-data/style.scss
Normal file
Reference in New Issue
Block a user