From 57fda551d110a5b55c2ce896355e398747c0e719 Mon Sep 17 00:00:00 2001
From: zhangsir <2207038757@qq.com>
Date: Fri, 22 Sep 2023 11:38:12 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E6=8E=A8=E8=8D=90=E5=BC=B9?=
=?UTF-8?q?=E7=AA=97=E5=88=97=E8=A1=A8=E5=AE=9E=E7=8E=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courserecommended/CourseRecommended.vue | 25 +++++++++++--------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/src/components/courserecommended/CourseRecommended.vue b/src/components/courserecommended/CourseRecommended.vue
index 11cf1db6..8477a8df 100644
--- a/src/components/courserecommended/CourseRecommended.vue
+++ b/src/components/courserecommended/CourseRecommended.vue
@@ -10,7 +10,7 @@
width="80%"
@cancel="handleCancel"
@ok="handleCancel"
- style="overflow-y:auto"
+ class="modal"
>
项目管理系列课
@@ -26,7 +26,7 @@
+ :scroll="{ x: 1100 }" :pagination="false" :loading="!tableLoading">
@@ -81,7 +81,8 @@ export default defineComponent({
data:{
type:Array,
default:()=>([])
- }
+ },
+
},
components: {
// OrgClassCheck,
@@ -90,9 +91,6 @@ export default defineComponent({
},
setup(props, { emit }) {
-
-
-// const loading = ref(false);
// // 查询数据
const searchData = ref({
pageIndex: 1,
@@ -101,7 +99,7 @@ const searchData = ref({
recommendTimeList: [],
});
const handelChangePage = (page, pageSize) => {
- loading.value = false;
+ state.tableLoading = false;
searchData.value.pageSize = pageSize;
searchData.value.pageIndex = page;
getList();
@@ -110,15 +108,15 @@ const getList = (num) => {
// if (num === 1) searchData.value.pageIndex = 1;
boeRequest(RECOMMEND_PAGE, searchData.value)
.then((res) => {
- // loading.value = true;
+ state.tableLoading = true;
state.data = res?.result?.list || [];
state.total = res?.result?.count || 0;
console.log(state.data)
})
-// .catch(() => {
-// loading.value = false;
-// });
+ .catch(() => {
+ state.tableLoading = false;
+ });
};
getList()
@@ -127,6 +125,7 @@ getList()
const store = useStore();
const state = reactive({
+ tableLoading:false,
imgList: [],
categoryName: "",
locationHref:
@@ -315,11 +314,15 @@ getList()
value,
searchData,
getList,
+ handelChangePage,
};
},
});