|
|
@ -27,9 +27,15 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="Page-1"> |
|
|
|
<div class="Page-1"> |
|
|
|
<el-pagination v-model:current-page="params.current" v-model:page-size="params.pageSize" |
|
|
|
<el-pagination |
|
|
|
:page-sizes="[6, 8, 12, 15]" layout="total, sizes, prev, pager, next, jumper" :total="total" |
|
|
|
v-model:current-page="params.current" |
|
|
|
@size-change="handleSizeChange" @current-change="handleCurrentChange" /> |
|
|
|
v-model:page-size="params.pageSize" |
|
|
|
|
|
|
|
:page-sizes="[6, 8, 12, 15]" |
|
|
|
|
|
|
|
layout="total, sizes, prev, pager, next, jumper" |
|
|
|
|
|
|
|
:total="total" |
|
|
|
|
|
|
|
@size-change="handleSizeChange" |
|
|
|
|
|
|
|
@current-change="handleCurrentChange" |
|
|
|
|
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tab-pane> |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -42,21 +48,22 @@ const container = ref() |
|
|
|
function handleResize() { |
|
|
|
function handleResize() { |
|
|
|
const style = getComputedStyle(container.value) |
|
|
|
const style = getComputedStyle(container.value) |
|
|
|
const width = Number(style.width.slice(0, -2)) |
|
|
|
const width = Number(style.width.slice(0, -2)) |
|
|
|
if (width >= 350 * 4.5) container.value.style.gridTemplateColumns = "repeat(4, 350px)" |
|
|
|
if (width >= 350 * 4.5) |
|
|
|
else container.value.style.gridTemplateColumns = "repeat(auto-fill, 350px)" |
|
|
|
container.value.style.gridTemplateColumns = 'repeat(4, 350px)' |
|
|
|
|
|
|
|
else container.value.style.gridTemplateColumns = 'repeat(auto-fill, 350px)' |
|
|
|
} |
|
|
|
} |
|
|
|
function debounce(func: any, delay: any) { |
|
|
|
function debounce(func: any, delay: any) { |
|
|
|
let timer: any |
|
|
|
let timer: any |
|
|
|
return function () { |
|
|
|
return function () { |
|
|
|
clearTimeout(timer); |
|
|
|
clearTimeout(timer) |
|
|
|
timer = setTimeout(() => { |
|
|
|
timer = setTimeout(() => { |
|
|
|
// @ts-ignore |
|
|
|
// @ts-ignore |
|
|
|
func.apply(this, arguments); |
|
|
|
func.apply(this, arguments) |
|
|
|
}, delay); |
|
|
|
}, delay) |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
const deHR = debounce(handleResize, 500) |
|
|
|
const deHR = debounce(handleResize, 500) |
|
|
|
const myObserver = new ResizeObserver((deHR)) |
|
|
|
const myObserver = new ResizeObserver(deHR) |
|
|
|
onMounted(() => myObserver.observe(container.value)) |
|
|
|
onMounted(() => myObserver.observe(container.value)) |
|
|
|
// =============================== |
|
|
|
// =============================== |
|
|
|
const total = ref(0) |
|
|
|
const total = ref(0) |
|
|
@ -92,7 +99,7 @@ let params = ref<CourseFavourQueryRequest>({ |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const getDatalist = async () => { |
|
|
|
const getDatalist = async () => { |
|
|
|
const res = await SeCourseFavourControllerService.listPostByPageUsingPost( |
|
|
|
const res = await SeCourseFavourControllerService.listPostByPageUsingPost1( |
|
|
|
params.value, |
|
|
|
params.value, |
|
|
|
) |
|
|
|
) |
|
|
|
datalist.value = res.data.records |
|
|
|
datalist.value = res.data.records |
|
|
|