From 0e80600f51b2ee1f92201970cb111611ae2ac70e Mon Sep 17 00:00:00 2001
From: xingyy <64720302+Concur-max@users.noreply.github.com>
Date: Mon, 17 Feb 2025 10:14:12 +0800
Subject: [PATCH] =?UTF-8?q?refactor(components):=20=E4=BC=98=E5=8C=96?=
=?UTF-8?q?=E7=80=91=E5=B8=83=E6=B5=81=E5=B8=83=E5=B1=80=E5=92=8C=E6=97=A5?=
=?UTF-8?q?=E6=9C=9F=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
-移除了瀑布流布局组件中的冗余注释和代码
-优化了日期选择组件的结构,删除了不必要的注释和空行
- 提高了代码的可读性和维护性
---
app/components/waterfallFlow/index.vue | 5 -----
app/components/x-van-date/index.vue | 7 -------
2 files changed, 12 deletions(-)
diff --git a/app/components/waterfallFlow/index.vue b/app/components/waterfallFlow/index.vue
index 2cf412b..cfc506c 100644
--- a/app/components/waterfallFlow/index.vue
+++ b/app/components/waterfallFlow/index.vue
@@ -11,7 +11,6 @@
:key="item.id"
class="waterfall-item"
>
-
@@ -35,19 +34,15 @@ const props = defineProps({
const columns = ref([])
-// 计算每列的内容
const calculateColumns = () => {
const cols = Array.from({ length: props.columnCount }, () => [])
props.items.forEach((item, index) => {
- // 将项目添加到高度最小的列中
const columnIndex = index % props.columnCount
cols[columnIndex].push(item)
})
columns.value = cols
}
-
-// 监听items变化重新计算列
watch(() => props.items, () => {
calculateColumns()
}, { deep: true })
diff --git a/app/components/x-van-date/index.vue b/app/components/x-van-date/index.vue
index 7acabd5..0c2299e 100644
--- a/app/components/x-van-date/index.vue
+++ b/app/components/x-van-date/index.vue
@@ -1,7 +1,6 @@