Commit 0dc81b62 authored by shirlyn.guo's avatar shirlyn.guo 🤡

chore: 样式修改&去除无用变量

parent e4fd3c42
......@@ -20,8 +20,6 @@ const router = useRouter()
const previewModalVisible = ref(false)
const selectedTemplate = ref<DigitalTemplate>({} as DigitalTemplate)
const checkedClassifyValue = ref('')
const cardItems = ref<HTMLElement[]>([])
const cardItemsImg = ref<HTMLImageElement[]>([])
const templateList = ref<DigitalTemplate[]>([])
const newTemplateList = ref<(DigitalTemplate & { position: { top: number; left: number } })[]>([])
const pagingInfo = ref({
......@@ -51,12 +49,7 @@ watch(checkedClassifyValue, () => {
templateClassifyIsLoading.value = true
templateList.value = []
newTemplateList.value = []
pagingInfo.value = {
pageNo: 1,
totalPages: 1,
pageSize: 30,
totalRows: 0,
}
pagingInfo.value.pageNo = 1
columnHeights.value = Array(6).fill(0)
getTemplateList(true)
......@@ -161,7 +154,7 @@ function handleToCreation(template: DigitalTemplate) {
}
</script>
<template>
<div class="mx-auto mt-[16px] min-h-[900px] overscroll-contain rounded-t-[16px] bg-white">
<div class="sticky top-0 z-10 mx-auto mt-[16px] min-h-[900px] overscroll-contain rounded-t-[16px] bg-white">
<div class="sticky top-[-1px] z-10 rounded-t-[16px] bg-white px-[24px] pb-[16px] pt-[24px]">
<div class="mb-[24px] cursor-default text-[18px] text-[#000]">推薦模板</div>
<div class="pb-[16px]">
......@@ -189,14 +182,12 @@ function handleToCreation(template: DigitalTemplate) {
<div
v-for="item in newTemplateList"
:key="item.id"
ref="cardItems"
:style="{ position: 'absolute', top: item.position.top + 'px', left: item.position.left + 'px' }"
>
<n-card class="mb-[20px] box-content w-[170px] overflow-hidden">
<template #cover>
<div class="relative flex h-auto w-[170px] items-center justify-center overflow-hidden bg-[#f0f0f0]">
<img
ref="cardItemsImg"
:src="item.coverUrl"
class="duration-400 h-auto w-full transform cursor-pointer object-cover transition-transform ease-in-out"
@click="handleOpenPreviewModal(item)"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment