|
@@ -1,4 +1,4 @@
|
|
|
-import { defineComponent, onMounted, reactive, ref } from 'vue';
|
|
|
+import { computed, defineComponent, onMounted, reactive, ref } from 'vue';
|
|
|
import styles from './index.module.less';
|
|
|
import CardType from '/src/components/card-type';
|
|
|
import Pagination from '/src/components/pagination';
|
|
@@ -97,6 +97,17 @@ export default defineComponent({
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+ const isEmpty = computed(() => {
|
|
|
+ const list = state.tableList || [];
|
|
|
+ let num = 0;
|
|
|
+ list.forEach((item: any) => {
|
|
|
+ if (!item.delFlag) {
|
|
|
+ num++;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return num > 0 ? false : true;
|
|
|
+ });
|
|
|
+
|
|
|
// 收藏
|
|
|
const onCollect = async (item: any) => {
|
|
|
try {
|
|
@@ -314,7 +325,7 @@ export default defineComponent({
|
|
|
)
|
|
|
)}
|
|
|
|
|
|
- {!state.loading && state.tableList.length <= 0 && (
|
|
|
+ {!state.loading && isEmpty.value && (
|
|
|
<TheEmpty style={{ minHeight: '50vh' }} description="暂无资源" />
|
|
|
)}
|
|
|
</div>
|