Skip to content

Commit aaf89c5

Browse files
committed
upgrade
1 parent d9ff0a7 commit aaf89c5

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### chore
44

5-
- update dependencies | 更新依赖
5+
- upgrade dependencies | 升级依赖
66

77
## 1.0.5
88

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@lhlyu/vue-virtual-waterfall",
33
"description": "vue3 virtual waterfall component",
4-
"version": "1.0.6-beta.3",
4+
"version": "1.0.6-beta.4",
55
"author": "lhlyu",
66
"repository": {
77
"type": "git",
@@ -34,20 +34,20 @@
3434
"package.json"
3535
],
3636
"dependencies": {
37-
"@vueuse/core": "^10.11.0"
37+
"@vueuse/core": "^11.0.1"
3838
},
3939
"devDependencies": {
40-
"@vitejs/plugin-vue": "^5.1.1",
41-
"autoprefixer": "^10.4.19",
42-
"cssnano": "^7.0.4",
43-
"postcss": "^8.4.40",
40+
"@vitejs/plugin-vue": "^5.1.2",
41+
"autoprefixer": "^10.4.20",
42+
"cssnano": "^7.0.5",
43+
"postcss": "^8.4.41",
4444
"prettier": "^3.3.3",
4545
"prettier-plugin-rational-order": "^1.0.3",
4646
"sass": "^1.77.8",
4747
"typescript": "^5.5.4",
48-
"vite": "^5.3.5",
49-
"vite-plugin-dts": "4.0.0-beta.1",
50-
"vue": "^3.4.34",
48+
"vite": "^5.4.2",
49+
"vite-plugin-dts": "4.0.3",
50+
"vue": "^3.4.38",
5151
"vue-tsc": "^2.0.29"
5252
}
5353
}

src/vue-virtual-waterfall/virtual-waterfall.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</template>
3131

3232
<script setup lang="ts">
33-
import { computed, onMounted, ref, watchEffect } from 'vue'
33+
import { computed, onMounted, ref, shallowRef, watchEffect } from 'vue'
3434
import { useElementBounding, useElementSize } from '@vueuse/core'
3535
3636
defineOptions({
@@ -134,7 +134,7 @@ interface SpaceOption {
134134
}
135135
136136
// 计算每个item占据的空间
137-
const itemSpaces = ref<SpaceOption[]>([])
137+
const itemSpaces = shallowRef<SpaceOption[]>([])
138138
139139
watchEffect(() => {
140140
if (!columnCount.value) {
@@ -215,7 +215,7 @@ const itemRenderList = computed<SpaceOption[]>(() => {
215215
const t = v.top
216216
const b = v.bottom
217217
// 这里的逻辑是:
218-
// 只要元素部分出现在容器里就算作可见,因此有三段判断:
218+
// 只要元素部分出现在可视区域里就算作可见,因此有三段判断:
219219
// 1. 元素的上边界在容器内
220220
// 2. 元素的下边界在容器内
221221
// 3. 元素覆盖了整个容器

0 commit comments

Comments
 (0)