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

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

parent e4fd3c42
...@@ -20,8 +20,6 @@ const router = useRouter() ...@@ -20,8 +20,6 @@ const router = useRouter()
const previewModalVisible = ref(false) const previewModalVisible = ref(false)
const selectedTemplate = ref<DigitalTemplate>({} as DigitalTemplate) const selectedTemplate = ref<DigitalTemplate>({} as DigitalTemplate)
const checkedClassifyValue = ref('') const checkedClassifyValue = ref('')
const cardItems = ref<HTMLElement[]>([])
const cardItemsImg = ref<HTMLImageElement[]>([])
const templateList = ref<DigitalTemplate[]>([]) const templateList = ref<DigitalTemplate[]>([])
const newTemplateList = ref<(DigitalTemplate & { position: { top: number; left: number } })[]>([]) const newTemplateList = ref<(DigitalTemplate & { position: { top: number; left: number } })[]>([])
const pagingInfo = ref({ const pagingInfo = ref({
...@@ -51,12 +49,7 @@ watch(checkedClassifyValue, () => { ...@@ -51,12 +49,7 @@ watch(checkedClassifyValue, () => {
templateClassifyIsLoading.value = true templateClassifyIsLoading.value = true
templateList.value = [] templateList.value = []
newTemplateList.value = [] newTemplateList.value = []
pagingInfo.value = { pagingInfo.value.pageNo = 1
pageNo: 1,
totalPages: 1,
pageSize: 30,
totalRows: 0,
}
columnHeights.value = Array(6).fill(0) columnHeights.value = Array(6).fill(0)
getTemplateList(true) getTemplateList(true)
...@@ -161,7 +154,7 @@ function handleToCreation(template: DigitalTemplate) { ...@@ -161,7 +154,7 @@ function handleToCreation(template: DigitalTemplate) {
} }
</script> </script>
<template> <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="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="mb-[24px] cursor-default text-[18px] text-[#000]">推薦模板</div>
<div class="pb-[16px]"> <div class="pb-[16px]">
...@@ -189,14 +182,12 @@ function handleToCreation(template: DigitalTemplate) { ...@@ -189,14 +182,12 @@ function handleToCreation(template: DigitalTemplate) {
<div <div
v-for="item in newTemplateList" v-for="item in newTemplateList"
:key="item.id" :key="item.id"
ref="cardItems"
:style="{ position: 'absolute', top: item.position.top + 'px', left: item.position.left + 'px' }" :style="{ position: 'absolute', top: item.position.top + 'px', left: item.position.left + 'px' }"
> >
<n-card class="mb-[20px] box-content w-[170px] overflow-hidden"> <n-card class="mb-[20px] box-content w-[170px] overflow-hidden">
<template #cover> <template #cover>
<div class="relative flex h-auto w-[170px] items-center justify-center overflow-hidden bg-[#f0f0f0]"> <div class="relative flex h-auto w-[170px] items-center justify-center overflow-hidden bg-[#f0f0f0]">
<img <img
ref="cardItemsImg"
:src="item.coverUrl" :src="item.coverUrl"
class="duration-400 h-auto w-full transform cursor-pointer object-cover transition-transform ease-in-out" class="duration-400 h-auto w-full transform cursor-pointer object-cover transition-transform ease-in-out"
@click="handleOpenPreviewModal(item)" @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